Bug 695256 - Switch from PRBool to bool and replace PR_TRUE/PR_FALSE with true/false in comm-central. r=bienvenu
authorMark Banner <bugzilla@standard8.plus.com>
Fri, 30 Dec 2011 12:07:39 +0000
changeset 9082 f9d611e3d0a562cedb52cdafb65dd4f8f5af3b23
parent 9081 6e4299ead2275bbea6787413a609d9a2b3cd3026
child 9083 29a4d87cee06a081b4716944d7fc7bf1e80549d0
push id6958
push userbugzilla@standard8.plus.com
push dateFri, 30 Dec 2011 12:15:20 +0000
treeherdercomm-central@29a4d87cee06 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbienvenu
bugs695256
Bug 695256 - Switch from PRBool to bool and replace PR_TRUE/PR_FALSE with true/false in comm-central. r=bienvenu
calendar/base/src/calDateTime.cpp
calendar/base/src/calDuration.cpp
calendar/base/src/calICSService.cpp
calendar/base/src/calPeriod.cpp
calendar/base/src/calRecurrenceDate.cpp
calendar/base/src/calRecurrenceDateSet.cpp
calendar/base/src/calRecurrenceRule.cpp
calendar/base/src/calTimezone.cpp
db/mork/src/morkBuilder.cpp
db/mork/src/morkCell.cpp
db/mork/src/morkCellObject.cpp
db/mork/src/morkCursor.cpp
db/mork/src/morkFactory.cpp
db/mork/src/morkPortTableCursor.cpp
db/mork/src/morkRow.cpp
db/mork/src/morkRowCellCursor.cpp
db/mork/src/morkRowObject.cpp
db/mork/src/morkRowSpace.cpp
db/mork/src/morkStore.cpp
db/mork/src/morkTable.cpp
db/mork/src/morkTableRowCursor.cpp
ldap/xpcom/src/nsLDAPConnection.cpp
ldap/xpcom/src/nsLDAPControl.cpp
ldap/xpcom/src/nsLDAPMessage.cpp
ldap/xpcom/src/nsLDAPModification.cpp
ldap/xpcom/src/nsLDAPService.cpp
ldap/xpcom/src/nsLDAPSyncQuery.cpp
ldap/xpcom/src/nsLDAPURL.cpp
ldap/xpcom/src/nsLDAPUtils.h
mail/app/nsMailApp.cpp
mail/components/migration/src/nsEudoraProfileMigrator.cpp
mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp
mail/components/migration/src/nsNetscapeProfileMigratorBase.h
mail/components/migration/src/nsOEProfileMigrator.cpp
mail/components/migration/src/nsOutlookProfileMigrator.cpp
mail/components/migration/src/nsProfileMigrator.cpp
mail/components/migration/src/nsProfileMigratorBase.cpp
mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp
mail/components/search/nsMailWinSearchHelper.cpp
mail/components/shell/nsMailGNOMEIntegration.cpp
mail/components/shell/nsMailMacIntegration.cpp
mail/components/shell/nsMailWinIntegration.cpp
mailnews/addrbook/src/nsAbAddressCollector.cpp
mailnews/addrbook/src/nsAbBSDirectory.cpp
mailnews/addrbook/src/nsAbCardProperty.cpp
mailnews/addrbook/src/nsAbContentHandler.cpp
mailnews/addrbook/src/nsAbDirProperty.cpp
mailnews/addrbook/src/nsAbDirectoryQuery.cpp
mailnews/addrbook/src/nsAbDirectoryQueryProxy.cpp
mailnews/addrbook/src/nsAbLDAPAutoCompFormatter.cpp
mailnews/addrbook/src/nsAbLDAPCard.cpp
mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp
mailnews/addrbook/src/nsAbLDAPChangeLogQuery.cpp
mailnews/addrbook/src/nsAbLDAPDirectory.cpp
mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp
mailnews/addrbook/src/nsAbLDAPDirectoryQuery.cpp
mailnews/addrbook/src/nsAbLDAPListenerBase.cpp
mailnews/addrbook/src/nsAbLDAPReplicationData.cpp
mailnews/addrbook/src/nsAbLDAPReplicationQuery.cpp
mailnews/addrbook/src/nsAbLDAPReplicationService.cpp
mailnews/addrbook/src/nsAbLDIFService.cpp
mailnews/addrbook/src/nsAbMDBCard.cpp
mailnews/addrbook/src/nsAbMDBDirFactory.cpp
mailnews/addrbook/src/nsAbMDBDirProperty.cpp
mailnews/addrbook/src/nsAbMDBDirectory.cpp
mailnews/addrbook/src/nsAbManager.cpp
mailnews/addrbook/src/nsAbOSXCard.mm
mailnews/addrbook/src/nsAbOSXDirectory.mm
mailnews/addrbook/src/nsAbOutlookDirFactory.cpp
mailnews/addrbook/src/nsAbOutlookDirectory.cpp
mailnews/addrbook/src/nsAbQueryStringToExpression.cpp
mailnews/addrbook/src/nsAbView.cpp
mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
mailnews/addrbook/src/nsAddrDatabase.cpp
mailnews/addrbook/src/nsDirPrefs.cpp
mailnews/addrbook/src/nsLDAPAutoCompleteSession.cpp
mailnews/addrbook/src/nsVCardObj.cpp
mailnews/base/search/public/nsMsgSearchBoolExpression.h
mailnews/base/search/src/nsMsgBodyHandler.cpp
mailnews/base/search/src/nsMsgFilter.cpp
mailnews/base/search/src/nsMsgFilterList.cpp
mailnews/base/search/src/nsMsgFilterService.cpp
mailnews/base/search/src/nsMsgImapSearch.cpp
mailnews/base/search/src/nsMsgLocalSearch.cpp
mailnews/base/search/src/nsMsgSearchAdapter.cpp
mailnews/base/search/src/nsMsgSearchNews.cpp
mailnews/base/search/src/nsMsgSearchSession.cpp
mailnews/base/search/src/nsMsgSearchTerm.cpp
mailnews/base/src/nsMailDirProvider.cpp
mailnews/base/src/nsMessenger.cpp
mailnews/base/src/nsMessengerBootstrap.cpp
mailnews/base/src/nsMessengerOSXIntegration.mm
mailnews/base/src/nsMessengerUnixIntegration.cpp
mailnews/base/src/nsMessengerWinIntegration.cpp
mailnews/base/src/nsMsgAccount.cpp
mailnews/base/src/nsMsgAccountManager.cpp
mailnews/base/src/nsMsgAccountManagerDS.cpp
mailnews/base/src/nsMsgBiffManager.cpp
mailnews/base/src/nsMsgContentPolicy.cpp
mailnews/base/src/nsMsgCopyService.cpp
mailnews/base/src/nsMsgDBView.cpp
mailnews/base/src/nsMsgDBView.h
mailnews/base/src/nsMsgFolderCache.cpp
mailnews/base/src/nsMsgFolderCompactor.cpp
mailnews/base/src/nsMsgFolderDataSource.cpp
mailnews/base/src/nsMsgFolderNotificationService.cpp
mailnews/base/src/nsMsgGroupThread.cpp
mailnews/base/src/nsMsgGroupView.cpp
mailnews/base/src/nsMsgMailSession.cpp
mailnews/base/src/nsMsgOfflineManager.cpp
mailnews/base/src/nsMsgPrintEngine.cpp
mailnews/base/src/nsMsgProgress.cpp
mailnews/base/src/nsMsgPurgeService.cpp
mailnews/base/src/nsMsgQuickSearchDBView.cpp
mailnews/base/src/nsMsgRDFDataSource.cpp
mailnews/base/src/nsMsgSearchDBView.cpp
mailnews/base/src/nsMsgServiceProvider.cpp
mailnews/base/src/nsMsgSpecialViews.cpp
mailnews/base/src/nsMsgTagService.cpp
mailnews/base/src/nsMsgThreadedDBView.cpp
mailnews/base/src/nsMsgWindow.cpp
mailnews/base/src/nsMsgXFViewThread.cpp
mailnews/base/src/nsMsgXFVirtualFolderDBView.cpp
mailnews/base/src/nsSpamSettings.cpp
mailnews/base/src/nsStatusBarBiffManager.cpp
mailnews/base/src/nsSubscribableServer.cpp
mailnews/base/src/nsSubscribeDataSource.cpp
mailnews/base/test/TestMailCookie.cpp
mailnews/base/test/TestMsgStripRE.cpp
mailnews/base/util/nsImapMoveCoalescer.cpp
mailnews/base/util/nsMsgCompressIStream.cpp
mailnews/base/util/nsMsgCompressOStream.cpp
mailnews/base/util/nsMsgDBFolder.cpp
mailnews/base/util/nsMsgFileStream.cpp
mailnews/base/util/nsMsgI18N.cpp
mailnews/base/util/nsMsgI18N.h
mailnews/base/util/nsMsgIdentity.cpp
mailnews/base/util/nsMsgIncomingServer.cpp
mailnews/base/util/nsMsgKeySet.cpp
mailnews/base/util/nsMsgLineBuffer.cpp
mailnews/base/util/nsMsgLineBuffer.h
mailnews/base/util/nsMsgMailNewsUrl.cpp
mailnews/base/util/nsMsgProtocol.cpp
mailnews/base/util/nsMsgReadStateTxn.cpp
mailnews/base/util/nsMsgTxn.cpp
mailnews/base/util/nsMsgUtils.cpp
mailnews/base/util/nsMsgUtils.h
mailnews/compose/src/nsMsgAppleDoubleEncode.cpp
mailnews/compose/src/nsMsgAppleEncode.cpp
mailnews/compose/src/nsMsgAttachment.cpp
mailnews/compose/src/nsMsgAttachmentHandler.cpp
mailnews/compose/src/nsMsgCompFields.cpp
mailnews/compose/src/nsMsgCompFields.h
mailnews/compose/src/nsMsgCompUtils.cpp
mailnews/compose/src/nsMsgCompose.cpp
mailnews/compose/src/nsMsgComposeParams.cpp
mailnews/compose/src/nsMsgComposeService.cpp
mailnews/compose/src/nsMsgCopy.cpp
mailnews/compose/src/nsMsgQuote.cpp
mailnews/compose/src/nsMsgSend.cpp
mailnews/compose/src/nsMsgSendLater.cpp
mailnews/compose/src/nsMsgSendPart.cpp
mailnews/compose/src/nsMsgSendReport.cpp
mailnews/compose/src/nsSmtpProtocol.cpp
mailnews/compose/src/nsSmtpServer.cpp
mailnews/compose/src/nsSmtpService.cpp
mailnews/compose/src/nsSmtpUrl.cpp
mailnews/compose/src/nsURLFetcher.cpp
mailnews/db/msgdb/src/nsDBFolderInfo.cpp
mailnews/db/msgdb/src/nsImapMailDatabase.cpp
mailnews/db/msgdb/src/nsMailDatabase.cpp
mailnews/db/msgdb/src/nsMsgDatabase.cpp
mailnews/db/msgdb/src/nsMsgHdr.cpp
mailnews/db/msgdb/src/nsMsgThread.cpp
mailnews/db/msgdb/src/nsNewsDatabase.cpp
mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h
mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
mailnews/extensions/smime/src/nsMsgComposeSecure.cpp
mailnews/extensions/smime/src/nsSMimeJSHelper.cpp
mailnews/imap/src/nsAutoSyncManager.cpp
mailnews/imap/src/nsAutoSyncState.cpp
mailnews/imap/src/nsIMAPBodyShell.cpp
mailnews/imap/src/nsIMAPBodyShell.h
mailnews/imap/src/nsIMAPGenericParser.cpp
mailnews/imap/src/nsIMAPGenericParser.h
mailnews/imap/src/nsIMAPHostSessionList.cpp
mailnews/imap/src/nsIMAPNamespace.cpp
mailnews/imap/src/nsImapFlagAndUidState.cpp
mailnews/imap/src/nsImapIncomingServer.cpp
mailnews/imap/src/nsImapMailFolder.cpp
mailnews/imap/src/nsImapOfflineSync.cpp
mailnews/imap/src/nsImapProtocol.cpp
mailnews/imap/src/nsImapServerResponseParser.cpp
mailnews/imap/src/nsImapService.cpp
mailnews/imap/src/nsImapUndoTxn.cpp
mailnews/imap/src/nsImapUrl.cpp
mailnews/imap/src/nsImapUtils.cpp
mailnews/imap/test/TestImapFlagAndUidState.cpp
mailnews/import/applemail/src/nsAppleMailImport.cpp
mailnews/import/eudora/src/nsEudoraAddress.cpp
mailnews/import/eudora/src/nsEudoraCompose.cpp
mailnews/import/eudora/src/nsEudoraCompose.h
mailnews/import/eudora/src/nsEudoraEditor.cpp
mailnews/import/eudora/src/nsEudoraFilters.cpp
mailnews/import/eudora/src/nsEudoraImport.cpp
mailnews/import/eudora/src/nsEudoraMac.cpp
mailnews/import/eudora/src/nsEudoraMailbox.cpp
mailnews/import/eudora/src/nsEudoraSettings.cpp
mailnews/import/eudora/src/nsEudoraWin32.cpp
mailnews/import/oexpress/WabObject.cpp
mailnews/import/oexpress/nsOE5File.cpp
mailnews/import/oexpress/nsOEAddressIterator.cpp
mailnews/import/oexpress/nsOEImport.cpp
mailnews/import/oexpress/nsOEMailbox.cpp
mailnews/import/oexpress/nsOEScanBoxes.cpp
mailnews/import/oexpress/nsOESettings.cpp
mailnews/import/outlook/src/MapiApi.cpp
mailnews/import/outlook/src/MapiMessage.cpp
mailnews/import/outlook/src/nsOutlookCompose.cpp
mailnews/import/outlook/src/nsOutlookMail.cpp
mailnews/import/outlook/src/nsOutlookSettings.cpp
mailnews/import/src/ImportCharSet.h
mailnews/import/src/ImportOutFile.cpp
mailnews/import/src/ImportOutFile.h
mailnews/import/src/ImportTranslate.cpp
mailnews/import/src/nsImportABDescriptor.cpp
mailnews/import/src/nsImportAddressBooks.cpp
mailnews/import/src/nsImportEncodeScan.cpp
mailnews/import/src/nsImportFieldMap.cpp
mailnews/import/src/nsImportMailboxDescriptor.cpp
mailnews/import/src/nsImportMimeEncode.cpp
mailnews/import/src/nsImportScanFile.cpp
mailnews/import/src/nsImportScanFile.h
mailnews/import/src/nsImportService.cpp
mailnews/import/src/nsImportTranslator.cpp
mailnews/import/src/nsImportTranslator.h
mailnews/import/text/src/nsTextAddress.cpp
mailnews/import/text/src/nsTextImport.cpp
mailnews/import/vcard/src/nsVCardAddress.cpp
mailnews/import/vcard/src/nsVCardImport.cpp
mailnews/import/winlivemail/nsWMImport.cpp
mailnews/import/winlivemail/nsWMSettings.cpp
mailnews/local/src/nsLocalMailFolder.cpp
mailnews/local/src/nsLocalUndoTxn.cpp
mailnews/local/src/nsLocalUtils.cpp
mailnews/local/src/nsMailboxProtocol.cpp
mailnews/local/src/nsMailboxService.cpp
mailnews/local/src/nsMailboxUrl.cpp
mailnews/local/src/nsMovemailIncomingServer.cpp
mailnews/local/src/nsMovemailService.cpp
mailnews/local/src/nsMsgLocalStoreUtils.cpp
mailnews/local/src/nsNoIncomingServer.cpp
mailnews/local/src/nsNoneService.cpp
mailnews/local/src/nsParseMailbox.cpp
mailnews/local/src/nsParseMailbox.h
mailnews/local/src/nsPop3IncomingServer.cpp
mailnews/local/src/nsPop3Protocol.cpp
mailnews/local/src/nsPop3Protocol.h
mailnews/local/src/nsPop3Service.cpp
mailnews/local/src/nsPop3Sink.cpp
mailnews/local/src/nsRssIncomingServer.cpp
mailnews/local/src/nsRssService.cpp
mailnews/mapi/mapihook/src/msgMapiHook.cpp
mailnews/mapi/mapihook/src/msgMapiImp.cpp
mailnews/mapi/mapihook/src/msgMapiMain.cpp
mailnews/mapi/mapihook/src/msgMapiSupport.cpp
mailnews/mime/cthandlers/smimestub/nsSMIMEStub.cpp
mailnews/mime/cthandlers/vcard/mimevcrd.cpp
mailnews/mime/emitters/src/nsEmitterUtils.cpp
mailnews/mime/emitters/src/nsMimeBaseEmitter.cpp
mailnews/mime/emitters/src/nsMimeHtmlEmitter.cpp
mailnews/mime/emitters/src/nsMimeXmlEmitter.cpp
mailnews/mime/src/comi18n.cpp
mailnews/mime/src/comi18n.h
mailnews/mime/src/mimecms.cpp
mailnews/mime/src/mimecont.cpp
mailnews/mime/src/mimecryp.cpp
mailnews/mime/src/mimedrft.cpp
mailnews/mime/src/mimeebod.cpp
mailnews/mime/src/mimeenc.cpp
mailnews/mime/src/mimeeobj.cpp
mailnews/mime/src/mimefilt.cpp
mailnews/mime/src/mimehdrs.cpp
mailnews/mime/src/mimei.cpp
mailnews/mime/src/mimei.h
mailnews/mime/src/mimeiimg.cpp
mailnews/mime/src/mimeleaf.cpp
mailnews/mime/src/mimemalt.cpp
mailnews/mime/src/mimemapl.cpp
mailnews/mime/src/mimemcms.cpp
mailnews/mime/src/mimemoz2.cpp
mailnews/mime/src/mimemrel.cpp
mailnews/mime/src/mimemsg.cpp
mailnews/mime/src/mimemsig.cpp
mailnews/mime/src/mimemult.cpp
mailnews/mime/src/mimeobj.cpp
mailnews/mime/src/mimepbuf.cpp
mailnews/mime/src/mimesun.cpp
mailnews/mime/src/mimetenr.cpp
mailnews/mime/src/mimetext.cpp
mailnews/mime/src/mimethpl.cpp
mailnews/mime/src/mimethsa.cpp
mailnews/mime/src/mimethtm.cpp
mailnews/mime/src/mimetpfl.cpp
mailnews/mime/src/mimetpla.cpp
mailnews/mime/src/mimetric.cpp
mailnews/mime/src/mimeunty.cpp
mailnews/mime/src/modlmime.h
mailnews/mime/src/modmimee.h
mailnews/mime/src/nsMimeHeaders.cpp
mailnews/mime/src/nsMsgHeaderParser.cpp
mailnews/mime/src/nsSimpleMimeConverterStub.cpp
mailnews/mime/src/nsStreamConverter.cpp
mailnews/mime/test/TestMimeCrash.cpp
mailnews/news/src/nsNNTPArticleList.cpp
mailnews/news/src/nsNNTPNewsgroupList.cpp
mailnews/news/src/nsNNTPNewsgroupPost.cpp
mailnews/news/src/nsNNTPProtocol.cpp
mailnews/news/src/nsNewsDownloadDialogArgs.cpp
mailnews/news/src/nsNewsDownloader.cpp
mailnews/news/src/nsNewsFolder.cpp
mailnews/news/src/nsNntpIncomingServer.cpp
mailnews/news/src/nsNntpMockChannel.cpp
mailnews/news/src/nsNntpService.cpp
mailnews/news/src/nsNntpUrl.cpp
suite/feeds/src/nsFeedSniffer.cpp
suite/profile/migration/src/nsNetscapeProfileMigratorBase.cpp
suite/profile/migration/src/nsNetscapeProfileMigratorBase.h
suite/profile/migration/src/nsProfileMigrator.cpp
suite/profile/migration/src/nsThunderbirdProfileMigrator.cpp
suite/profile/nsSuiteDirectoryProvider.cpp
suite/shell/src/nsGNOMEShellService.cpp
suite/shell/src/nsGNOMEShellService.h
suite/shell/src/nsMacShellService.h
suite/shell/src/nsWindowsShellService.cpp
suite/shell/src/nsWindowsShellService.h
--- a/calendar/base/src/calDateTime.cpp
+++ b/calendar/base/src/calDateTime.cpp
@@ -59,39 +59,39 @@ extern "C" {
 #define CAL_ATTR_SET_PRE NS_ENSURE_FALSE(mImmutable, NS_ERROR_OBJECT_IS_IMMUTABLE)
 #define CAL_ATTR_SET_POST Normalize()
 #include "calAttributeHelpers.h"
 
 NS_IMPL_CLASSINFO(calDateTime, NULL, 0, CAL_DATETIME_CID)
 NS_IMPL_ISUPPORTS2_CI(calDateTime, calIDateTime, nsIXPCScriptable)
 
 calDateTime::calDateTime()
-    : mImmutable(PR_FALSE)
+    : mImmutable(false)
 {
     Reset();
 }
 
 calDateTime::calDateTime(icaltimetype const* atimeptr, calITimezone *tz)
-    : mImmutable(PR_FALSE)
+    : mImmutable(false)
 {
     FromIcalTime(atimeptr, tz);
 }
 
 NS_IMETHODIMP
 calDateTime::GetIsMutable(bool *aResult)
 {
     NS_ENSURE_ARG_POINTER(aResult);
     *aResult = !mImmutable;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calDateTime::MakeImmutable()
 {
-    mImmutable = PR_TRUE;
+    mImmutable = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calDateTime::Clone(calIDateTime **aResult)
 {
     NS_ENSURE_ARG_POINTER(aResult);
     icaltimetype itt;
@@ -114,17 +114,17 @@ calDateTime::ResetTo(PRInt16 year,
     NS_ENSURE_FALSE(mImmutable, NS_ERROR_OBJECT_IS_IMMUTABLE);
     NS_ENSURE_ARG_POINTER(tz);
     mYear = year;
     mMonth = month;
     mDay = day;
     mHour = hour;
     mMinute = minute;
     mSecond = second;
-    mIsDate = PR_FALSE;
+    mIsDate = false;
     mTimezone = tz;
     Normalize();
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calDateTime::Reset()
 {
@@ -132,20 +132,20 @@ calDateTime::Reset()
     mYear = 1970;
     mMonth = 0;
     mDay = 1;
     mHour = 0;
     mMinute = 0;
     mSecond = 0;
     mWeekday = 4;
     mYearday = 1;
-    mIsDate = PR_FALSE;
+    mIsDate = false;
     mTimezone = nsnull;
     mNativeTime = 0;
-    mIsValid = PR_TRUE;
+    mIsValid = true;
     return NS_OK;
 }
 
 CAL_VALUETYPE_ATTR(calDateTime, PRInt16, Year)
 CAL_VALUETYPE_ATTR(calDateTime, PRInt16, Month)
 CAL_VALUETYPE_ATTR(calDateTime, PRInt16, Day)
 CAL_VALUETYPE_ATTR(calDateTime, PRInt16, Hour)
 CAL_VALUETYPE_ATTR(calDateTime, PRInt16, Minute)
@@ -187,17 +187,17 @@ calDateTime::GetTimezoneOffset(PRInt32 *
     *aResult = icaltimezone_get_utc_offset(const_cast<icaltimezone *>(icalt.zone), &icalt, &dst);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calDateTime::SetNativeTime(PRTime aNativeTime)
 {
     icaltimetype icalt;
-    PRTimeToIcaltime(aNativeTime, PR_FALSE, icaltimezone_get_utc_timezone(), &icalt);
+    PRTimeToIcaltime(aNativeTime, false, icaltimezone_get_utc_timezone(), &icalt);
     FromIcalTime(&icalt, cal::UTC());
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calDateTime::AddDuration(calIDuration *aDuration)
 {
     NS_ENSURE_FALSE(mImmutable, NS_ERROR_OBJECT_IS_IMMUTABLE);
@@ -255,17 +255,17 @@ calDateTime::ToString(nsACString & aResu
 }
 
 NS_IMETHODIMP
 calDateTime::SetTimeInTimezone(PRTime aTime, calITimezone * aTimezone)
 {
     NS_ENSURE_FALSE(mImmutable, NS_ERROR_OBJECT_IS_IMMUTABLE);
     NS_ENSURE_ARG_POINTER(aTimezone);
     icaltimetype icalt;
-    PRTimeToIcaltime(aTime, PR_FALSE, cal::getIcalTimezone(aTimezone), &icalt);
+    PRTimeToIcaltime(aTime, false, cal::getIcalTimezone(aTimezone), &icalt);
     FromIcalTime(&icalt, aTimezone);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calDateTime::GetInTimezone(calITimezone * aTimezone, calIDateTime ** aResult)
 {
     NS_ENSURE_ARG_POINTER(aTimezone);
@@ -483,19 +483,19 @@ calDateTime::ToIcalTime(struct icaltimet
 //         icaltimezone_get_utc_offset(tz, icalt, &icalt->is_daylight);
 //     }
 }
 
 void calDateTime::FromIcalTime(icaltimetype const* icalt, calITimezone * tz)
 {
     icaltimetype t = *icalt;
     mIsValid = (icaltime_is_null_time(t) ||
-                icaltime_is_valid_time(t) ? PR_TRUE : PR_FALSE);
+                icaltime_is_valid_time(t) ? true : false);
 
-    mIsDate = t.is_date ? PR_TRUE : PR_FALSE;
+    mIsDate = t.is_date ? true : false;
     if (mIsDate) {
         t.hour = 0;
         t.minute = 0;
         t.second = 0;
     }
 
     if (mIsValid) {
         t = icaltime_normalize(t);
@@ -679,22 +679,22 @@ calDateTime::GetProperty(nsIXPConnectWra
             bool b;
             if (NS_SUCCEEDED(mTimezone->GetIsFloating(&b)) && b) {
                 obj = js_NewDateObject(cx, mYear, mMonth, mDay, mHour, mMinute, mSecond);
             } else {
                 obj = js_NewDateObjectMsec(cx, msec);
             }
 
             *vp = OBJECT_TO_JSVAL(obj);
-            *_retval = PR_TRUE;
+            *_retval = true;
             return NS_SUCCESS_I_DID_SOMETHING;
         }
     }
 
-    *_retval = PR_TRUE;
+    *_retval = true;
     return NS_OK;
 }
 
 
 /* bool setProperty (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsid id, in JSValPtr vp); */
 NS_IMETHODIMP
 calDateTime::SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext * cx,
                          JSObject * obj, jsid id, jsval * vp, bool *_retval)
@@ -707,37 +707,37 @@ calDateTime::SetProperty(nsIXPConnectWra
         const jschar *str = JS_GetStringCharsAndLength(cx, idString, &length);
 
         nsDependentString const val(reinterpret_cast<PRUnichar const*>(str), length);
 
         if (val.EqualsLiteral("jsDate") && vp) {
             JSObject *dobj;
             if (!JSVAL_IS_OBJECT(*vp) ||
                 !js_DateIsValid(cx, (dobj = JSVAL_TO_OBJECT(*vp)))) {
-                mIsValid = PR_FALSE;
+                mIsValid = false;
             } else {
                 jsdouble utcMsec = js_DateGetMsecSinceEpoch(cx, dobj);
                 PRTime utcTime, thousands;
                 LL_F2L(utcTime, utcMsec);
                 LL_I2L(thousands, 1000);
                 LL_MUL(utcTime, utcTime, thousands);
 
                 nsresult rv = SetNativeTime(utcTime);
                 if (NS_SUCCEEDED(rv)) {
-                    mIsValid = PR_TRUE;
+                    mIsValid = true;
                 } else {
-                    mIsValid = PR_FALSE;
+                    mIsValid = false;
                 }
             }
 
-            *_retval = PR_TRUE;
+            *_retval = true;
             return NS_SUCCESS_I_DID_SOMETHING;
         }
     }
-    *_retval = PR_TRUE;
+    *_retval = true;
     return NS_OK;
 }
 
 /* bool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsid id, in PRUint32 flags, out JSObjectPtr objp); */
 NS_IMETHODIMP
 calDateTime::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext * cx,
                         JSObject * obj, jsid id, PRUint32 flags,
                         JSObject * *objp, bool *_retval)
@@ -757,11 +757,11 @@ calDateTime::NewResolve(nsIXPConnectWrap
                                            length,
                                            JSVAL_VOID,
                                            nsnull, nsnull, 0);
             *objp = obj;
             return *_retval ? NS_OK : NS_ERROR_FAILURE;
         }
     }
 
-    *_retval = PR_TRUE;
+    *_retval = true;
     return NS_OK;
 }
--- a/calendar/base/src/calDuration.cpp
+++ b/calendar/base/src/calDuration.cpp
@@ -51,53 +51,53 @@
 #define SECONDS_PER_DAY     86400
 #define SECONDS_PER_HOUR     3600
 #define SECONDS_PER_MINUTE     60
 
 NS_IMPL_CLASSINFO(calDuration, NULL, 0, CAL_DURATION_CID)
 NS_IMPL_ISUPPORTS1_CI(calDuration, calIDuration)
 
 calDuration::calDuration()
-    : mImmutable(PR_FALSE)
+    : mImmutable(false)
 {
     Reset();
 }
 
 calDuration::calDuration(const calDuration& cdt)
 {
     mDuration.is_neg = cdt.mDuration.is_neg;
     mDuration.weeks = cdt.mDuration.weeks;
     mDuration.days = cdt.mDuration.days;
     mDuration.hours = cdt.mDuration.hours;
     mDuration.minutes = cdt.mDuration.minutes;
     mDuration.seconds = cdt.mDuration.seconds;
 
     // copies are always mutable
-    mImmutable = PR_FALSE;
+    mImmutable = false;
 }
 
 calDuration::calDuration(const struct icaldurationtype * const aDurationPtr)
-    : mImmutable(PR_FALSE)
+    : mImmutable(false)
 {
     FromIcalDuration(aDurationPtr);
 }
 
 NS_IMETHODIMP
 calDuration::GetIsMutable(bool *aResult)
 {
     NS_ENSURE_ARG_POINTER(aResult);
 
     *aResult = !mImmutable;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calDuration::MakeImmutable()
 {
-    mImmutable = PR_TRUE;
+    mImmutable = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calDuration::Clone(calIDuration **aResult)
 {
     calDuration *cdt = new calDuration(*this);
     if (!cdt)
--- a/calendar/base/src/calICSService.cpp
+++ b/calendar/base/src/calICSService.cpp
@@ -116,17 +116,17 @@ calIcalProperty::GetValue(nsACString &st
         icalstr = icalproperty_get_value_as_string(mProperty);
     }
 
     if (!icalstr) {
         if (icalerrno == ICAL_BADARG_ERROR) {
             str.Truncate();
             // Set string to null, because we don't have a value
             // (which is something different then an empty value)
-            str.SetIsVoid(PR_TRUE);
+            str.SetIsVoid(true);
             return NS_OK;
         }
 
 #ifdef DEBUG
         fprintf(stderr, "Error getting string value: %d (%s)\n",
                 icalerrno, icalerror_strerror(icalerrno));
 #endif
         return NS_ERROR_FAILURE;
@@ -162,17 +162,17 @@ NS_IMETHODIMP
 calIcalProperty::GetValueAsIcalString(nsACString &str)
 {
     const char *icalstr = icalproperty_get_value_as_string(mProperty);
     if (!icalstr) {
         if (icalerrno == ICAL_BADARG_ERROR) {
             str.Truncate();
             // Set string to null, because we don't have a value
             // (which is something different then an empty value)
-            str.SetIsVoid(PR_TRUE);
+            str.SetIsVoid(true);
             return NS_OK;
         }
 
 #ifdef DEBUG
         fprintf(stderr, "Error getting string value: %d (%s)\n",
                 icalerrno, icalerror_strerror(icalerrno));
 #endif
         return NS_ERROR_FAILURE;
@@ -242,17 +242,17 @@ calIcalProperty::GetParameter(const nsAC
             icalstr = icalparameter_get_iana_value(icalparam);
     } else {
         icalstr = icalproperty_get_parameter_as_string(mProperty,
                                                        PromiseFlatCString(param).get());
     }
 
     if (!icalstr) {
         value.Truncate();
-        value.SetIsVoid(PR_TRUE);
+        value.SetIsVoid(true);
     } else {
         value.Assign(icalstr);
     }
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calIcalProperty::SetParameter(const nsACString &param, const nsACString &value)
@@ -324,17 +324,17 @@ FillParameterName(icalparameter *icalpar
         else if (paramkind != ICAL_NO_PARAMETER)
             propname = icalparameter_kind_to_string(paramkind);
     }
 
     if (propname) {
         name.Assign(propname);
     } else {
         name.Truncate();
-        name.SetIsVoid(PR_TRUE);
+        name.SetIsVoid(true);
     }
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calIcalProperty::GetFirstParameterName(nsACString &name)
 {
@@ -585,17 +585,17 @@ NS_IMETHODIMP                           
 calIcalComponent::Get##Attrname(nsACString &str)                        \
 {                                                                       \
     PRInt32 val;                                                        \
     nsresult rv = GetIntProperty(ICAL_##ICALNAME##_PROPERTY, &val);     \
     if (NS_FAILED(rv))                                                  \
         return rv;                                                      \
     if (val == -1) {                                                    \
         str.Truncate();                                                 \
-        str.SetIsVoid(PR_TRUE);                                         \
+        str.SetIsVoid(true);                                         \
     } else {                                                            \
         str.Assign(icalproperty_##lcname##_to_string((icalproperty_##lcname)val)); \
     }                                                                   \
     return NS_OK;                                                       \
 }                                                                       \
                                                                         \
 NS_IMETHODIMP                                                           \
 calIcalComponent::Set##Attrname(const nsACString &str)                  \
@@ -681,17 +681,17 @@ calIcalComponent::Set##Attrname(PRInt32 
     return SetProperty(ICAL_##ICALNAME##_PROPERTY, prop);       \
 }
 
 nsresult calIcalComponent::GetStringProperty(icalproperty_kind kind, nsACString &str)
 {
     icalproperty *prop = icalcomponent_get_first_property(mComponent, kind);
     if (!prop) {
         str.Truncate();
-        str.SetIsVoid(PR_TRUE);
+        str.SetIsVoid(true);
     } else {
         str.Assign(icalvalue_get_string(icalproperty_get_value(prop)));
     }
     return NS_OK;
 }
 
 nsresult calIcalComponent::SetStringProperty(icalproperty_kind kind,
                                              const nsACString &str)
@@ -1083,17 +1083,17 @@ calIcalComponent::AddSubcomponent(calIIc
     NS_ENSURE_SUCCESS(rv, rv);
 
     calIcalComponent * const vcal = getParentVCalendarOrThis();
     bool failed = false;
     for (PRUint32 i = 0; i < tzCount; i++) {
         if (!failed) {
             rv = vcal->AddTimezoneReference(timezones[i]);
             if (NS_FAILED(rv))
-                failed = PR_TRUE;
+                failed = true;
         }
 
         NS_RELEASE(timezones[i]);
     }
 
     nsMemory::Free(timezones);
 
     if (failed)
--- a/calendar/base/src/calPeriod.cpp
+++ b/calendar/base/src/calPeriod.cpp
@@ -42,48 +42,48 @@
 #include "nsIClassInfoImpl.h"
 
 #include "calUtils.h"
 
 NS_IMPL_CLASSINFO(calPeriod, NULL, 0, CAL_PERIOD_CID)
 NS_IMPL_ISUPPORTS1_CI(calPeriod, calIPeriod)
 
 calPeriod::calPeriod()
-    : mImmutable(PR_FALSE)
+    : mImmutable(false)
 {
 }
 
 calPeriod::calPeriod(const calPeriod& cpt)
-    : mImmutable(PR_FALSE)
+    : mImmutable(false)
 {
     if (cpt.mStart)
         cpt.mStart->Clone(getter_AddRefs(mStart));
     if (cpt.mEnd)
         cpt.mEnd->Clone(getter_AddRefs(mEnd));
 }
 
 calPeriod::calPeriod(struct icalperiodtype const* aPeriodPtr)
-    : mImmutable(PR_FALSE)
+    : mImmutable(false)
 {
     FromIcalPeriod(aPeriodPtr);
 }
 
 NS_IMETHODIMP
 calPeriod::GetIsMutable(bool *aResult)
 {
     NS_ENSURE_ARG_POINTER(aResult);
 
     *aResult = !mImmutable;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calPeriod::MakeImmutable()
 {
-    mImmutable = PR_TRUE;
+    mImmutable = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calPeriod::Clone(calIPeriod **aResult)
 {
     NS_ENSURE_ARG_POINTER(aResult);
     calPeriod *cpt = new calPeriod(*this);
--- a/calendar/base/src/calRecurrenceDate.cpp
+++ b/calendar/base/src/calRecurrenceDate.cpp
@@ -55,18 +55,18 @@
 extern "C" {
     #include "ical.h"
 }
 
 NS_IMPL_CLASSINFO(calRecurrenceDate, NULL, 0, CAL_RECURRENCEDATE_CID)
 NS_IMPL_ISUPPORTS2_CI(calRecurrenceDate, calIRecurrenceItem, calIRecurrenceDate)
 
 calRecurrenceDate::calRecurrenceDate()
-    : mImmutable(PR_FALSE),
-      mIsNegative(PR_FALSE)
+    : mImmutable(false),
+      mIsNegative(false)
 {
 }
 
 NS_IMETHODIMP
 calRecurrenceDate::GetIsMutable(bool *aResult)
 {
     NS_ENSURE_ARG_POINTER(aResult);
 
@@ -75,17 +75,17 @@ calRecurrenceDate::GetIsMutable(bool *aR
 }
 
 NS_IMETHODIMP
 calRecurrenceDate::MakeImmutable()
 {
     if (mImmutable)
         return NS_ERROR_FAILURE; // XXX another error code
 
-    mImmutable = PR_TRUE;
+    mImmutable = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calRecurrenceDate::Clone(calIRecurrenceItem **_retval)
 {
     calRecurrenceDate *crd = new calRecurrenceDate;
     if (!crd)
@@ -121,17 +121,17 @@ calRecurrenceDate::SetIsNegative(bool aI
     return NS_OK;
 }
 
 /* readonly attribute boolean isFinite; */
 NS_IMETHODIMP
 calRecurrenceDate::GetIsFinite(bool *_retval)
 {
     NS_ENSURE_ARG_POINTER(_retval);
-    *_retval = PR_TRUE;
+    *_retval = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calRecurrenceDate::GetDate(calIDateTime **aDate)
 {
     NS_ENSURE_ARG_POINTER(aDate);
 
@@ -221,24 +221,24 @@ calRecurrenceDate::SetIcalProperty(calII
 {
     NS_ENSURE_ARG_POINTER(aProp);
 
     nsCAutoString name;
     nsresult rc = aProp->GetPropertyName(name);
     if (NS_FAILED(rc))
         return rc;
     if (name.EqualsLiteral("RDATE")) {
-        mIsNegative = PR_FALSE;
+        mIsNegative = false;
         icalvalue * const value = icalproperty_get_value(aProp->GetIcalProperty());
         if (icalvalue_isa(value) == ICAL_PERIOD_VALUE) {
             icalperiodtype const period = icalvalue_get_period(value);
             // take only period's start date and skip end date, but continue parsing;
             // open bug 489747:
             mDate = new calDateTime(&period.start, nsnull /* detect timezone */);
             return NS_OK;
         }
     } else if (name.EqualsLiteral("EXDATE"))
-        mIsNegative = PR_TRUE;
+        mIsNegative = true;
     else
         return NS_ERROR_INVALID_ARG;
 
     return aProp->GetValueAsDatetime(getter_AddRefs(mDate));
 }
--- a/calendar/base/src/calRecurrenceDateSet.cpp
+++ b/calendar/base/src/calRecurrenceDateSet.cpp
@@ -50,19 +50,19 @@
 extern "C" {
     #include "ical.h"
 }
 
 NS_IMPL_CLASSINFO(calRecurrenceDateSet, NULL, 0, CAL_RECURRENCEDATESET_CID)
 NS_IMPL_ISUPPORTS2_CI(calRecurrenceDateSet, calIRecurrenceItem, calIRecurrenceDateSet)
 
 calRecurrenceDateSet::calRecurrenceDateSet()
-    : mImmutable(PR_FALSE),
-      mIsNegative(PR_FALSE),
-      mSorted(PR_FALSE)
+    : mImmutable(false),
+      mIsNegative(false),
+      mSorted(false)
 {
 }
 
 NS_IMETHODIMP
 calRecurrenceDateSet::GetIsMutable(bool *aResult)
 {
     NS_ENSURE_ARG_POINTER(aResult);
 
@@ -71,17 +71,17 @@ calRecurrenceDateSet::GetIsMutable(bool 
 }
 
 NS_IMETHODIMP
 calRecurrenceDateSet::MakeImmutable()
 {
     if (mImmutable)
         return NS_ERROR_FAILURE; // XXX another error code
 
-    mImmutable = PR_TRUE;
+    mImmutable = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calRecurrenceDateSet::Clone(calIRecurrenceItem **_retval)
 {
     nsresult rv;
 
@@ -125,17 +125,17 @@ calRecurrenceDateSet::SetIsNegative(bool
     return NS_OK;
 }
 
 /* readonly attribute boolean isFinite; */
 NS_IMETHODIMP
 calRecurrenceDateSet::GetIsFinite(bool *_retval)
 {
     NS_ENSURE_ARG_POINTER(_retval);
-    *_retval = PR_TRUE;
+    *_retval = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calRecurrenceDateSet::GetDates(PRUint32 *aCount, calIDateTime ***aDates)
 {
     if (mDates.Count() == 0) {
         *aDates = nsnull;
@@ -164,29 +164,29 @@ calRecurrenceDateSet::SetDates(PRUint32 
 {
     NS_ENSURE_ARG_POINTER(aDates);
 
     mDates.Clear();
     for (PRUint32 i = 0; i < aCount; i++) {
         mDates.AppendObject(aDates[i]);
     }
 
-    mSorted = PR_FALSE;
+    mSorted = false;
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calRecurrenceDateSet::AddDate(calIDateTime *aDate)
 {
     NS_ENSURE_ARG_POINTER(aDate);
 
     mDates.AppendObject(aDate);
 
-    mSorted = PR_FALSE;
+    mSorted = false;
 
     return NS_OK;
 }
 
 static int
 calDateTimeComparator (calIDateTime *aElement1,
                        calIDateTime *aElement2,
                        void *aData)
@@ -196,17 +196,17 @@ calDateTimeComparator (calIDateTime *aEl
     return result;
 }
 
 void
 calRecurrenceDateSet::EnsureSorted()
 {
     if (!mSorted) {
         mDates.Sort(calDateTimeComparator, nsnull);
-        mSorted = PR_TRUE;
+        mSorted = true;
     }
 }
 
 NS_IMETHODIMP
 calRecurrenceDateSet::GetNextOccurrence(calIDateTime *aStartTime,
                                         calIDateTime *aOccurrenceTime,
                                         calIDateTime **_retval)
 {
--- a/calendar/base/src/calRecurrenceRule.cpp
+++ b/calendar/base/src/calRecurrenceRule.cpp
@@ -50,35 +50,35 @@
 #include "nsIClassInfoImpl.h"
 
 #include <climits>
 
 NS_IMPL_CLASSINFO(calRecurrenceRule, NULL, 0, CAL_RECURRENCERULE_CID)
 NS_IMPL_ISUPPORTS2_CI(calRecurrenceRule, calIRecurrenceItem, calIRecurrenceRule)
 
 calRecurrenceRule::calRecurrenceRule()
-    : mImmutable(PR_FALSE),
-      mIsNegative(PR_FALSE),
-      mIsByCount(PR_FALSE)
+    : mImmutable(false),
+      mIsNegative(false),
+      mIsByCount(false)
 {
     icalrecurrencetype_clear(&mIcalRecur);
 }
 
 NS_IMETHODIMP
 calRecurrenceRule::GetIsMutable(bool *aResult)
 {
     NS_ENSURE_ARG_POINTER(aResult);
     *aResult = !mImmutable;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calRecurrenceRule::MakeImmutable()
 {
-    mImmutable = PR_TRUE;
+    mImmutable = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calRecurrenceRule::Clone(calIRecurrenceItem **aResult)
 {
     calRecurrenceRule * const crc = new calRecurrenceRule();
     CAL_ENSURE_MEMORY(crc);
@@ -113,19 +113,19 @@ calRecurrenceRule::SetIsNegative(bool aI
 NS_IMETHODIMP
 calRecurrenceRule::GetIsFinite(bool *_retval)
 {
     NS_ENSURE_ARG_POINTER(_retval);
 
     if ((mIsByCount && mIcalRecur.count == 0) ||
         (!mIsByCount && icaltime_is_null_time(mIcalRecur.until)))
     {
-        *_retval = PR_FALSE;
+        *_retval = false;
     } else {
-        *_retval = PR_TRUE;
+        *_retval = true;
     }
     return NS_OK;
 }
 
 /* attribute long type; */
 NS_IMETHODIMP
 calRecurrenceRule::GetType(nsACString &aType)
 {
@@ -197,17 +197,17 @@ calRecurrenceRule::SetCount(PRInt32 aRec
             return NS_ERROR_ILLEGAL_VALUE;
         mIcalRecur.count = static_cast<int>(aRecurCount);
     } else {
         mIcalRecur.count = 0;
     }
 
     mIcalRecur.until = icaltime_null_time();
 
-    mIsByCount = PR_TRUE;
+    mIsByCount = true;
 
     return NS_OK;
 }
 
 /* attribute calIDateTime untilDate; */
 NS_IMETHODIMP
 calRecurrenceRule::GetUntilDate(calIDateTime * *aRecurEnd)
 {
@@ -245,17 +245,17 @@ calRecurrenceRule::SetUntilDate(calIDate
 
         mIcalRecur.until = itt;
     } else {
         mIcalRecur.until = icaltime_null_time();
     }
 
     mIcalRecur.count = 0;
 
-    mIsByCount = PR_FALSE;
+    mIsByCount = false;
 
     return NS_OK;
 }
 
 /* readonly attribute boolean isByCount; */
 NS_IMETHODIMP
 calRecurrenceRule::GetIsByCount (bool *aIsByCount)
 {
@@ -549,19 +549,19 @@ calRecurrenceRule::SetIcalProperty(calII
 
     if (mImmutable)
         return NS_ERROR_OBJECT_IS_IMMUTABLE;
 
     nsCAutoString propname;
     nsresult rv = aProp->GetPropertyName(propname);
     NS_ENSURE_SUCCESS(rv, rv);
     if (propname.EqualsLiteral("RRULE"))
-        mIsNegative = PR_FALSE;
+        mIsNegative = false;
     else if (propname.EqualsLiteral("EXRULE"))
-        mIsNegative = PR_TRUE;
+        mIsNegative = true;
     else
         return NS_ERROR_INVALID_ARG;
 
     icalproperty *prop;
     struct icalrecurrencetype icalrecur;
 
     prop = aProp->GetIcalProperty();
 
@@ -573,16 +573,16 @@ calRecurrenceRule::SetIcalProperty(calII
     // event that start at different times (e.g. every day starting on
     // jan 1 for 2 weeks, every other day starting on feb 1 for 2
     // weeks).  Neither the server nor the UI supports this now,
     // but we really ought to!
     //struct icaltimetype icaldtstart;
     //icaldtstrat = icalproperty_get_dtstart(prop);
 
     if (icalrecur.count != 0)
-        mIsByCount = PR_TRUE;
+        mIsByCount = true;
     else
-        mIsByCount = PR_FALSE;
+        mIsByCount = false;
 
     mIcalRecur = icalrecur;
 
     return NS_OK;
 }
--- a/calendar/base/src/calTimezone.cpp
+++ b/calendar/base/src/calTimezone.cpp
@@ -41,42 +41,42 @@
 NS_IMPL_ISUPPORTS1(calTimezone, calITimezone)
 
 CAL_ISUPPORTS_ATTR_GETTER(calTimezone, calIIcalComponent, IcalComponent)
 CAL_STRINGTYPE_ATTR_GETTER(calTimezone, nsACString, Tzid)
 
 NS_IMETHODIMP
 calTimezone::GetIsFloating(bool * _retval) {
     NS_ENSURE_ARG_POINTER(_retval);
-    *_retval = PR_FALSE;
+    *_retval = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calTimezone::GetIsUTC(bool * _retval) {
     NS_ENSURE_ARG_POINTER(_retval);
-    *_retval = PR_FALSE;
+    *_retval = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calTimezone::GetDisplayName(nsAString & _retval) {
     _retval = NS_ConvertUTF8toUTF16(mTzid);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calTimezone::GetLatitude(nsACString & _retval) {
-    _retval.SetIsVoid(PR_TRUE);
+    _retval.SetIsVoid(true);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calTimezone::GetLongitude(nsACString & _retval) {
-    _retval.SetIsVoid(PR_TRUE);
+    _retval.SetIsVoid(true);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 calTimezone::GetProvider(calITimezoneProvider ** _retval) {
     NS_ENSURE_ARG_POINTER(_retval);
     *_retval = nsnull;
     return NS_OK;
--- a/db/mork/src/morkBuilder.cpp
+++ b/db/mork/src/morkBuilder.cpp
@@ -847,17 +847,17 @@ morkBuilder::OnValue(morkEnv* ev, const 
   if ( cell )
   {
     mdbYarn yarn;
     yarn.mYarn_Buf = inBuf.mBuf_Body;
     yarn.mYarn_Fill = yarn.mYarn_Size = inBuf.mBuf_Fill;
     yarn.mYarn_More = 0;
     yarn.mYarn_Form = mBuilder_CellForm;
     yarn.mYarn_Grow = 0;
-    morkAtom* atom = store->YarnToAtom(ev, &yarn, PR_TRUE /* create */);
+    morkAtom* atom = store->YarnToAtom(ev, &yarn, true /* create */);
     cell->SetAtom(ev, atom, store->StorePool());
   }
   else if ( mParser_InMeta )
   {
     mork_token* metaSlot = mBuilder_MetaTokenSlot;
     if ( metaSlot )
     {
       if ( metaSlot == &mBuilder_TableStatus ) // table status?
--- a/db/mork/src/morkCell.cpp
+++ b/db/mork/src/morkCell.cpp
@@ -63,17 +63,17 @@
 #include "morkCell.h"
 #endif
 
 //3456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789
 
 void
 morkCell::SetYarn(morkEnv* ev, const mdbYarn* inYarn, morkStore* ioStore)
 {
-  morkAtom* atom = ioStore->YarnToAtom(ev, inYarn, PR_TRUE /* create */);
+  morkAtom* atom = ioStore->YarnToAtom(ev, inYarn, true /* create */);
   if ( atom )
     this->SetAtom(ev, atom, ioStore->StorePool()); // refcounts atom
 }
 
 void
 morkCell::GetYarn(morkEnv* ev, mdbYarn* outYarn) const
 {
   MORK_USED_1(ev);
--- a/db/mork/src/morkCellObject.cpp
+++ b/db/mork/src/morkCellObject.cpp
@@ -300,37 +300,37 @@ morkCellObject::CanUseCell(nsIMdbEnv* me
   
   return outEnv;
 }
 
 // { ----- begin attribute methods -----
 NS_IMETHODIMP morkCellObject::SetBlob(nsIMdbEnv* /* mev */,
   nsIMdbBlob* /* ioBlob */)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 } // reads inBlob slots
 
 // when inBlob is in the same suite, this might be fastest cell-to-cell
 
 NS_IMETHODIMP morkCellObject::ClearBlob( // make empty (so content has zero length)
   nsIMdbEnv*  /* mev */)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
   // remember row->MaybeDirtySpaceStoreAndRow();
 }
 // clearing a yarn is like SetYarn() with empty yarn instance content
 
 NS_IMETHODIMP morkCellObject::GetBlobFill(nsIMdbEnv* mev,
   mdb_fill* outFill)
 // Same value that would be put into mYarn_Fill, if one called GetYarn()
 // with a yarn instance that had mYarn_Buf==nil and mYarn_Size==0.
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }  // size of blob 
 
 NS_IMETHODIMP morkCellObject::SetYarn(nsIMdbEnv* mev, 
   const mdbYarn* inYarn)
 {
   mdb_err outErr = 0;
   morkCell* cell = 0;
@@ -398,17 +398,17 @@ NS_IMETHODIMP morkCellObject::AliasYarn(
 
 // } ===== end nsIMdbBlob methods =====
 
 // { ===== begin nsIMdbCell methods =====
 
 // { ----- begin attribute methods -----
 NS_IMETHODIMP morkCellObject::SetColumn(nsIMdbEnv* mev, mdb_column inColumn)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
   // remember row->MaybeDirtySpaceStoreAndRow();
 } 
 
 NS_IMETHODIMP morkCellObject::GetColumn(nsIMdbEnv* mev, mdb_column* outColumn)
 {
   mdb_err outErr = 0;
   mdb_column col = 0;
@@ -429,17 +429,17 @@ NS_IMETHODIMP morkCellObject::GetCellInf
   nsIMdbEnv* mev, 
   mdb_column* outColumn,           // the column in the containing row
   mdb_fill*   outBlobFill,         // the size of text content in bytes
   mdbOid*     outChildOid,         // oid of possible row or table child
   mdb_bool*   outIsRowChild)  // nonzero if child, and a row child
 // Checking all cell metainfo is a good way to avoid forcing a large cell
 // in to memory when you don't actually want to use the content.
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 
 NS_IMETHODIMP morkCellObject::GetRow(nsIMdbEnv* mev, // parent row for this cell
   nsIMdbRow** acqRow)
 {
   mdb_err outErr = 0;
@@ -516,52 +516,52 @@ NS_IMETHODIMP morkCellObject::HasAnyChil
   return outErr;
 }
 
 NS_IMETHODIMP morkCellObject::GetAnyChild( // access table of specific attribute
   nsIMdbEnv* mev, // context
   nsIMdbRow** acqRow, // child row (or null)
   nsIMdbTable** acqTable) // child table (or null)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 
 NS_IMETHODIMP morkCellObject::SetChildRow( // access table of specific attribute
   nsIMdbEnv* mev, // context
   nsIMdbRow* ioRow)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 } // inRow must be bound inside this same db port
 
 NS_IMETHODIMP morkCellObject::GetChildRow( // access row of specific attribute
   nsIMdbEnv* mev, // context
   nsIMdbRow** acqRow) // acquire child row (or nil if no child)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 
 NS_IMETHODIMP morkCellObject::SetChildTable( // access table of specific attribute
   nsIMdbEnv* mev, // context
   nsIMdbTable* inTable) // table must be bound inside this same db port
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
   // remember row->MaybeDirtySpaceStoreAndRow();
 }
 
 NS_IMETHODIMP morkCellObject::GetChildTable( // access table of specific attribute
   nsIMdbEnv* mev, // context
   nsIMdbTable** acqTable) // acquire child tabdle (or nil if no chil)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 // } ----- end children methods -----
 
 // } ===== end nsIMdbCell methods =====
 
 
 //3456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789
--- a/db/mork/src/morkCursor.cpp
+++ b/db/mork/src/morkCursor.cpp
@@ -170,49 +170,49 @@ morkCursor::IsFrozenMdbObject(nsIMdbEnv*
   return NS_OK;
 }
 // } ===== end morkNode methods =====
 // ````` ````` ````` ````` ````` 
 
 NS_IMETHODIMP
 morkCursor::GetCount(nsIMdbEnv* mev, mdb_count* outCount)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 morkCursor::GetSeed(nsIMdbEnv* mev, mdb_seed* outSeed)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 morkCursor::SetPos(nsIMdbEnv* mev, mdb_pos inPos)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 morkCursor::GetPos(nsIMdbEnv* mev, mdb_pos* outPos)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 morkCursor::SetDoFailOnSeedOutOfSync(nsIMdbEnv* mev, mdb_bool inFail)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 morkCursor::GetDoFailOnSeedOutOfSync(nsIMdbEnv* mev, mdb_bool* outFail)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 
 //3456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789
--- a/db/mork/src/morkFactory.cpp
+++ b/db/mork/src/morkFactory.cpp
@@ -320,27 +320,27 @@ morkFactory::MakeHeap(nsIMdbEnv* mev, ns
   return outErr;
 }
 // } ----- end heap methods -----
 
 // { ----- begin compare methods -----
 NS_IMETHODIMP
 morkFactory::MakeCompare(nsIMdbEnv* mev, nsIMdbCompare** acqCompare)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 // } ----- end compare methods -----
 
 // { ----- begin row methods -----
 NS_IMETHODIMP
 morkFactory::MakeRow(nsIMdbEnv* mev, nsIMdbHeap* ioHeap,
   nsIMdbRow** acqRow)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 // ioHeap can be nil, causing the heap associated with ev to be used
 // } ----- end row methods -----
 
 // { ----- begin port methods -----
 NS_IMETHODIMP
 morkFactory::CanOpenFilePort(
@@ -380,17 +380,17 @@ NS_IMETHODIMP
 morkFactory::OpenFilePort(
   nsIMdbEnv* mev, // context
   nsIMdbHeap* ioHeap, // can be nil to cause ev's heap attribute to be used
   // const char* inFilePath, // the file to open for readonly import
   nsIMdbFile* ioFile, // db abstract file interface
   const mdbOpenPolicy* inOpenPolicy, // runtime policies for using db
   nsIMdbThumb** acqThumb)
 {
-  NS_ASSERTION(PR_FALSE, "this doesn't look implemented");
+  NS_ASSERTION(false, "this doesn't look implemented");
   MORK_USED_1(ioHeap);
   mdb_err outErr = 0;
   nsIMdbThumb* outThumb = 0;
   morkEnv* ev = morkEnv::FromMdbEnv(mev);
    if ( ev )
   {
     if ( ioFile && inOpenPolicy && acqThumb )
     {
--- a/db/mork/src/morkPortTableCursor.cpp
+++ b/db/mork/src/morkPortTableCursor.cpp
@@ -346,17 +346,17 @@ morkPortTableCursor::NextTable(morkEnv* 
 // { ----- begin table iteration methods -----
 
 // { ===== begin nsIMdbPortTableCursor methods =====
 
 // { ----- begin attribute methods -----
 NS_IMETHODIMP
 morkPortTableCursor::SetPort(nsIMdbEnv* mev, nsIMdbPort* ioPort)
 {
-  NS_ASSERTION(PR_FALSE,"not implemented");
+  NS_ASSERTION(false,"not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 morkPortTableCursor::GetPort(nsIMdbEnv* mev, nsIMdbPort** acqPort)
 {
   mdb_err outErr = 0;
   nsIMdbPort* outPort = 0;
--- a/db/mork/src/morkRow.cpp
+++ b/db/mork/src/morkRow.cpp
@@ -885,17 +885,17 @@ void morkRow::AddColumn(morkEnv* ev, mdb
     morkCell* oldCell = cell; // need to know later whether new
     if ( !cell ) // column does not yet exist?
       cell = this->NewCell(ev, inColumn, &pos, ioStore);
     
     if ( cell )
     {
       morkAtom* oldAtom = cell->mCell_Atom;
 
-      morkAtom* atom = ioStore->YarnToAtom(ev, inYarn, PR_TRUE /* create */);
+      morkAtom* atom = ioStore->YarnToAtom(ev, inYarn, true /* create */);
       if ( atom && atom != oldAtom )
       {
         morkRowSpace* rowSpace = mRow_Space;
         morkAtomRowMap* map = ( rowSpace->mRowSpace_IndexCount )?
           rowSpace->FindMap(ev, inColumn) : (morkAtomRowMap*) 0;
         
         if ( map ) // inColumn is indexed by row space?
         {
--- a/db/mork/src/morkRowCellCursor.cpp
+++ b/db/mork/src/morkRowCellCursor.cpp
@@ -259,17 +259,17 @@ morkRowCellCursor::MakeCell( // get cell
 // { ----- begin cell seeking methods -----
 NS_IMETHODIMP
 morkRowCellCursor::SeekCell( // same as SetRow() followed by MakeCell()
   nsIMdbEnv* mev, // context
   mdb_pos inPos, // position of cell in row sequence
   mdb_column* outColumn, // column for this particular cell
   nsIMdbCell** acqCell)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 // } ----- end cell seeking methods -----
 
 // { ----- begin cell iteration methods -----
 NS_IMETHODIMP
 morkRowCellCursor::NextCell( // get next cell in the row
   nsIMdbEnv* mev, // context
@@ -311,16 +311,16 @@ morkRowCellCursor::PickNextCell( // get 
   nsIMdbCell* ioCell, // changes to the next cell in the iteration
   const mdbColumnSet* inFilterSet, // col set of actual caller interest
   mdb_column* outColumn, // column for this particular cell
   mdb_pos* outPos)
 // Note that inFilterSet should not have too many (many more than 10?)
 // cols, since this might imply a potential excessive consumption of time
 // over many cursor calls when looking for column and filter intersection.
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 // } ----- end cell iteration methods -----
 
 // } ===== end nsIMdbRowCellCursor methods =====
 
--- a/db/mork/src/morkRowObject.cpp
+++ b/db/mork/src/morkRowObject.cpp
@@ -197,28 +197,28 @@ morkRowObject::GetOid(nsIMdbEnv* mev,
   morkEnv* ev = morkEnv::FromMdbEnv(mev);
   return (ev) ? ev->AsErr() : NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 morkRowObject::BecomeContent(nsIMdbEnv* mev,
   const mdbOid* inOid)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
   // remember row->MaybeDirtySpaceStoreAndRow();
 }
 // } ----- end ID methods -----
 
 // { ----- begin activity dropping methods -----
 NS_IMETHODIMP
 morkRowObject::DropActivity( // tell collection usage no longer expected
   nsIMdbEnv* mev)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 // } ----- end activity dropping methods -----
 
 // } ===== end nsIMdbCollection methods =====
 
 // { ===== begin nsIMdbRow methods =====
 
--- a/db/mork/src/morkRowSpace.cpp
+++ b/db/mork/src/morkRowSpace.cpp
@@ -551,18 +551,18 @@ morkRowSpace::FindMap(morkEnv* ev, mork_
 }
 
 morkRow*
 morkRowSpace::FindRow(morkEnv* ev, mork_column inCol, const mdbYarn* inYarn)
 {
   morkRow* outRow = 0;
 
   // if yarn hasn't been atomized, there can't be a corresponding row,
-  // so pass in PR_FALSE to not create the row - should help history bloat
-  morkAtom* atom = mSpace_Store->YarnToAtom(ev, inYarn, PR_FALSE);
+  // so pass in false to not create the row - should help history bloat
+  morkAtom* atom = mSpace_Store->YarnToAtom(ev, inYarn, false);
   if ( atom ) // have or created an atom corresponding to input yarn?
   {
     mork_aid atomAid = atom->GetBookAtomAid();
     if ( atomAid ) // atom has an identity for use in hash table?
     {
       morkAtomRowMap* map = this->ForceMap(ev, inCol);
       if ( map ) // able to find or create index for col?
       {
--- a/db/mork/src/morkStore.cpp
+++ b/db/mork/src/morkStore.cpp
@@ -694,17 +694,17 @@ morkAtom*
 morkStore::CopyAtom(morkEnv* ev, const morkAtom* inAtom)
 // copy inAtom (from some other store) over to this store
 {
   morkAtom* outAtom = 0;
   if ( inAtom )
   {
     mdbYarn yarn;
     if ( inAtom->AliasYarn(&yarn) )
-      outAtom = this->YarnToAtom(ev, &yarn, PR_TRUE /* create */);
+      outAtom = this->YarnToAtom(ev, &yarn, true /* create */);
   }
   return outAtom;
 }
  
 morkAtom*
 morkStore::YarnToAtom(morkEnv* ev, const mdbYarn* inYarn, bool createIfMissing /* = true */)
 {
   morkAtom* outAtom = 0;
@@ -2060,37 +2060,37 @@ morkStore::NewTableWithOid( // make one 
 
 // { ----- begin row scope methods -----
 NS_IMETHODIMP
 morkStore::RowScopeHasAssignedIds(nsIMdbEnv* mev,
   mdb_scope inRowScope,   // row scope for row ids
   mdb_bool* outCallerAssigned, // nonzero if caller assigned specified
   mdb_bool* outStoreAssigned) // nonzero if store db assigned specified
 {
-  NS_ASSERTION(PR_FALSE, " not implemented");
+  NS_ASSERTION(false, " not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 morkStore::SetCallerAssignedIds(nsIMdbEnv* mev,
   mdb_scope inRowScope,   // row scope for row ids
   mdb_bool* outCallerAssigned, // nonzero if caller assigned specified
   mdb_bool* outStoreAssigned) // nonzero if store db assigned specified
 {
-  NS_ASSERTION(PR_FALSE, " not implemented");
+  NS_ASSERTION(false, " not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 morkStore::SetStoreAssignedIds(nsIMdbEnv* mev,
   mdb_scope inRowScope,   // row scope for row ids
   mdb_bool* outCallerAssigned, // nonzero if caller assigned specified
   mdb_bool* outStoreAssigned) // nonzero if store db assigned specified
 {
-  NS_ASSERTION(PR_FALSE, " not implemented");
+  NS_ASSERTION(false, " not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 // } ----- end row scope methods -----
 
 // { ----- begin row methods -----
 NS_IMETHODIMP
 morkStore::NewRowWithOid(nsIMdbEnv* mev, // new row w/ caller assigned oid
   const mdbOid* inOid,   // caller assigned oid
@@ -2141,29 +2141,29 @@ NS_IMETHODIMP
 morkStore::ImportContent( // import content from port
   nsIMdbEnv* mev, // context
   mdb_scope inRowScope, // scope for rows (or zero for all?)
   nsIMdbPort* ioPort, // the port with content to add to store
   nsIMdbThumb** acqThumb) // acquire thumb for incremental import
 // Call nsIMdbThumb::DoMore() until done, or until the thumb is broken, and
 // then the import will be finished.
 {
-  NS_ASSERTION(PR_FALSE, " not implemented");
+  NS_ASSERTION(false, " not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 morkStore::ImportFile( // import content from port
   nsIMdbEnv* mev, // context
   nsIMdbFile* ioFile, // the file with content to add to store
   nsIMdbThumb** acqThumb) // acquire thumb for incremental import
 // Call nsIMdbThumb::DoMore() until done, or until the thumb is broken, and
 // then the import will be finished.
 {
-  NS_ASSERTION(PR_FALSE, " not implemented");
+  NS_ASSERTION(false, " not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 // } ----- end inport/export methods -----
 
 // { ----- begin hinting methods -----
 NS_IMETHODIMP
 morkStore::ShareAtomColumnsHint( // advise re shared col content atomizing
   nsIMdbEnv* mev, // context
--- a/db/mork/src/morkTable.cpp
+++ b/db/mork/src/morkTable.cpp
@@ -259,29 +259,29 @@ morkTable::GetOid(nsIMdbEnv* mev,
   GetTableOid(ev, outOid);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 morkTable::BecomeContent(nsIMdbEnv* mev,
   const mdbOid* inOid) // exchange content
 {
-  NS_ASSERTION(PR_FALSE, "not implemented"); 
+  NS_ASSERTION(false, "not implemented"); 
   return NS_ERROR_NOT_IMPLEMENTED;
   // remember table->MaybeDirtySpaceStoreAndTable();
 }
 
 // } ----- end ID methods -----
 
 // { ----- begin activity dropping methods -----
 NS_IMETHODIMP
 morkTable::DropActivity( // tell collection usage no longer expected
   nsIMdbEnv* mev)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented"); 
+  NS_ASSERTION(false, "not implemented"); 
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 // } ----- end activity dropping methods -----
 
 // } ===== end nsIMdbCollection methods =====
 
 // { ===== begin nsIMdbTable methods =====
@@ -564,17 +564,17 @@ morkTable::RowToPos( // test for the tab
 // } ----- end row position methods -----
 
 // { ----- begin oid set methods -----
 NS_IMETHODIMP
 morkTable::AddOid( // make sure the row with inOid is a table member 
   nsIMdbEnv* mev, // context
   const mdbOid* inOid) // row to ensure membership in table
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 morkTable::HasOid( // test for the table position of a row member
   nsIMdbEnv* mev, // context
   const mdbOid* inOid, // row to find in table
   mdb_bool* outHasOid) // whether inOid is a member row
@@ -718,17 +718,17 @@ morkTable::CutAllRows( // remove all row
 
 // { ----- begin searching methods -----
 NS_IMETHODIMP
 morkTable::FindRowMatches( // search variable number of sorted cols
   nsIMdbEnv* mev, // context
   const mdbYarn* inPrefix, // content to find as prefix in row's column cell
   nsIMdbTableRowCursor** acqCursor) // set of matching rows
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
   
 NS_IMETHODIMP
 morkTable::GetSearchColumns( // query columns used by FindRowMatches()
   nsIMdbEnv* mev, // context
   mdb_count* outCount, // context
   mdbColumnSet* outColSet) // caller supplied space to put columns
@@ -740,37 +740,37 @@ morkTable::GetSearchColumns( // query co
   // the outCount parameter; if this number exceeds mColumnSet_Count,
   // then a caller needs a bigger array to read the entire column set.
   // The minimum of mColumnSet_Count and outCount is the number slots
   // in mColumnSet_Columns that were actually written by this method.
   //
   // Callers are expected to change this set of columns by calls to
   // nsIMdbTable::SearchColumnsHint() or SetSearchSorting(), or both.
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 // } ----- end searching methods -----
 
 // { ----- begin hinting methods -----
 NS_IMETHODIMP
 morkTable::SearchColumnsHint( // advise re future expected search cols  
   nsIMdbEnv* mev, // context
   const mdbColumnSet* inColumnSet) // columns likely to be searched
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
   
 NS_IMETHODIMP
 morkTable::SortColumnsHint( // advise re future expected sort columns  
   nsIMdbEnv* mev, // context
   const mdbColumnSet* inColumnSet) // columns for likely sort requests
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 morkTable::StartBatchChangeHint( // advise before many adds and cuts  
   nsIMdbEnv* mev, // context
   const void* inLabel) // intend unique address to match end call
   // If batch starts nest by virtue of nesting calls in the stack, then
@@ -805,27 +805,27 @@ morkTable::EndBatchChangeHint( // advise
 // sort following the primary column sort, when table rows are sorted.
 
 NS_IMETHODIMP
 morkTable::CanSortColumn( // query which column is currently used for sorting
   nsIMdbEnv* mev, // context
   mdb_column inColumn, // column to query sorting potential
   mdb_bool* outCanSort) // whether the column can be sorted
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 morkTable::GetSorting( // view same table in particular sorting
   nsIMdbEnv* mev, // context
   mdb_column inColumn, // requested new column for sorting table
   nsIMdbSorting** acqSorting) // acquire sorting for column
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 morkTable::SetSearchSorting( // use this sorting in FindRowMatches()
   nsIMdbEnv* mev, // context
   mdb_column inColumn, // often same as nsIMdbSorting::GetSortColumn()
   nsIMdbSorting* ioSorting) // requested sorting for some column
@@ -847,17 +847,17 @@ morkTable::SetSearchSorting( // use this
   // column inColumn no longer be used at all by FindRowMatches().
   // But when ioSorting is non-nil, then inColumn should match the
   // column actually sorted by ioSorting; when these do not agree,
   // implementations are instructed to give precedence to the column
   // specified by ioSorting (so this means callers might just pass
   // zero for inColumn when ioSorting is also provided, since then
   // inColumn is both redundant and ignored).
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 // } ----- end sorting methods -----
 
 // { ----- begin moving methods -----
 // moving a row does nothing unless a table is currently unsorted
 
@@ -918,67 +918,67 @@ morkTable::MoveRow( // change position o
 NS_IMETHODIMP
 morkTable::AddIndex( // create a sorting index for column if possible
   nsIMdbEnv* mev, // context
   mdb_column inColumn, // the column to sort by index
   nsIMdbThumb** acqThumb) // acquire thumb for incremental index building
 // Call nsIMdbThumb::DoMore() until done, or until the thumb is broken, and
 // then the index addition will be finished.
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 morkTable::CutIndex( // stop supporting a specific column index
   nsIMdbEnv* mev, // context
   mdb_column inColumn, // the column with index to be removed
   nsIMdbThumb** acqThumb) // acquire thumb for incremental index destroy
 // Call nsIMdbThumb::DoMore() until done, or until the thumb is broken, and
 // then the index removal will be finished.
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 morkTable::HasIndex( // query for current presence of a column index
   nsIMdbEnv* mev, // context
   mdb_column inColumn, // the column to investigate
   mdb_bool* outHasIndex) // whether column has index for this column
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 morkTable::EnableIndexOnSort( // create an index for col on first sort
   nsIMdbEnv* mev, // context
   mdb_column inColumn) // the column to index if ever sorted
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 morkTable::QueryIndexOnSort( // check whether index on sort is enabled
   nsIMdbEnv* mev, // context
   mdb_column inColumn, // the column to investigate
   mdb_bool* outIndexOnSort) // whether column has index-on-sort enabled
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 morkTable::DisableIndexOnSort( // prevent future index creation on sort
   nsIMdbEnv* mev, // context
   mdb_column inColumn) // the column to index if ever sorted
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 // } ----- end index methods -----
 
 // } ===== end nsIMdbTable methods =====
 
 // we override these so that we'll use the xpcom add and release ref.
 mork_refs
--- a/db/mork/src/morkTableRowCursor.cpp
+++ b/db/mork/src/morkTableRowCursor.cpp
@@ -155,17 +155,17 @@ morkTableRowCursor::GetCount(nsIMdbEnv* 
   if ( outCount )
     *outCount = count;
   return outErr;
 }
 
 /*virtual*/ mdb_err
 morkTableRowCursor::GetSeed(nsIMdbEnv* mev, mdb_seed* outSeed)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 /*virtual*/ mdb_err
 morkTableRowCursor::SetPos(nsIMdbEnv* mev, mdb_pos inPos)
 {
   mCursor_Pos = inPos;
   return NS_OK;
--- a/ldap/xpcom/src/nsLDAPConnection.cpp
+++ b/ldap/xpcom/src/nsLDAPConnection.cpp
@@ -66,17 +66,17 @@
 
 const char kConsoleServiceContractId[] = "@mozilla.org/consoleservice;1";
 const char kDNSServiceContractId[] = "@mozilla.org/network/dns-service;1";
 
 // constructor
 //
 nsLDAPConnection::nsLDAPConnection()
     : mConnectionHandle(0),
-      mSSL(PR_FALSE),
+      mSSL(false),
       mVersion(nsILDAPConnection::VERSION3),
       mDNSRequest(0)
 {
 }
 
 // destructor
 //
 nsLDAPConnection::~nsLDAPConnection()
@@ -113,17 +113,17 @@ nsLDAPConnection::Init(nsILDAPURL *aUrl,
   NS_ENSURE_ARG_POINTER(aUrl);
   NS_ENSURE_ARG_POINTER(aMessageListener);
 
   nsresult rv;
   nsCOMPtr<nsIObserverService> obsServ =
         do_GetService(NS_OBSERVERSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   // We have to abort all LDAP pending operation before shutdown.
-  obsServ->AddObserver(this, "profile-change-net-teardown", PR_TRUE);
+  obsServ->AddObserver(this, "profile-change-net-teardown", true);
 
   // Save various items that we'll use later
   mBindName.Assign(aBindName);
   mClosure = aClosure;
   mInitListener = aMessageListener;
 
   // Make sure we haven't called Init earlier, i.e. there's a DNS
   // request pending.
@@ -701,17 +701,17 @@ NS_IMETHODIMP nsLDAPConnectionRunnable::
       return thread->Dispatch(this, nsIEventTarget::DISPATCH_NORMAL);
     case -1:
       NS_ERROR("We don't know what went wrong with the ldap operation");
       return NS_ERROR_FAILURE;
 
     case LDAP_RES_SEARCH_ENTRY:
     case LDAP_RES_SEARCH_REFERENCE:
       // XXX what should we do with LDAP_RES_SEARCH_EXTENDED
-      operationFinished = PR_FALSE;
+      operationFinished = false;
     default:
     {
       msg = new nsLDAPMessage;
       if (!msg)
         return NS_ERROR_NULL_POINTER;
 
       // initialize the message, using a protected method not available
       // through nsILDAPMessage (which is why we need the raw pointer)
--- a/ldap/xpcom/src/nsLDAPControl.cpp
+++ b/ldap/xpcom/src/nsLDAPControl.cpp
@@ -40,17 +40,17 @@
 #include "nsLDAPControl.h"
 #include "prmem.h"
 #include "plstr.h"
 #include "nsLDAPBERValue.h"
 
 NS_IMPL_ISUPPORTS1(nsLDAPControl, nsILDAPControl)
 
 nsLDAPControl::nsLDAPControl()
-  : mIsCritical(PR_FALSE)
+  : mIsCritical(false)
 {
 }
 
 nsLDAPControl::~nsLDAPControl()
 {
 }
 
 /* attribute ACString oid; */
--- a/ldap/xpcom/src/nsLDAPMessage.cpp
+++ b/ldap/xpcom/src/nsLDAPMessage.cpp
@@ -317,24 +317,24 @@ nsLDAPMessage::IterateAttrErrHandler(PRI
 }
 
 
 // wrapper for ldap_first_attribute 
 //
 NS_IMETHODIMP
 nsLDAPMessage::GetAttributes(PRUint32 *aAttrCount, char** *aAttributes)
 {
-    return IterateAttributes(aAttrCount, aAttributes, PR_TRUE);
+    return IterateAttributes(aAttrCount, aAttributes, true);
 }
 
-// if getP is PR_TRUE, we get the attributes by recursing once
+// if getP is true, we get the attributes by recursing once
 // (without getP set) in order to fill in *attrCount, then allocate
 // and fill in the *aAttributes.  
 // 
-// if getP is PR_FALSE, just fill in *attrCount and return
+// if getP is false, just fill in *attrCount and return
 // 
 nsresult
 nsLDAPMessage::IterateAttributes(PRUint32 *aAttrCount, char** *aAttributes, 
                  bool getP)
 {
     BerElement *position;
     nsresult rv;
 
@@ -344,17 +344,17 @@ nsLDAPMessage::IterateAttributes(PRUint3
 
     // if we've been called from GetAttributes, recurse once in order to
     // count the elements in this message.
     //
     if (getP) {
         *aAttributes = 0;
         *aAttrCount = 0;
 
-        rv = IterateAttributes(aAttrCount, aAttributes, PR_FALSE);
+        rv = IterateAttributes(aAttrCount, aAttributes, false);
         if (NS_FAILED(rv))
             return rv;
 
         // create an array of the appropriate size
         //
         *aAttributes = static_cast<char **>(nsMemory::Alloc(*aAttrCount *
                                                       sizeof(char *)));
         if (!*aAttributes) {
--- a/ldap/xpcom/src/nsLDAPModification.cpp
+++ b/ldap/xpcom/src/nsLDAPModification.cpp
@@ -135,17 +135,17 @@ nsLDAPModification::SetValues(nsIArray* 
 
   nsCOMPtr<nsISupports> value;
 
   while (hasMoreElements)
   {
     rv = enumerator->GetNext(getter_AddRefs(value));
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = mValues->AppendElement(value, PR_FALSE);
+    rv = mValues->AppendElement(value, false);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = enumerator->HasMoreElements(&hasMoreElements);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   return NS_OK;
 }
@@ -183,10 +183,10 @@ nsLDAPModification::SetUpModificationOne
 
   if (!mValues)
     mValues = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
   else
     rv = mValues->Clear();
 
   NS_ENSURE_SUCCESS(rv, rv);
   
-  return mValues->AppendElement(aValue, PR_FALSE);
+  return mValues->AppendElement(aValue, false);
 }
--- a/ldap/xpcom/src/nsLDAPService.cpp
+++ b/ldap/xpcom/src/nsLDAPService.cpp
@@ -60,28 +60,28 @@ static NS_DEFINE_CID(kLDAPOperationCID, 
 // First we provide all the methods for the "local" class
 // nsLDAPServiceEntry.
 //
 
 // constructor
 //
 nsLDAPServiceEntry::nsLDAPServiceEntry()
     : mLeases(0),
-      mDelete(PR_FALSE),
-      mRebinding(PR_FALSE)
+      mDelete(false),
+      mRebinding(false)
 
 {
     mTimestamp = LL_Zero();
 }
 
 // Init function
 //
 bool nsLDAPServiceEntry::Init()
 {
-    return PR_TRUE;
+    return true;
 }
 
 // Set/Get the timestamp when this server was last used. We might have
 // to use an "interval" here instead, see Bug #76887.
 //
 PRTime nsLDAPServiceEntry::GetTimestamp()
 {
     return mTimestamp;
@@ -97,21 +97,21 @@ void nsLDAPServiceEntry::SetTimestamp()
 //
 void nsLDAPServiceEntry::IncrementLeases()
 {
     mLeases++;
 }
 bool nsLDAPServiceEntry::DecrementLeases()
 {
     if (!mLeases) {
-        return PR_FALSE;
+        return false;
     }
     mLeases--;
 
-    return PR_TRUE;
+    return true;
 }
 PRUint32 nsLDAPServiceEntry::GetLeases()
 {
     return mLeases;
 }
 
 // Get/Set the nsLDAPServer object for this entry.
 //
@@ -120,21 +120,21 @@ already_AddRefed<nsILDAPServer> nsLDAPSe
     nsILDAPServer *server;
 
     NS_IF_ADDREF(server = mServer);
     return server;
 }
 bool nsLDAPServiceEntry::SetServer(nsILDAPServer *aServer)
 {
     if (!aServer) {
-        return PR_FALSE;
+        return false;
     }
     mServer = aServer;
 
-    return PR_TRUE;
+    return true;
 }
 
 // Get/Set/Clear the nsLDAPConnection object for this entry.
 //
 already_AddRefed<nsILDAPConnection> nsLDAPServiceEntry::GetConnection()
 {
     nsILDAPConnection *conn;
 
@@ -200,19 +200,19 @@ void nsLDAPServiceEntry::SetRebinding(bo
     mRebinding = aState;
 }
 
 // Mark a service entry for deletion, this is "dead" code right now,
 // see bug #75966.
 //
 bool nsLDAPServiceEntry::DeleteEntry()
 {
-    mDelete = PR_TRUE;
+    mDelete = true;
 
-    return PR_TRUE;
+    return true;
 }
 // This is the end of the nsLDAPServiceEntry class
 
 
 // Here begins the implementation for nsLDAPService
 // 
 NS_IMPL_THREADSAFE_ISUPPORTS2(nsLDAPService,
                               nsILDAPService,
@@ -506,30 +506,30 @@ NS_IMETHODIMP nsLDAPService::ReconnectCo
         // we be marked as finished either if there's an error condition,
         // or if the OnLDAPMessage() method gets called (i.e. bind() done).
         //
         entry->SetMessage(0);
         entry->SetConnection(0);
 
         // Get a new connection
         //
-        entry->SetRebinding(PR_TRUE);
+        entry->SetRebinding(true);
     }
 
     rv = EstablishConnection(entry, aListener);
     if (NS_FAILED(rv)) {
         return rv;
     }
 
     {
         MutexAutoLock lock(mLock);
         
         if (!entry->PushListener(static_cast<nsILDAPMessageListener *>
                                             (aListener))) {
-            entry->SetRebinding(PR_FALSE);
+            entry->SetRebinding(false);
             return NS_ERROR_FAILURE;
         }
     }
 
     return NS_OK;
 }
 
 /**
@@ -593,17 +593,17 @@ nsLDAPService::OnLDAPMessage(nsILDAPMess
 
             message = entry->GetMessage();
             if (message) {
                 // We already have a message, lets keep that one.
                 //
                 return NS_ERROR_FAILURE;
             }
 
-            entry->SetRebinding(PR_FALSE);
+            entry->SetRebinding(false);
             entry->SetMessage(aMessage);
 
             // Now process all the pending callbacks/listeners. We
             // have to make sure to unlock before calling a listener,
             // since it's likely to call back into us again.
             //
             while (listener = entry->PopListener()) {
                 MutexAutoUnlock unlock(mLock);
--- a/ldap/xpcom/src/nsLDAPSyncQuery.cpp
+++ b/ldap/xpcom/src/nsLDAPSyncQuery.cpp
@@ -48,17 +48,17 @@
 
 // nsISupports Implementation
 
 NS_IMPL_THREADSAFE_ISUPPORTS2(nsLDAPSyncQuery, nsILDAPSyncQuery, nsILDAPMessageListener)
 
 // Constructor
 //
 nsLDAPSyncQuery::nsLDAPSyncQuery() :
-    mFinished(PR_FALSE), // This is a control variable for event loop
+    mFinished(false), // This is a control variable for event loop
     mProtocolVersion(nsILDAPConnection::VERSION3)
 {
 }
 
 // Destructor
 //
 nsLDAPSyncQuery::~nsLDAPSyncQuery()
 {
@@ -355,17 +355,17 @@ nsresult nsLDAPSyncQuery::InitConnection
 }
 
 void
 nsLDAPSyncQuery::FinishLDAPQuery()
 {
     // We are done with the LDAP operation. 
     // Release the Control variable for the eventloop
     //
-    mFinished = PR_TRUE;
+    mFinished = true;
     
     // Release member variables
     //
     mConnection = 0;
     mOperation = 0;
     mServerURL = 0;
  
 }
--- a/ldap/xpcom/src/nsLDAPURL.cpp
+++ b/ldap/xpcom/src/nsLDAPURL.cpp
@@ -372,17 +372,17 @@ NS_IMETHODIMP nsLDAPURL::GetOriginCharse
 
   return mBaseURL->GetOriginCharset(result);
 }
 
 // boolean equals (in nsIURI other)
 // (based on nsSimpleURI::Equals)
 NS_IMETHODIMP nsLDAPURL::Equals(nsIURI *other, bool *_retval)
 {
-  *_retval = PR_FALSE;
+  *_retval = false;
   if (other)
   {
     nsresult rv;
     nsCOMPtr<nsILDAPURL> otherURL(do_QueryInterface(other, &rv));
     if (NS_SUCCEEDED(rv))
     {
       nsCAutoString thisSpec, otherSpec;
       PRUint32 otherOptions;
@@ -392,17 +392,17 @@ NS_IMETHODIMP nsLDAPURL::Equals(nsIURI *
 
       rv = otherURL->GetSpec(otherSpec);
       NS_ENSURE_SUCCESS(rv, rv);
 
       rv = otherURL->GetOptions(&otherOptions);
       NS_ENSURE_SUCCESS(rv, rv);
 
       if (thisSpec == otherSpec && mOptions == otherOptions)
-        *_retval = PR_TRUE;
+        *_retval = true;
     }
   }
   return NS_OK;
 }
 
 // boolean schemeIs(in const char * scheme);
 //
 NS_IMETHODIMP nsLDAPURL::SchemeIs(const char *aScheme, bool *aEquals)
--- a/ldap/xpcom/src/nsLDAPUtils.h
+++ b/ldap/xpcom/src/nsLDAPUtils.h
@@ -118,59 +118,59 @@ bool IsUTF8(const nsACString& aString)
     if (0 == state) {
 
       c = *ptr++;
 
       if ((c & 0x80) == 0x00)
         continue;
 
       if ( c <= 0xC1 ) // [80-BF] where not expected, [C0-C1] for overlong.
-        return PR_FALSE;
+        return false;
       else if ((c & 0xE0) == 0xC0)
         state = 1;
       else if ((c & 0xF0) == 0xE0) {
         state = 2;
         if ( c == 0xE0 ) { // to exclude E0[80-9F][80-BF]
-          overlong = PR_TRUE;
+          overlong = true;
           olupper = 0x9F;
         } else if ( c == 0xED ) { // ED[A0-BF][80-BF] : surrogate codepoint
-          surrogate = PR_TRUE;
+          surrogate = true;
           slower = 0xA0;
         } else if ( c == 0xEF ) // EF BF [BE-BF] : non-character
-          nonchar = PR_TRUE;
+          nonchar = true;
       } else if ( c <= 0xF4 ) { // XXX replace /w UTF8traits::is4byte when it's updated to exclude [F5-F7].(bug 199090)
         state = 3;
-        nonchar = PR_TRUE;
+        nonchar = true;
         if ( c == 0xF0 ) { // to exclude F0[80-8F][80-BF]{2}
-          overlong = PR_TRUE;
+          overlong = true;
           olupper = 0x8F;
         }
         else if ( c == 0xF4 ) { // to exclude F4[90-BF][80-BF]
           // actually not surrogates but codepoints beyond 0x10FFFF
-          surrogate = PR_TRUE;
+          surrogate = true;
           slower = 0x90;
         }
       } else
-        return PR_FALSE; // Not UTF-8 string
+        return false; // Not UTF-8 string
     }
 
     while (ptr < done_reading && state) {
       c = *ptr++;
       --state;
 
       // non-character : EF BF [BE-BF] or F[0-7] [89AB]F BF [BE-BF]
       if ( nonchar &&  ( !state &&  c < 0xBE ||
            state == 1 && c != 0xBF  ||
            state == 2 && 0x0F != (0x0F & c) ))
-        nonchar = PR_FALSE;
+        nonchar = false;
 
       if ((c & 0xC0) != 0x80 || overlong && c <= olupper ||
            surrogate && slower <= c || nonchar && !state )
-        return PR_FALSE; // Not UTF-8 string
-      overlong = surrogate = PR_FALSE;
+        return false; // Not UTF-8 string
+      overlong = surrogate = false;
     }
   }
   return !state; // state != 0 at the end indicates an invalid UTF-8 seq.
 }
 
 #define kNotFound -1
 
 #define nsCaseInsensitiveCStringComparator() \
--- a/mail/app/nsMailApp.cpp
+++ b/mail/app/nsMailApp.cpp
@@ -116,20 +116,20 @@ static const nsDynamicFunctionLoad kXULF
 };
 
 static int do_main(const char *exePath, int argc, char* argv[])
 {
   nsCOMPtr<nsILocalFile> appini;
 #ifdef XP_WIN
   // exePath comes from mozilla::BinaryPath::Get, which returns a UTF-8
   // encoded path, so it is safe to convert it
-  nsresult rv = NS_NewLocalFile(NS_ConvertUTF8toUTF16(exePath), PR_FALSE,
+  nsresult rv = NS_NewLocalFile(NS_ConvertUTF8toUTF16(exePath), false,
                                 getter_AddRefs(appini));
 #else
-  nsresult rv = NS_NewNativeLocalFile(nsDependentCString(exePath), PR_FALSE,
+  nsresult rv = NS_NewNativeLocalFile(nsDependentCString(exePath), false,
                                       getter_AddRefs(appini));
 #endif
   if (NS_FAILED(rv)) {
     return 255;
   }
 
   appini->SetNativeLeafName(NS_LITERAL_CSTRING("application.ini"));
 
--- a/mail/components/migration/src/nsEudoraProfileMigrator.cpp
+++ b/mail/components/migration/src/nsEudoraProfileMigrator.cpp
@@ -51,17 +51,17 @@
 #include "nsIFile.h"
 
 
 NS_IMPL_ISUPPORTS2(nsEudoraProfileMigrator, nsIMailProfileMigrator, nsITimerCallback)
 
 
 nsEudoraProfileMigrator::nsEudoraProfileMigrator()
 {
-  mProcessingMailFolders = PR_FALSE;
+  mProcessingMailFolders = false;
   // get the import service
   mImportModule = do_CreateInstance("@mozilla.org/import/import-eudora;1");
 }
 
 nsEudoraProfileMigrator::~nsEudoraProfileMigrator()
 {
 }
 
@@ -135,17 +135,17 @@ nsEudoraProfileMigrator::GetMigrateData(
   *aResult = nsIMailProfileMigrator::ACCOUNT_SETTINGS | nsIMailProfileMigrator::ADDRESSBOOK_DATA |
              nsIMailProfileMigrator::MAILDATA | nsIMailProfileMigrator::FILTERS;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsEudoraProfileMigrator::GetSourceExists(bool* aResult)
 {
-  *aResult = PR_FALSE;
+  *aResult = false;
 
   nsCOMPtr<nsIImportSettings> importSettings;
   mImportModule->GetImportInterface(NS_IMPORT_SETTINGS_STR, getter_AddRefs(importSettings));
 
   if (importSettings)
   {
     nsString description;
     nsCOMPtr<nsIFile> location;
@@ -153,17 +153,17 @@ nsEudoraProfileMigrator::GetSourceExists
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsEudoraProfileMigrator::GetSourceHasMultipleProfiles(bool* aResult)
 {
-  *aResult = PR_FALSE;
+  *aResult = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsEudoraProfileMigrator::GetSourceProfiles(nsIArray** aResult)
 {
   *aResult = nsnull;
   return NS_OK;
--- a/mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp
+++ b/mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp
@@ -98,17 +98,17 @@ nsNetscapeProfileMigratorBase::GetProfil
   rv = parser.Init(profileIni);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCAutoString buffer, filePath;
   bool isRelative;
 
   // This is an infinite loop that is broken when we no longer find profiles
   // for profileID with IsRelative option.
-  for (unsigned int c = 0; PR_TRUE; ++c) {
+  for (unsigned int c = 0; true; ++c) {
     nsCAutoString profileID("Profile");
     profileID.AppendInt(c);
 
     if (NS_FAILED(parser.GetString(profileID.get(), "IsRelative", buffer)))
       break;
 
     isRelative = buffer.EqualsLiteral("1");
 
@@ -120,44 +120,44 @@ nsNetscapeProfileMigratorBase::GetProfil
 
     rv = parser.GetString(profileID.get(), "Name", buffer);
     if (NS_FAILED(rv)) {
       NS_ERROR("Malformed profiles.ini: Name= not found");
       continue;
     }
 
     nsCOMPtr<nsILocalFile> rootDir;
-    rv = NS_NewNativeLocalFile(EmptyCString(), PR_TRUE, getter_AddRefs(rootDir));
+    rv = NS_NewNativeLocalFile(EmptyCString(), true, getter_AddRefs(rootDir));
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = isRelative ? rootDir->SetRelativeDescriptor(aDataDir, filePath) :
                       rootDir->SetPersistentDescriptor(filePath);
     if (NS_FAILED(rv))
       continue;
 
     bool exists = false;
     rootDir->Exists(&exists);
 
     if (exists) {
-      aProfileLocations->AppendElement(rootDir, PR_FALSE);
+      aProfileLocations->AppendElement(rootDir, false);
 
       nsCOMPtr<nsISupportsString> profileNameString(
         do_CreateInstance("@mozilla.org/supports-string;1"));
 
       profileNameString->SetData(NS_ConvertUTF8toUTF16(buffer));
-      aProfileNames->AppendElement(profileNameString, PR_FALSE);
+      aProfileNames->AppendElement(profileNameString, false);
     }
   }
   return NS_OK;
 }
 
 #define GETPREF(xform, method, value) \
   nsresult rv = aBranch->method(xform->sourcePrefName, value); \
   if (NS_SUCCEEDED(rv)) \
-    xform->prefHasValue = PR_TRUE; \
+    xform->prefHasValue = true; \
   return rv;
 
 #define SETPREF(xform, method, value) \
   if (xform->prefHasValue) { \
     return aBranch->method(xform->targetPrefName ? xform->targetPrefName : xform->sourcePrefName, value); \
   } \
   return NS_OK;
 
@@ -222,17 +222,17 @@ nsNetscapeProfileMigratorBase::CopyFile(
     return NS_OK;
 
   nsCOMPtr<nsIFile> targetFile;
   mTargetProfile->Clone(getter_AddRefs(targetFile));
 
   targetFile->Append(aTargetFileName);
   targetFile->Exists(&exists);
   if (exists)
-    targetFile->Remove(PR_FALSE);
+    targetFile->Remove(false);
 
   return sourceFile->CopyTo(mTargetProfile, aTargetFileName);
 }
 
 nsresult
 nsNetscapeProfileMigratorBase::GetSignonFileName(bool aReplace, char** aFileName)
 {
   nsresult rv;
@@ -442,29 +442,29 @@ nsNetscapeProfileMigratorBase::GetSource
   GetSourceProfiles(getter_AddRefs(profiles));
 
   if (profiles) {
     PRUint32 count;
     profiles->GetLength(&count);
     *aResult = count > 1;
   }
   else
-    *aResult = PR_FALSE;
+    *aResult = false;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNetscapeProfileMigratorBase::GetSourceExists(bool* aResult)
 {
   nsCOMPtr<nsIArray> profiles;
   GetSourceProfiles(getter_AddRefs(profiles));
 
   if (profiles) {
     PRUint32 count;
     profiles->GetLength(&count);
     *aResult = count > 0;
   }
   else
-    *aResult = PR_FALSE;
+    *aResult = false;
 
   return NS_OK;
 }
--- a/mail/components/migration/src/nsNetscapeProfileMigratorBase.h
+++ b/mail/components/migration/src/nsNetscapeProfileMigratorBase.h
@@ -54,20 +54,20 @@ struct fileTransactionEntry {
   nsCOMPtr<nsIFile> srcFile;  // the src path including leaf name
   nsCOMPtr<nsIFile> destFile; // the destination path
   nsString newName; // only valid if the file should be renamed after getting copied
 };
 
 #define F(a) nsNetscapeProfileMigratorBase::a
 
 #define MAKEPREFTRANSFORM(pref, newpref, getmethod, setmethod) \
-  { pref, newpref, F(Get##getmethod), F(Set##setmethod), PR_FALSE, { -1 } }
+  { pref, newpref, F(Get##getmethod), F(Set##setmethod), false, { -1 } }
 
 #define MAKESAMETYPEPREFTRANSFORM(pref, method) \
-  { pref, 0, F(Get##method), F(Set##method), PR_FALSE, { -1 } }
+  { pref, 0, F(Get##method), F(Set##method), false, { -1 } }
 
 class nsNetscapeProfileMigratorBase : public nsIMailProfileMigrator,
                                       public nsITimerCallback
                                       
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSITIMERCALLBACK
--- a/mail/components/migration/src/nsOEProfileMigrator.cpp
+++ b/mail/components/migration/src/nsOEProfileMigrator.cpp
@@ -46,17 +46,17 @@
 #include "nsIFile.h"
 
 
 NS_IMPL_ISUPPORTS2(nsOEProfileMigrator, nsIMailProfileMigrator, nsITimerCallback)
 
 
 nsOEProfileMigrator::nsOEProfileMigrator()
 {
-  mProcessingMailFolders = PR_FALSE;
+  mProcessingMailFolders = false;
   // get the import service
   mImportModule = do_CreateInstance("@mozilla.org/import/import-oe;1");
 }
 
 nsOEProfileMigrator::~nsOEProfileMigrator()
 {
 
 }
@@ -131,17 +131,17 @@ nsOEProfileMigrator::GetMigrateData(cons
   *aResult = nsIMailProfileMigrator::ACCOUNT_SETTINGS | nsIMailProfileMigrator::ADDRESSBOOK_DATA |
              nsIMailProfileMigrator::MAILDATA;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsOEProfileMigrator::GetSourceExists(bool* aResult)
 {
-  *aResult = PR_FALSE;
+  *aResult = false;
 
   nsCOMPtr<nsIImportSettings> importSettings;
   mImportModule->GetImportInterface(NS_IMPORT_SETTINGS_STR, getter_AddRefs(importSettings));
 
   if (importSettings)
   {
     nsString description;
     nsCOMPtr<nsIFile> location;
@@ -149,17 +149,17 @@ nsOEProfileMigrator::GetSourceExists(boo
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsOEProfileMigrator::GetSourceHasMultipleProfiles(bool* aResult)
 {
-  *aResult = PR_FALSE;
+  *aResult = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsOEProfileMigrator::GetSourceProfiles(nsIArray** aResult)
 {
   *aResult = nsnull;
   return NS_OK;
--- a/mail/components/migration/src/nsOutlookProfileMigrator.cpp
+++ b/mail/components/migration/src/nsOutlookProfileMigrator.cpp
@@ -42,17 +42,17 @@
 #include "nsIImportSettings.h"
 #include "nsIFile.h"
 
 NS_IMPL_ISUPPORTS2(nsOutlookProfileMigrator, nsIMailProfileMigrator, nsITimerCallback)
 
 
 nsOutlookProfileMigrator::nsOutlookProfileMigrator()
 {
-  mProcessingMailFolders = PR_FALSE;
+  mProcessingMailFolders = false;
   // get the import service
   mImportModule = do_CreateInstance("@mozilla.org/import/import-outlook;1");
 }
 
 nsOutlookProfileMigrator::~nsOutlookProfileMigrator()
 {
 }
 
@@ -125,17 +125,17 @@ nsOutlookProfileMigrator::GetMigrateData
   *aResult = nsIMailProfileMigrator::ACCOUNT_SETTINGS | nsIMailProfileMigrator::ADDRESSBOOK_DATA |
              nsIMailProfileMigrator::MAILDATA;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsOutlookProfileMigrator::GetSourceExists(bool* aResult)
 {
-  *aResult = PR_FALSE;
+  *aResult = false;
 
   nsCOMPtr<nsIImportSettings> importSettings;
   mImportModule->GetImportInterface(NS_IMPORT_SETTINGS_STR, getter_AddRefs(importSettings));
 
   if (importSettings)
   {
     nsString description;
     nsCOMPtr<nsIFile> location;
@@ -143,17 +143,17 @@ nsOutlookProfileMigrator::GetSourceExist
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsOutlookProfileMigrator::GetSourceHasMultipleProfiles(bool* aResult)
 {
-  *aResult = PR_FALSE;
+  *aResult = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsOutlookProfileMigrator::GetSourceProfiles(nsIArray** aResult)
 {
   *aResult = nsnull;
   return NS_OK;
--- a/mail/components/migration/src/nsProfileMigrator.cpp
+++ b/mail/components/migration/src/nsProfileMigrator.cpp
@@ -77,19 +77,19 @@ nsProfileMigrator::Migrate(nsIProfileSta
   cstr->SetData(key);
 
   // By opening the Migration FE with a supplied mailMigrator, it will automatically
   // migrate from it.
   nsCOMPtr<nsIWindowWatcher> ww (do_GetService(NS_WINDOWWATCHER_CONTRACTID));
   nsCOMPtr<nsIMutableArray> params (do_CreateInstance(NS_ARRAY_CONTRACTID));
   if (!ww || !params) return NS_ERROR_FAILURE;
 
-  params->AppendElement(cstr, PR_FALSE);
-  params->AppendElement(mailMigrator, PR_FALSE);
-  params->AppendElement(aStartup, PR_FALSE);
+  params->AppendElement(cstr, false);
+  params->AppendElement(mailMigrator, false);
+  params->AppendElement(aStartup, false);
 
   nsCOMPtr<nsIDOMWindow> migrateWizard;
   return ww->OpenWindow(nsnull,
                         MIGRATION_WIZARD_FE_URL,
                         "_blank",
                         MIGRATION_WIZARD_FE_FEATURES,
                         params,
                         getter_AddRefs(migrateWizard));
--- a/mail/components/migration/src/nsProfileMigratorBase.cpp
+++ b/mail/components/migration/src/nsProfileMigratorBase.cpp
@@ -44,17 +44,17 @@
 #include "nsIImportSettings.h"
 #include "nsIImportFilters.h"
 
 #define kPersonalAddressbookUri "moz-abmdbdirectory://abook.mab"
 
 nsProfileMigratorBase::nsProfileMigratorBase()
 {
   mObserverService = do_GetService("@mozilla.org/observer-service;1");
-  mProcessingMailFolders = PR_FALSE;
+  mProcessingMailFolders = false;
 }
 
 nsProfileMigratorBase::~nsProfileMigratorBase()
 {
   if (mFileIOTimer)
     mFileIOTimer->Cancel();
 }
 
@@ -133,25 +133,25 @@ nsresult nsProfileMigratorBase::ImportMa
   rv = aImportModule->GetImportInterface(NS_IMPORT_MAIL_STR, getter_AddRefs(mGenericImporter));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsISupportsPRBool> migrating = do_CreateInstance(NS_SUPPORTS_PRBOOL_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // by setting the migration flag, we force the import utility to install local folders from OE
   // directly into Local Folders and not as a subfolder
-  migrating->SetData(PR_TRUE);
+  migrating->SetData(true);
   mGenericImporter->SetData("migration", migrating);
 
   bool importResult;
   bool wantsProgress;
   mGenericImporter->WantsProgress(&wantsProgress);
   rv = mGenericImporter->BeginImport(nsnull, nsnull, &importResult);
 
-  mProcessingMailFolders = PR_TRUE;
+  mProcessingMailFolders = true;
 
   if (wantsProgress)
     ContinueImport();
   else
     FinishCopyingMailFolders();
 
   return rv;
 }
--- a/mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp
+++ b/mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp
@@ -152,20 +152,20 @@ nsSeamonkeyProfileMigrator::GetMigrateDa
   if (!mSourceProfile) {
     GetSourceProfile(aProfile);
     if (!mSourceProfile)
       return NS_ERROR_FILE_NOT_FOUND;
   }
 
   MigrationData data[] = { { ToNewUnicode(FILE_NAME_PREFS),
                              nsIMailProfileMigrator::SETTINGS,
-                             PR_TRUE },
+                             true },
                            { ToNewUnicode(FILE_NAME_JUNKTRAINING),
                              nsIMailProfileMigrator::JUNKTRAINING,
-                             PR_TRUE },
+                             true },
                           };
 
   // Frees file name strings allocated above.
   GetMigrateDataFromArray(data, sizeof(data)/sizeof(MigrationData),
                           aReplace, mSourceProfile, aResult);
 
   // Now locate passwords
   nsCString signonsFileName;
--- a/mail/components/search/nsMailWinSearchHelper.cpp
+++ b/mail/components/search/nsMailWinSearchHelper.cpp
@@ -77,17 +77,17 @@ nsMailWinSearchHelper::~nsMailWinSearchH
   CoUninitialize();
 }
 
 NS_IMPL_ISUPPORTS1(nsMailWinSearchHelper, nsIMailWinSearchHelper)
 
 
 NS_IMETHODIMP nsMailWinSearchHelper::GetFoldersInCrawlScope(bool* aResult)
 {
-  *aResult = PR_FALSE;
+  *aResult = false;
   NS_ENSURE_ARG_POINTER(mProfD);
 
   // If the service isn't present or running, we shouldn't proceed.
   bool serviceRunning;
   nsresult rv = GetServiceRunning(&serviceRunning);
   if (!serviceRunning || NS_FAILED(rv))
     return rv;
 
@@ -130,23 +130,23 @@ NS_IMETHODIMP nsMailWinSearchHelper::Get
     BOOL included;
     if (FAILED(crawlScopeManager->IncludedInCrawlScope(subdirURL.get(), &included)))
       return NS_ERROR_FAILURE;
 
     // If even one of the folders isn't there, we return false
     if (!included)
       return NS_OK;
   }
-  *aResult = PR_TRUE;
+  *aResult = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMailWinSearchHelper::GetServiceRunning(bool* aResult)
 {
-  *aResult = PR_FALSE;
+  *aResult = false;
   SC_HANDLE hSCManager = OpenSCManager(nsnull, SERVICES_ACTIVE_DATABASE, SERVICE_QUERY_STATUS);
   if (!hSCManager)
     return NS_ERROR_FAILURE;
 
   SC_HANDLE hService = OpenService(hSCManager, "wsearch", SERVICE_QUERY_STATUS);
   CloseServiceHandle(hSCManager);
   if (!hService)
     // The service isn't present. Never mind.
@@ -215,17 +215,17 @@ NS_IMETHODIMP nsMailWinSearchHelper::Set
     }
   }
   return rv;
 }
 
 NS_IMETHODIMP nsMailWinSearchHelper::GetIsFileAssociationSet(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = PR_FALSE;
+  *aResult = false;
 
   // We'll use the Vista method here
   nsRefPtr<IApplicationAssociationRegistration> pAAR;
   HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration,
                                 NULL,
                                 CLSCTX_INPROC,
                                 IID_IApplicationAssociationRegistration,
                                 getter_AddRefs(pAAR));
--- a/mail/components/shell/nsMailGNOMEIntegration.cpp
+++ b/mail/components/shell/nsMailGNOMEIntegration.cpp
@@ -67,18 +67,18 @@ static const char* const sNewsProtocols[
   "nntp"
 };
 
 static const char* const sFeedProtocols[] = {
   "feed"
 };
 
 nsMailGNOMEIntegration::nsMailGNOMEIntegration(): 
-                          mCheckedThisSession(PR_FALSE),
-                          mAppIsInPath(PR_FALSE)
+                          mCheckedThisSession(false),
+                          mAppIsInPath(false)
 {}
 
 nsresult
 nsMailGNOMEIntegration::Init()
 {
   nsresult rv;
 
   // GConf _must_ be available, or we do not allow CreateInstance to succeed.
@@ -112,54 +112,54 @@ NS_IMPL_ISUPPORTS1(nsMailGNOMEIntegratio
 
 bool
 nsMailGNOMEIntegration::GetAppPathFromLauncher()
 {
   gchar *tmp;
 
   const char *launcher = PR_GetEnv("MOZ_APP_LAUNCHER");
   if (!launcher)
-    return PR_FALSE;
+    return false;
 
   if (g_path_is_absolute(launcher)) {
     mAppPath = launcher;
     tmp = g_path_get_basename(launcher);
     gchar *fullpath = g_find_program_in_path(tmp);
     if (fullpath && mAppPath.Equals(fullpath)) {
-      mAppIsInPath = PR_TRUE;
+      mAppIsInPath = true;
     }
     g_free(fullpath);
   } else {
     tmp = g_find_program_in_path(launcher);
     if (!tmp)
-      return PR_FALSE;
+      return false;
     mAppPath = tmp;
-    mAppIsInPath = PR_TRUE;
+    mAppIsInPath = true;
   }
 
   g_free(tmp);
-  return PR_TRUE;
+  return true;
 }
 
 NS_IMETHODIMP
 nsMailGNOMEIntegration::IsDefaultClient(bool aStartupCheck, PRUint16 aApps, bool * aIsDefaultClient)
 {
-  *aIsDefaultClient = PR_TRUE;
+  *aIsDefaultClient = true;
   if (aApps & nsIShellService::MAIL)
     *aIsDefaultClient &= checkDefault(sMailProtocols, NS_ARRAY_LENGTH(sMailProtocols));
   if (aApps & nsIShellService::NEWS)
     *aIsDefaultClient &= checkDefault(sNewsProtocols, NS_ARRAY_LENGTH(sNewsProtocols));
   if (aApps & nsIShellService::RSS)
     *aIsDefaultClient &= checkDefault(sFeedProtocols, NS_ARRAY_LENGTH(sFeedProtocols));
   
   // If this is the first mail window, maintain internal state that we've
   // checked this session (so that subsequent window opens don't show the 
   // default client dialog).
   if (aStartupCheck)
-    mCheckedThisSession = PR_TRUE;
+    mCheckedThisSession = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMailGNOMEIntegration::SetDefaultClient(bool aForAllUsers, PRUint16 aApps)
 {
   nsresult rv = NS_OK;
   if (aApps & nsIShellService::MAIL)
@@ -172,17 +172,17 @@ nsMailGNOMEIntegration::SetDefaultClient
   return rv;	
 }
 
 NS_IMETHODIMP
 nsMailGNOMEIntegration::GetShouldCheckDefaultClient(bool* aResult)
 {
   if (mCheckedThisSession) 
   {
-    *aResult = PR_FALSE;
+    *aResult = false;
     return NS_OK;
   }
 
   nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
   return prefs->GetBoolPref("mail.shell.checkDefaultClient", aResult);
 }
 
 NS_IMETHODIMP
@@ -195,27 +195,27 @@ nsMailGNOMEIntegration::SetShouldCheckDe
 bool
 nsMailGNOMEIntegration::KeyMatchesAppName(const char *aKeyValue) const
 {
   gchar *commandPath;
   if (mUseLocaleFilenames) {
     gchar *nativePath = g_filename_from_utf8(aKeyValue, -1, NULL, NULL, NULL);
     if (!nativePath) {
       NS_ERROR("Error converting path to filesystem encoding");
-      return PR_FALSE;
+      return false;
     }
 
     commandPath = g_find_program_in_path(nativePath);
     g_free(nativePath);
   } else {
     commandPath = g_find_program_in_path(aKeyValue);
   }
 
   if (!commandPath)
-    return PR_FALSE;
+    return false;
 
   bool matches = mAppPath.Equals(commandPath);
   g_free(commandPath);
   return matches;
 }
 
 bool
 nsMailGNOMEIntegration::CheckHandlerMatchesAppName(const nsACString &handler) const
@@ -223,17 +223,17 @@ nsMailGNOMEIntegration::CheckHandlerMatc
   gint argc;
   gchar **argv;
   nsCAutoString command(handler);
 
   if (g_shell_parse_argv(command.get(), &argc, &argv, NULL)) {
     command.Assign(argv[0]);
     g_strfreev(argv);
   } else {
-    return PR_FALSE;
+    return false;
   }
 
   return KeyMatchesAppName(command.get());
 }
 
 bool
 nsMailGNOMEIntegration::checkDefault(const char* const *aProtocols, unsigned int aLength)
 {
@@ -245,36 +245,36 @@ nsMailGNOMEIntegration::checkDefault(con
   nsresult rv;
 
   for (unsigned int i = 0; i < aLength; ++i) {
     if (gconf) {
       handler.Truncate();
       rv = gconf->GetAppForProtocol(nsDependentCString(aProtocols[i]),
                                     &enabled, handler);
       if (NS_SUCCEEDED(rv) && (!CheckHandlerMatchesAppName(handler) || !enabled)) {
-        return PR_FALSE;
+        return false;
       }
     }
 
     if (giovfs) {
       handler.Truncate();
       nsCOMPtr<nsIGIOMimeApp> app;
       rv = giovfs->GetAppForURIScheme(nsDependentCString(aProtocols[i]),
                                       getter_AddRefs(app));
       if (NS_FAILED(rv) || !app) {
-        return PR_FALSE;
+        return false;
       }
       rv = app->GetCommand(handler);
       if (NS_SUCCEEDED(rv) && !CheckHandlerMatchesAppName(handler)) {
-        return PR_FALSE;
+        return false;
       }
     }
   }
 
-  return PR_TRUE;
+  return true;
 }
 
 nsresult
 nsMailGNOMEIntegration::MakeDefault(const char* const *aProtocols,
                                     unsigned int aLength)
 {
   nsCAutoString appKeyValue;
   nsCOMPtr<nsIGConfService> gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
--- a/mail/components/shell/nsMailMacIntegration.cpp
+++ b/mail/components/shell/nsMailMacIntegration.cpp
@@ -56,36 +56,36 @@ extern "C" {
                                                  CFURLRef *appURL);
   extern OSStatus _LSSetDefaultSchemeHandlerURL(CFStringRef scheme,
                                                 CFURLRef appURL);
   extern OSStatus _LSSaveAndRefresh(void);
 }
 
 NS_IMPL_ISUPPORTS1(nsMailMacIntegration, nsIShellService)
 
-nsMailMacIntegration::nsMailMacIntegration(): mCheckedThisSession(PR_FALSE)
+nsMailMacIntegration::nsMailMacIntegration(): mCheckedThisSession(false)
 {}
 
 NS_IMETHODIMP
 nsMailMacIntegration::IsDefaultClient(bool aStartupCheck, PRUint16 aApps, bool * aIsDefaultClient)
 {
-  *aIsDefaultClient = PR_TRUE;
+  *aIsDefaultClient = true;
   if (aApps & nsIShellService::MAIL)
     *aIsDefaultClient &= isDefaultHandlerForProtocol(CFSTR("mailto"));
   if (aApps & nsIShellService::NEWS)
     *aIsDefaultClient &= isDefaultHandlerForProtocol(CFSTR("news"));
   if (aApps & nsIShellService::RSS)
     *aIsDefaultClient &= isDefaultHandlerForProtocol(CFSTR("feed"));
   
   // if this is the first mail window, maintain internal state that we've
   // checked this session (so that subsequent window opens don't show the 
   // default client dialog.
   
   if (aStartupCheck)
-    mCheckedThisSession = PR_TRUE;
+    mCheckedThisSession = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMailMacIntegration::SetDefaultClient(bool aForAllUsers, PRUint16 aApps)
 {
   nsresult rv = NS_OK;
   if (aApps & nsIShellService::MAIL)
@@ -98,17 +98,17 @@ nsMailMacIntegration::SetDefaultClient(b
   return rv;	
 }
 
 NS_IMETHODIMP
 nsMailMacIntegration::GetShouldCheckDefaultClient(bool* aResult)
 {
   if (mCheckedThisSession) 
   {
-    *aResult = PR_FALSE;
+    *aResult = false;
     return NS_OK;
   }
 
   nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
   return prefs->GetBoolPref("mail.shell.checkDefaultClient", aResult);
 }
 
 NS_IMETHODIMP
@@ -156,28 +156,28 @@ nsMailMacIntegration::isDefaultHandlerFo
         // and compare it to our bundle identifier
         isDefault = ::CFStringCompare(tbirdID, defaultHandlerID, 0)
                        == kCFCompareEqualTo;
         ::CFRelease(defaultHandlerID);
       }
       else {
         // If the bundle doesn't have an identifier in its info property list,
         // it's not our bundle.
-        isDefault = PR_FALSE;
+        isDefault = false;
       }
 
       ::CFRelease(defaultHandlerBundle);
     }
 
     ::CFRelease(defaultHandlerURL);
   }
   else {
     // If |_LSCopyDefaultSchemeHandlerURL| failed, there's no default
     // handler for the given protocol
-    isDefault = PR_FALSE;
+    isDefault = false;
   }
 
   ::CFRelease(tbirdID);
   return isDefault;
 }
 
 nsresult
 nsMailMacIntegration::setAsDefaultHandlerForProtocol(CFStringRef aScheme)
--- a/mail/components/shell/nsMailWinIntegration.cpp
+++ b/mail/components/shell/nsMailWinIntegration.cpp
@@ -277,30 +277,30 @@ nsresult nsWindowsShellService::Init()
     return NS_ERROR_FAILURE;
 
   mAppLongPath = appPath;
 
   return NS_OK;
 }
 
 nsWindowsShellService::nsWindowsShellService()
-:mCheckedThisSession(PR_FALSE)
+:mCheckedThisSession(false)
 {
 }
 
 NS_IMETHODIMP
 nsWindowsShellService::IsDefaultClient(bool aStartupCheck, PRUint16 aApps, bool *aIsDefaultClient)
 {
   // If this is the first mail window, maintain internal state that we've
   // checked this session (so that subsequent window opens don't show the
   // default client dialog).
   if (aStartupCheck)
-    mCheckedThisSession = PR_TRUE;
+    mCheckedThisSession = true;
 
-  *aIsDefaultClient = PR_TRUE;
+  *aIsDefaultClient = true;
 
   // for each type,
   if (aApps & nsIShellService::MAIL)
   {
     *aIsDefaultClient &= TestForDefault(gMailSettings, sizeof(gMailSettings)/sizeof(SETTING));
     // Only check if this app is default on Vista if the previous checks
     // indicate that this app is the default.
     if (*aIsDefaultClient)
@@ -309,20 +309,20 @@ nsWindowsShellService::IsDefaultClient(b
   if (aApps & nsIShellService::NEWS)
   {
     *aIsDefaultClient &= TestForDefault(gNewsSettings, sizeof(gNewsSettings)/sizeof(SETTING));
     // Only check if this app is default on Vista if the previous checks
     // indicate that this app is the default.
     if (*aIsDefaultClient)
       IsDefaultClientVista(nsIShellService::NEWS, aIsDefaultClient);
   }
-  // RSS / feed protocol shell integration is not working so return PR_TRUE
+  // RSS / feed protocol shell integration is not working so return true
   // until it is fixed (bug 445823).
   if (aApps & nsIShellService::RSS)
-    *aIsDefaultClient &= PR_TRUE;
+    *aIsDefaultClient &= true;
 //    *aIsDefaultClient &= TestForDefault(gFeedSettings, sizeof(gFeedSettings)/sizeof(SETTING));
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsWindowsShellService::SetDefaultClient(bool aForAllUsers, PRUint16 aApps)
 {
@@ -348,17 +348,17 @@ nsWindowsShellService::SetDefaultClient(
   return LaunchHelper(appHelperPath, params);
 }
 
 NS_IMETHODIMP
 nsWindowsShellService::GetShouldCheckDefaultClient(bool* aResult)
 {
   if (mCheckedThisSession)
   {
-    *aResult = PR_FALSE;
+    *aResult = false;
     return NS_OK;
   }
 
   nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
   return prefs->GetBoolPref("mail.shell.checkDefaultClient", aResult);
 }
 
 NS_IMETHODIMP
@@ -387,30 +387,30 @@ nsWindowsShellService::TestForDefault(SE
     }
 
     ::ZeroMemory(currValue, sizeof(currValue));
     HKEY theKey;
     nsresult rv = OpenKeyForReading(HKEY_CLASSES_ROOT, key, &theKey);
     if (NS_FAILED(rv))
     {
       // Key doesn't exist
-      isDefault = PR_FALSE;
+      isDefault = false;
       break;
     }
 
     DWORD len = sizeof currValue;
     DWORD result = ::RegQueryValueExW(theKey, PromiseFlatString(value).get(),
                                       NULL, NULL, (LPBYTE)currValue, &len);
     // Close the key we opened.
     ::RegCloseKey(theKey);
     if (REG_FAILED(result) ||
         !dataLongPath.Equals(currValue, nsCaseInsensitiveStringComparator()))
     {
       // Key wasn't set, or was set to something else (something else became the default client)
-      isDefault = PR_FALSE;
+      isDefault = false;
       break;
     }
   }  // for each registry key we want to look at
 
   return isDefault;
 }
 
 bool
@@ -432,13 +432,13 @@ nsWindowsShellService::IsDefaultClientVi
     if (aApps & nsIShellService::MAIL)
       pAAR->QueryAppIsDefaultAll(AL_EFFECTIVE, APP_REG_NAME_MAIL, &isDefaultMail);
     if (aApps & nsIShellService::NEWS)
       pAAR->QueryAppIsDefaultAll(AL_EFFECTIVE, APP_REG_NAME_NEWS, &isDefaultNews);
 
     *aIsDefaultClient = isDefaultNews && isDefaultMail;
 
     pAAR->Release();
-    return PR_TRUE;
+    return true;
   }
 #endif
-  return PR_FALSE;
+  return false;
 }
--- a/mailnews/addrbook/src/nsAbAddressCollector.cpp
+++ b/mailnews/addrbook/src/nsAbAddressCollector.cpp
@@ -95,17 +95,17 @@ nsAbAddressCollector::GetCardFromPropert
     NS_ENSURE_SUCCESS(rv, nsnull);
 
     directory = do_QueryInterface(supports, &rv);
     if (NS_FAILED(rv))
       continue;
 
     // Some implementations may return NS_ERROR_NOT_IMPLEMENTED here,
     // so just catch the value and continue.
-    if (NS_FAILED(directory->GetCardFromProperty(aName, aValue, PR_TRUE,
+    if (NS_FAILED(directory->GetCardFromProperty(aName, aValue, true,
                                                  &result)))
       continue;
 
     if (result)
     {
       if (aDirectory)
         directory.swap(*aDirectory);
       return result;
@@ -143,31 +143,31 @@ nsAbAddressCollector::CollectAddress(con
   char *curAddressPtr = addresses;
 
   for (PRUint32 i = 0; i < numAddresses; i++)
   {
     nsDependentCString curAddress(curAddressPtr);
     curAddressPtr += curAddress.Length() + 1;
 
     nsCString unquotedName;
-    rv = pHeader->UnquotePhraseOrAddr(curNamePtr, PR_FALSE,
+    rv = pHeader->UnquotePhraseOrAddr(curNamePtr, false,
                                       getter_Copies(unquotedName));
     curNamePtr += strlen(curNamePtr) + 1;
     NS_ASSERTION(NS_SUCCEEDED(rv), "failed to unquote name");
     if (NS_FAILED(rv))
       continue;
 
     // Don't allow collection of addresses with no email address, it makes
     // no sense. Whilst we should never get here in most normal cases, we
     // should still be careful.
     if (curAddress.IsEmpty())
       continue;
 
     CollectSingleAddress(curAddress, unquotedName, aCreateCard, aSendFormat,
-                         PR_FALSE);
+                         false);
   }
 
   PR_FREEIF(addresses);
   PR_FREEIF(names);
   return NS_OK;
 }
 
 NS_IMETHODIMP
@@ -192,17 +192,17 @@ nsAbAddressCollector::CollectSingleAddre
                                getter_AddRefs(originDirectory));
     // We've not found a card, but is this address actually in the additional
     // email column?
     if (!card)
     {
       card = GetCardFromProperty(k2ndEmailProperty, aEmail,
                                  getter_AddRefs(originDirectory));
       if (card)
-        emailAddressIn2ndEmailColumn = PR_TRUE;
+        emailAddressIn2ndEmailColumn = true;
     }
   }
 
   if (!card && (aCreateCard || aSkipCheckExisting))
   {
     card = do_CreateInstance(NS_ABCARDPROPERTY_CONTRACTID, &rv);
     if (NS_SUCCEEDED(rv) && card)
     {
@@ -246,17 +246,17 @@ nsAbAddressCollector::CollectSingleAddre
       rv = card->GetPropertyAsUint32(kPreferMailFormatProperty,
                                      &currentFormat);
       NS_ASSERTION(NS_SUCCEEDED(rv), "failed to get preferred mail format");
 
       // we only want to update the AB if the current format is unknown
       if (currentFormat == nsIAbPreferMailFormat::unknown &&
           NS_SUCCEEDED(card->SetPropertyAsUint32(kPreferMailFormatProperty,
                                                  aSendFormat)))
-        modifiedCard = PR_TRUE;
+        modifiedCard = true;
     }
 
     if (modifiedCard)
       originDirectory->ModifyCard(card);
   }
 
   return NS_OK;
 }
@@ -291,28 +291,28 @@ bool
 nsAbAddressCollector::SetNamesForCard(nsIAbCard *aSenderCard,
                                       const nsACString &aFullName)
 {
   nsCString firstName;
   nsCString lastName;
   bool modifiedCard = false;
 
   if (NS_SUCCEEDED(aSenderCard->SetDisplayName(NS_ConvertUTF8toUTF16(aFullName))))
-    modifiedCard = PR_TRUE;
+    modifiedCard = true;
 
   // Now split up the full name.
   SplitFullName(nsCString(aFullName), firstName, lastName);
 
   if (!firstName.IsEmpty() &&
       NS_SUCCEEDED(aSenderCard->SetFirstName(NS_ConvertUTF8toUTF16(firstName))))
-    modifiedCard = PR_TRUE;
+    modifiedCard = true;
 
   if (!lastName.IsEmpty() &&
       NS_SUCCEEDED(aSenderCard->SetLastName(NS_ConvertUTF8toUTF16(lastName))))
-    modifiedCard = PR_TRUE;
+    modifiedCard = true;
 
   if (modifiedCard)
     aSenderCard->SetPropertyAsBool("PreferDisplayName", false);
 
   return modifiedCard;
 }
 
 // Splits the first and last name based on the space between them.
@@ -347,17 +347,17 @@ nsAbAddressCollector::Observe(nsISupport
 nsresult
 nsAbAddressCollector::Init(void)
 {
   nsresult rv;
   nsCOMPtr<nsIPrefBranch2> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID,
                                                     &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = prefBranch->AddObserver(PREF_MAIL_COLLECT_ADDRESSBOOK, this, PR_FALSE);
+  rv = prefBranch->AddObserver(PREF_MAIL_COLLECT_ADDRESSBOOK, this, false);
   NS_ENSURE_SUCCESS(rv, rv);
 
   SetUpAbFromPrefs(prefBranch);
   return NS_OK;
 }
 
 // Performs the necessary changes to set up the collector for the specified
 // collected address book.
--- a/mailnews/addrbook/src/nsAbBSDirectory.cpp
+++ b/mailnews/addrbook/src/nsAbBSDirectory.cpp
@@ -50,17 +50,17 @@
 #include "nsServiceManagerUtils.h"
 #include "nsAbDirFactoryService.h"
 #include "nsAbMDBDirFactory.h"
 #include "nsArrayEnumerator.h"
 
 #include "nsCRTGlue.h"
 
 nsAbBSDirectory::nsAbBSDirectory()
-: mInitialized(PR_FALSE)
+: mInitialized(false)
 {
   mServers.Init(13);
 }
 
 nsAbBSDirectory::~nsAbBSDirectory()
 {
 }
 
@@ -179,26 +179,26 @@ nsresult nsAbBSDirectory::EnsureInitiali
      * Check that we are not converting from a
      * a 4.x address book file e.g. pab.na2
      * check if the URI ends with ".na2"
      */
     if (StringEndsWith(URI, NS_LITERAL_CSTRING(kABFileName_PreviousSuffix))) 
       URI.Replace(kMDBDirectoryRootLen, URI.Length() - kMDBDirectoryRootLen, server->fileName);
       
     // Create the directories
-    rv = CreateDirectoriesFromFactory(URI, server, PR_FALSE /* notify */);
+    rv = CreateDirectoriesFromFactory(URI, server, false /* notify */);
 
     // If we failed, this could be because something has set a pref for us
     // which is now broke (e.g. no factory present). So just ignore this one
     // and move on.
     if (NS_FAILED(rv))
       NS_WARNING("CreateDirectoriesFromFactory failed - Invalid factory?");
   }
     
-  mInitialized = PR_TRUE;
+  mInitialized = true;
   // sort directories by position...
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbBSDirectory::CreateNewDirectory(const nsAString &aDirName,
                                                   const nsACString &aURI,
                                                   PRUint32 aType,
                                                   const nsACString &aPrefName,
@@ -233,17 +233,17 @@ NS_IMETHODIMP nsAbBSDirectory::CreateNew
   if (aType == PABDirectory) {
     // Add the URI property
     URI.AssignLiteral(kMDBDirectoryRoot);
     URI.Append(nsDependentCString(server->fileName));
   }
 
   aResult.Assign(server->prefName);
 
-  rv = CreateDirectoriesFromFactory(URI, server, PR_TRUE /* notify */);
+  rv = CreateDirectoriesFromFactory(URI, server, true /* notify */);
   NS_ENSURE_SUCCESS(rv,rv);
   return rv;
 }
 
 NS_IMETHODIMP nsAbBSDirectory::CreateDirectoryByURI(const nsAString &aDisplayName,
                                                     const nsACString &aURI)
 {
   nsresult rv = EnsureInitialized();
@@ -253,17 +253,17 @@ NS_IMETHODIMP nsAbBSDirectory::CreateDir
   if (StringBeginsWith(aURI, NS_LITERAL_CSTRING(kMDBDirectoryRoot)))
     fileName = Substring(aURI, kMDBDirectoryRootLen);
 
   DIR_Server * server = nsnull;
   rv = DIR_AddNewAddressBook(aDisplayName, fileName, aURI,
                              PABDirectory, EmptyCString(), &server);
   NS_ENSURE_SUCCESS(rv,rv);
 
-  rv = CreateDirectoriesFromFactory(aURI, server, PR_TRUE /* notify */);
+  rv = CreateDirectoriesFromFactory(aURI, server, true /* notify */);
   NS_ENSURE_SUCCESS(rv,rv);
 	return rv;
 }
 
 struct GetDirectories
 {
   GetDirectories(DIR_Server* aServer) : mServer(aServer) { }
 
@@ -349,17 +349,17 @@ NS_IMETHODIMP nsAbBSDirectory::HasDirect
 }
 
 NS_IMETHODIMP nsAbBSDirectory::UseForAutocomplete(const nsACString &aIdentityKey,
                                                   bool *aResult)
 {
   // For the "root" directory (kAllDirectoryRoot) always return true so that
   // we can search sub directories that may or may not be local.
   NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = PR_TRUE;
+  *aResult = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbBSDirectory::GetURI(nsACString &aURI)
 {
   if (mURI.IsEmpty())
     return NS_ERROR_NOT_INITIALIZED;
 
--- a/mailnews/addrbook/src/nsAbCardProperty.cpp
+++ b/mailnews/addrbook/src/nsAbCardProperty.cpp
@@ -117,26 +117,26 @@ static const AppendItem CUSTOM_ATTRS_ARR
   {kCustom1Property, "propertyCustom1", eAppendLabel},
   {kCustom2Property, "propertyCustom2", eAppendLabel},
   {kCustom3Property, "propertyCustom3", eAppendLabel},
   {kCustom4Property, "propertyCustom4", eAppendLabel},
   {kNotesProperty, "", eAppendLine}
 };
 
 nsAbCardProperty::nsAbCardProperty()
-  : m_IsMailList(PR_FALSE)
+  : m_IsMailList(false)
 {
   m_properties.Init();
 
   // Initialize some default properties
   SetPropertyAsUint32(kPreferMailFormatProperty, nsIAbPreferMailFormat::unknown);
   SetPropertyAsUint32(kPopularityIndexProperty, 0);
   // Uninitialized...
   SetPropertyAsUint32(kLastModifiedDateProperty, 0);
-  SetPropertyAsBool(kAllowRemoteContentProperty, PR_FALSE);
+  SetPropertyAsBool(kAllowRemoteContentProperty, false);
 }
 
 nsAbCardProperty::~nsAbCardProperty(void)
 {
 }
 
 NS_IMPL_ISUPPORTS2(nsAbCardProperty, nsIAbCard, nsIAbItem)
 
@@ -405,31 +405,31 @@ NS_IMETHODIMP nsAbCardProperty::SetPrima
   return SetPropertyAsAString(kPriEmailProperty, aString);
 }
 
 NS_IMETHODIMP nsAbCardProperty::HasEmailAddress(const nsACString &aEmailAddress,
                                                 bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
 
-  *aResult = PR_FALSE;
+  *aResult = false;
 
   nsCString emailAddress;
   nsresult rv = GetPropertyAsAUTF8String(kPriEmailProperty, emailAddress);
   if (rv != NS_ERROR_NOT_AVAILABLE &&
       emailAddress.Equals(aEmailAddress, nsCaseInsensitiveCStringComparator()))
   {
-    *aResult = PR_TRUE;
+    *aResult = true;
     return NS_OK;
   }
 
   rv = GetPropertyAsAUTF8String(k2ndEmailProperty, emailAddress);
   if (rv != NS_ERROR_NOT_AVAILABLE &&
       emailAddress.Equals(aEmailAddress, nsCaseInsensitiveCStringComparator()))
-    *aResult = PR_TRUE;
+    *aResult = true;
 
   return NS_OK;
 }
 
 // This function may be overridden by derived classes for
 // nsAb*Card specific implementations.
 NS_IMETHODIMP nsAbCardProperty::Copy(nsIAbCard* srcCard)
 {
@@ -496,17 +496,17 @@ NS_IMETHODIMP nsAbCardProperty::Translat
     return ConvertToEscapedVCard(result);
 
   return NS_ERROR_ILLEGAL_VALUE;
 }
 //
 static VObject* myAddPropValue(VObject *o, const char *propName, const PRUnichar *propValue, bool *aCardHasData)
 {
     if (aCardHasData)
-        *aCardHasData = PR_TRUE;
+        *aCardHasData = true;
     return addPropValue(o, propName, NS_ConvertUTF16toUTF8(propValue).get());
 }
 
 nsresult nsAbCardProperty::ConvertToEscapedVCard(nsACString &aResult)
 {
     nsString str;
     nsresult rv;
     bool vCardHasData = false;
@@ -895,17 +895,17 @@ nsresult nsAbCardProperty::AppendSection
 
   nsString attrValue;
   bool sectionIsEmpty = true;
 
   PRInt16 i = 0;
   for (i=0;i<aCount;i++) {
     rv = GetPropertyAsAString(aArray[i].mColumn, attrValue);
     if (NS_SUCCEEDED(rv) && !attrValue.IsEmpty())
-      sectionIsEmpty = PR_FALSE;
+      sectionIsEmpty = false;
   }
 
   if (!sectionIsEmpty && !aHeading.IsEmpty()) {
     nsString heading;
     rv = aBundle->GetStringFromName(aHeading.get(), getter_Copies(heading));
     NS_ENSURE_SUCCESS(rv, rv);
 
     aResult.AppendLiteral("<sectiontitle>");
--- a/mailnews/addrbook/src/nsAbContentHandler.cpp
+++ b/mailnews/addrbook/src/nsAbContentHandler.cpp
@@ -175,17 +175,17 @@ nsAbContentHandler::OnStreamComplete(nsI
   nsCOMPtr<nsIMsgVCardService> vCardService = do_GetService(NS_MSGVCARDSERVICE_CONTRACTID);
   if (vCardService)
   {
     nsAutoPtr<VObject> vObj(vCardService->Parse_MIME((const char *)data, datalen));
     if (vObj)
     {
       PRInt32 len = 0;
       nsCString vCard;
-      vCard.Adopt(vCardService->WriteMemoryVObjects(0, &len, vObj, PR_FALSE));
+      vCard.Adopt(vCardService->WriteMemoryVObjects(0, &len, vObj, false));
 
       nsCOMPtr<nsIAbManager> ab =
         do_GetService(NS_ABMANAGER_CONTRACTID, &rv);
       NS_ENSURE_SUCCESS(rv, rv);
 
       nsCOMPtr <nsIAbCard> cardFromVCard;
       rv = ab->EscapedVCardToAbCard(vCard.get(),
                                     getter_AddRefs(cardFromVCard));
--- a/mailnews/addrbook/src/nsAbDirProperty.cpp
+++ b/mailnews/addrbook/src/nsAbDirProperty.cpp
@@ -48,20 +48,20 @@
 #include "prmem.h"
 #include "nsIAbManager.h"
 
 // From nsDirPrefs
 #define kDefaultPosition 1
 
 nsAbDirProperty::nsAbDirProperty(void)
   : m_LastModifiedDate(0),
-    mIsValidURI(PR_FALSE),
-    mIsQueryURI(PR_FALSE)
+    mIsValidURI(false),
+    mIsQueryURI(false)
 {
-	m_IsMailList = PR_FALSE;
+	m_IsMailList = false;
 }
 
 nsAbDirProperty::~nsAbDirProperty(void)
 {
 #if 0
   // this code causes a regression #138647
   // don't turn it on until you figure it out
   if (m_AddressList) {
@@ -260,17 +260,17 @@ NS_IMETHODIMP nsAbDirProperty::GetAddres
 NS_IMETHODIMP nsAbDirProperty::SetAddressLists(nsIMutableArray * aAddressLists)
 {
   m_AddressList = aAddressLists;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbDirProperty::CopyMailList(nsIAbDirectory* srcList)
 {
-  SetIsMailList(PR_TRUE);
+  SetIsMailList(true);
 
   nsString str;
   srcList->GetDirName(str);
   SetDirName(str);
   srcList->GetListNickName(str);
   SetListNickName(str);
   srcList->GetDescription(str);
   SetDescription(str);
@@ -281,33 +281,33 @@ NS_IMETHODIMP nsAbDirProperty::CopyMailL
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbDirProperty::GetIsQuery(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
   // Mailing lists are not queries by default, individual directory types
   // will override this.
-  *aResult = PR_FALSE;
+  *aResult = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsAbDirProperty::Init(const char *aURI)
 {
   mURINoQuery = aURI;
   mURI = aURI;
-  mIsValidURI = PR_TRUE;
+  mIsValidURI = true;
 
   PRInt32 searchCharLocation = mURINoQuery.FindChar('?');
   if (searchCharLocation >= 0)
   {
     mQueryString = Substring(mURINoQuery, searchCharLocation + 1);
     mURINoQuery.SetLength(searchCharLocation);
-    mIsQueryURI = PR_TRUE;
+    mIsQueryURI = true;
   }
 
   return NS_OK;
 }
 
 // nsIAbDirectory NOT IMPLEMENTED methods
 NS_IMETHODIMP
 nsAbDirProperty::GetChildNodes(nsISimpleEnumerator **childList)
@@ -386,31 +386,31 @@ NS_IMETHODIMP nsAbDirProperty::GetSuppor
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbDirProperty::GetReadOnly(bool *aReadOnly)
 {
   NS_ENSURE_ARG_POINTER(aReadOnly);
   // Default is that we are writable. Any implementation that is read-only must
   // override this method.
-  *aReadOnly = PR_FALSE;
+  *aReadOnly = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbDirProperty::GetIsRemote(bool *aIsRemote)
 {
   NS_ENSURE_ARG_POINTER(aIsRemote);
-  *aIsRemote = PR_FALSE;
+  *aIsRemote = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbDirProperty::GetIsSecure(bool *aIsSecure)
 {
   NS_ENSURE_ARG_POINTER(aIsSecure);
-  *aIsSecure = PR_FALSE;
+  *aIsSecure = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbDirProperty::UseForAutocomplete(const nsACString &aIdentityKey,
                                                   bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
 
--- a/mailnews/addrbook/src/nsAbDirectoryQuery.cpp
+++ b/mailnews/addrbook/src/nsAbDirectoryQuery.cpp
@@ -122,17 +122,17 @@ NS_IMETHODIMP nsAbDirectoryQuerySimpleBo
   mExpressions = aExpressions;
 
   return NS_OK;
 }
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsAbDirectoryQueryArguments, nsIAbDirectoryQueryArguments)
 
 nsAbDirectoryQueryArguments::nsAbDirectoryQueryArguments() :
-    mQuerySubDirectories(PR_TRUE)
+    mQuerySubDirectories(true)
 {
 }
 
 nsAbDirectoryQueryArguments::~nsAbDirectoryQueryArguments()
 {
 }
 
 /* attribute nsISupports matchItems; */
@@ -480,29 +480,29 @@ nsresult nsAbDirectoryQuery::matchCardCo
     }
 
     nsString value;
     (void)card->GetPropertyAsAString(name.get(), value);
 
     if (value.IsEmpty())
     {
       *matchFound = (conditionType == nsIAbBooleanConditionTypes::DoesNotExist) ?
-          PR_TRUE : PR_FALSE;
+          true : false;
       return NS_OK;
     }
 
     /* TODO
      * What about allowing choice between case insensitive
      * and case sensitive comparisons?
      *
      */
     switch (conditionType)
     {
         case nsIAbBooleanConditionTypes::Exists:
-            *matchFound = PR_TRUE;
+            *matchFound = true;
             break;
         case nsIAbBooleanConditionTypes::Contains:
             *matchFound = CaseInsensitiveFindInReadable(matchValue, value);
             break;
         case nsIAbBooleanConditionTypes::DoesNotContain:
             *matchFound = !CaseInsensitiveFindInReadable(matchValue, value);
             break;
         case nsIAbBooleanConditionTypes::Is:
@@ -520,20 +520,20 @@ nsresult nsAbDirectoryQuery::matchCardCo
         case nsIAbBooleanConditionTypes::GreaterThan:
             *matchFound = Compare(value, matchValue, nsCaseInsensitiveStringComparator()) > 0;
             break;
         case nsIAbBooleanConditionTypes::EndsWith:
             *matchFound = StringEndsWith(value, matchValue, nsCaseInsensitiveStringComparator());
             break;
         case nsIAbBooleanConditionTypes::SoundsLike:
         case nsIAbBooleanConditionTypes::RegExp:
-            *matchFound = PR_FALSE;
+            *matchFound = false;
             break;
         default:
-            *matchFound = PR_FALSE;
+            *matchFound = false;
     }
 
     return rv;
 }
 
 nsresult nsAbDirectoryQuery::queryMatch(nsIAbCard* card,
     nsIAbDirSearchListener* listener)
 {
--- a/mailnews/addrbook/src/nsAbDirectoryQueryProxy.cpp
+++ b/mailnews/addrbook/src/nsAbDirectoryQueryProxy.cpp
@@ -37,30 +37,30 @@
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsAbDirectoryQuery.h"
 #include "nsAbDirectoryQueryProxy.h"
 
 NS_IMPL_ISUPPORTS2(nsAbDirectoryQueryProxy, nsIAbDirectoryQueryProxy, nsIAbDirectoryQuery)
 
 nsAbDirectoryQueryProxy::nsAbDirectoryQueryProxy() :
-    mInitiated (PR_FALSE)
+    mInitiated (false)
 {
 }
 
 nsAbDirectoryQueryProxy::~nsAbDirectoryQueryProxy()
 {
 }
 
 /* void initiate (in nsIAbDirectory directory); */
 NS_IMETHODIMP nsAbDirectoryQueryProxy::Initiate()
 {
     if (mInitiated)
         return NS_OK;
 
     mDirectoryQuery = new nsAbDirectoryQuery();
 
-    mInitiated = PR_TRUE;
+    mInitiated = true;
 
     return NS_OK;
 }
 
 
--- a/mailnews/addrbook/src/nsAbLDAPAutoCompFormatter.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPAutoCompFormatter.cpp
@@ -418,17 +418,17 @@ nsAbLDAPAutoCompFormatter::ProcessFormat
     // parse until we hit the end of the string
     //
     while (iter != iterEnd) {
 
         switch (*iter) {            // process the next char
 
         case PRUnichar('{'):
 
-            attrRequired = PR_TRUE;  // this attribute is required
+            attrRequired = true;  // this attribute is required
 
             /*FALLTHROUGH*/
 
         case PRUnichar('['):
 
             rv = ParseAttrName(&iter, iterEnd, attrRequired,
                                consoleSvc, attrName);
 
@@ -462,17 +462,17 @@ nsAbLDAPAutoCompFormatter::ProcessFormat
                     // something unrecoverable happened; stop parsing and 
                     // propagate the error up the stack
                     //
                     return rv;
                 }
             }
 
             attrName.Truncate();     // clear out for next pass
-            attrRequired = PR_FALSE; // reset to the default for the next pass
+            attrRequired = false; // reset to the default for the next pass
 
             break;
 
         case PRUnichar('\\'):
 
             // advance the iterator and be sure we haven't run off the end
             //
             ++iter;
--- a/mailnews/addrbook/src/nsAbLDAPCard.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPCard.cpp
@@ -128,24 +128,24 @@ NS_IMETHODIMP nsAbLDAPCard::GetLDAPMessa
   {
     nsCOMPtr<nsILDAPBERValue> value =
       do_CreateInstance("@mozilla.org/network/ldap-ber-value;1", &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = value->SetFromUTF8(m_objectClass.ElementAt(i));
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = values->AppendElement(value, PR_FALSE);
+    rv = values->AppendElement(value, false);
     NS_ENSURE_SUCCESS(rv, rv);
   }
   
   rv = mod->SetUpModification(aType, NS_LITERAL_CSTRING("objectClass"), values);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  modArray->AppendElement(mod, PR_FALSE);
+  modArray->AppendElement(mod, false);
 
   // Add card properties
   CharPtrArrayGuard props;
   rv = aAttributeMap->GetAllCardProperties(props.GetSizeAddr(),
     props.GetArrayAddr());
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCAutoString attr;
@@ -194,17 +194,17 @@ NS_IMETHODIMP nsAbLDAPCard::GetLDAPMessa
       rv = value->SetFromUTF8(propvalue);
       NS_ENSURE_SUCCESS(rv, rv);
  
       rv = mod->SetUpModificationOneValue(aType, attr, value);
       NS_ENSURE_SUCCESS(rv, rv);
     
       printf("LDAP : setting attribute %s (%s) to '%s'\n", attr.get(),
         props[i], propvalue.get());
-      modArray->AppendElement(mod, PR_FALSE);
+      modArray->AppendElement(mod, false);
       if (index != nsTArray<nsCString>::NoIndex)
         m_attributes.AppendElement(attr);
 
     }
     else if (aType == nsILDAPModification::MOD_REPLACE &&
              index != nsTArray<nsCString>::NoIndex)
     {
       // If the new value is empty, we are performing an update
@@ -212,17 +212,17 @@ NS_IMETHODIMP nsAbLDAPCard::GetLDAPMessa
       nsCOMPtr<nsIMutableArray> novalues =
         do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
       NS_ENSURE_SUCCESS(rv, rv);
 
       rv = mod->SetUpModification(aType, attr, novalues);
       NS_ENSURE_SUCCESS(rv, rv);
       
       printf("LDAP : removing attribute %s (%s)\n", attr.get(), props[i]);
-      modArray->AppendElement(mod, PR_FALSE);
+      modArray->AppendElement(mod, false);
       m_attributes.RemoveElementAt(index);
     }
   }
 
   NS_ADDREF(*aLDAPAddMessageInfo = modArray);
 
   return NS_OK;
 }
--- a/mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp
@@ -61,17 +61,17 @@
 enum UpdateOp {
  NO_OP,
  ENTRY_ADD,
  ENTRY_DELETE,
  ENTRY_MODIFY
 };
 
 nsAbLDAPProcessChangeLogData::nsAbLDAPProcessChangeLogData()
-: mUseChangeLog(PR_FALSE),
+: mUseChangeLog(false),
   mChangeLogEntriesCount(0),
   mEntriesAddedQueryCount(0)
 {
    mRootDSEEntry.firstChangeNumber = 0;
    mRootDSEEntry.lastChangeNumber = 0;
 }
 
 nsAbLDAPProcessChangeLogData::~nsAbLDAPProcessChangeLogData()
@@ -99,22 +99,22 @@ nsresult nsAbLDAPProcessChangeLogData::O
     NS_ENSURE_ARG_POINTER(aMessage);
 	if(!mInitialized) 
         return NS_ERROR_NOT_INITIALIZED;
 
     PRInt32 errCode;
 
     nsresult rv = aMessage->GetErrorCode(&errCode);
     if(NS_FAILED(rv)) {
-        Done(PR_FALSE);
+        Done(false);
         return rv;
     }
 
     if(errCode != nsILDAPErrors::SUCCESS) {
-        Done(PR_FALSE);
+        Done(false);
         return NS_ERROR_FAILURE;
     }
 
     switch(mState) {
     case kAnonymousBinding :
         rv = GetAuthData();
         if(NS_SUCCEEDED(rv)) 
             rv = mChangeLogQuery->QueryAuthDN(mAuthUserID);
@@ -214,24 +214,24 @@ nsresult nsAbLDAPProcessChangeLogData::O
                     break;
 
                 PRInt64 fileSize;
                 rv = dbPath->GetFileSize(&fileSize);
                 if(NS_FAILED(rv)) 
                     break;
 
                 if (!fileExists || !fileSize)
-                    mUseChangeLog = PR_FALSE;
+                    mUseChangeLog = false;
 
                 // Open / create the AB here since it calls Done,
                 // just return from here.
                 if (mUseChangeLog)
-                   rv = OpenABForReplicatedDir(PR_FALSE);
+                   rv = OpenABForReplicatedDir(false);
                 else
-                   rv = OpenABForReplicatedDir(PR_TRUE);
+                   rv = OpenABForReplicatedDir(true);
                 if (NS_FAILED(rv))
                    return rv;
                 
                 // Now start the appropriate query
                 rv = OnSearchRootDSEDone();
                 break;
              }
             case kFindingChanges:
@@ -370,21 +370,21 @@ nsresult nsAbLDAPProcessChangeLogData::P
     }
 
     PRInt32 lastChangeNumber;
     mDirectory->GetLastChangeNumber(&lastChangeNumber);
 
     if ((mRootDSEEntry.lastChangeNumber > 0) &&
         (lastChangeNumber < mRootDSEEntry.lastChangeNumber) &&
         (lastChangeNumber > mRootDSEEntry.firstChangeNumber))
-        mUseChangeLog = PR_TRUE;
+        mUseChangeLog = true;
 
     if (mRootDSEEntry.lastChangeNumber &&
         (lastChangeNumber == mRootDSEEntry.lastChangeNumber)) {
-        Done(PR_TRUE); // We are up to date no need to replicate, db not open yet so call Done
+        Done(true); // We are up to date no need to replicate, db not open yet so call Done
         return NS_OK;
     }
 
     return rv;
 }
 
 nsresult nsAbLDAPProcessChangeLogData::OnSearchRootDSEDone()
 {
@@ -394,25 +394,25 @@ nsresult nsAbLDAPProcessChangeLogData::O
     nsresult rv = NS_OK;
 
     if(mUseChangeLog) {
         rv = mChangeLogQuery->QueryChangeLog(mRootDSEEntry.changeLogDN, mRootDSEEntry.lastChangeNumber);
         if (NS_FAILED(rv))
            return rv;
         mState = kFindingChanges;
         if(mListener)
-            mListener->OnStateChange(nsnull, nsnull, nsIWebProgressListener::STATE_START, PR_FALSE);
+            mListener->OnStateChange(nsnull, nsnull, nsIWebProgressListener::STATE_START, false);
     }
     else {
         rv = mQuery->QueryAllEntries();
         if (NS_FAILED(rv))
            return rv;
         mState = kReplicatingAll;
         if(mListener)
-            mListener->OnStateChange(nsnull, nsnull, nsIWebProgressListener::STATE_START, PR_TRUE);
+            mListener->OnStateChange(nsnull, nsnull, nsIWebProgressListener::STATE_START, true);
     }
 
     rv = mDirectory->SetLastChangeNumber(mRootDSEEntry.lastChangeNumber);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = mDirectory->SetDataVersion(mRootDSEEntry.dataVersion);
 
     return rv;
@@ -511,62 +511,62 @@ nsresult nsAbLDAPProcessChangeLogData::O
 
     // No entries to add/update (for updates too we delete and add) entries,
     // we took care of deletes in ParseChangeLogEntries, all Done!
     mEntriesAddedQueryCount = mEntriesToAdd.Count();
     if(mEntriesAddedQueryCount <= 0) {
         if(mReplicationDB && mDBOpen) {
             // Close the DB, no need to commit since we have not made
             // any changes yet to the DB.
-            rv = mReplicationDB->Close(PR_FALSE);
+            rv = mReplicationDB->Close(false);
             NS_ASSERTION(NS_SUCCEEDED(rv), "Replication DB Close(no commit) on Success failed");
-            mDBOpen = PR_FALSE;
+            mDBOpen = false;
             // Once are done with the replication file, delete the backup file
             if(mBackupReplicationFile) {
-                rv = mBackupReplicationFile->Remove(PR_FALSE);
+                rv = mBackupReplicationFile->Remove(false);
                 NS_ASSERTION(NS_SUCCEEDED(rv), "Replication BackupFile Remove on Success failed");
             }
         }
-        Done(PR_TRUE);
+        Done(true);
         return NS_OK;
     }
 
     // Decrement the count first to get the correct array element
     mEntriesAddedQueryCount--;
     rv = mChangeLogQuery->QueryChangedEntries(NS_ConvertUTF16toUTF8(*(mEntriesToAdd[mEntriesAddedQueryCount])));
     if (NS_FAILED(rv))
         return rv;
 
     if(mListener && NS_SUCCEEDED(rv))
-        mListener->OnStateChange(nsnull, nsnull, nsIWebProgressListener::STATE_START, PR_TRUE);
+        mListener->OnStateChange(nsnull, nsnull, nsIWebProgressListener::STATE_START, true);
 
     mState = kReplicatingChanges;
     return rv;
 }
 
 nsresult nsAbLDAPProcessChangeLogData::OnReplicatingChangeDone()
 {
     if(!mInitialized) 
         return NS_ERROR_NOT_INITIALIZED;
 
     nsresult rv = NS_OK;
 
     if(!mEntriesAddedQueryCount)
     {
         if(mReplicationDB && mDBOpen) {
-            rv = mReplicationDB->Close(PR_TRUE); // Commit and close the DB
+            rv = mReplicationDB->Close(true); // Commit and close the DB
             NS_ASSERTION(NS_SUCCEEDED(rv), "Replication DB Close (commit) on Success failed");
-            mDBOpen = PR_FALSE;
+            mDBOpen = false;
         }
         // Once we done with the replication file, delete the backup file.
         if(mBackupReplicationFile) {
-            rv = mBackupReplicationFile->Remove(PR_FALSE);
+            rv = mBackupReplicationFile->Remove(false);
             NS_ASSERTION(NS_SUCCEEDED(rv), "Replication BackupFile Remove on Success failed");
         }
-        Done(PR_TRUE);  // All data is received
+        Done(true);  // All data is received
         return NS_OK;
     }
 
     // Remove the entry already added from the list and query the next one.
     if(mEntriesAddedQueryCount < mEntriesToAdd.Count() && mEntriesAddedQueryCount >= 0)
         mEntriesToAdd.RemoveStringAt(mEntriesAddedQueryCount);
     mEntriesAddedQueryCount--;
     rv = mChangeLogQuery->QueryChangedEntries(NS_ConvertUTF16toUTF8(*(mEntriesToAdd[mEntriesAddedQueryCount])));
--- a/mailnews/addrbook/src/nsAbLDAPChangeLogQuery.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPChangeLogQuery.cpp
@@ -91,17 +91,17 @@ NS_IMETHODIMP nsAbLDAPChangeLogQuery::In
         return rv;
 
     // create the ChangeLog Data Processor
     mDataProcessor =  do_CreateInstance(NS_ABLDAP_PROCESSCHANGELOGDATA_CONTRACTID, &rv);
     if(NS_FAILED(rv)) 
         return rv;
 
     // 'this' initialized
-    mInitialized = PR_TRUE;
+    mInitialized = true;
 
     return mDataProcessor->Init(this, aProgressListener);
 }
 
 NS_IMETHODIMP nsAbLDAPChangeLogQuery::DoReplicationQuery()
 {
     if(!mInitialized) 
         return NS_ERROR_NOT_INITIALIZED;
--- a/mailnews/addrbook/src/nsAbLDAPDirectory.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPDirectory.cpp
@@ -72,17 +72,17 @@
 #include "nsMsgUtils.h"
 
 #define kDefaultMaxHits 100
 
 using namespace mozilla;
 
 nsAbLDAPDirectory::nsAbLDAPDirectory() :
   nsAbDirProperty(),
-  mPerformingQuery(PR_FALSE),
+  mPerformingQuery(false),
   mContext(0),
   mLock("nsAbLDAPDirectory.mLock")
 {
   mCache.Init();
 }
 
 nsAbLDAPDirectory::~nsAbLDAPDirectory()
 {
@@ -322,17 +322,17 @@ NS_IMETHODIMP nsAbLDAPDirectory::StartSe
     nsCOMPtr<nsIAbBooleanExpression> expression;
     rv = nsAbQueryStringToExpression::Convert(mQueryString,
                                               getter_AddRefs(expression));
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = arguments->SetExpression(expression);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = arguments->SetQuerySubDirectories(PR_TRUE);
+    rv = arguments->SetQuerySubDirectories(true);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // Get the max hits to return
     PRInt32 maxHits;
     rv = GetMaxHits(&maxHits);
     if (NS_FAILED(rv))
       maxHits = kDefaultMaxHits;
 
@@ -356,33 +356,33 @@ NS_IMETHODIMP nsAbLDAPDirectory::StartSe
     }
 
     // Perform the query
     rv = mDirectoryQuery->DoQuery(this, arguments, this, maxHits, 0, &mContext);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // Enter lock
     MutexAutoLock lock(mLock);
-    mPerformingQuery = PR_TRUE;
+    mPerformingQuery = true;
     mCache.Clear();
 
     return rv;
 }  
 
 NS_IMETHODIMP nsAbLDAPDirectory::StopSearch ()
 {
   nsresult rv = Initiate();
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Enter lock
   {
     MutexAutoLock lockGuard(mLock);
     if (!mPerformingQuery)
       return NS_OK;
-    mPerformingQuery = PR_FALSE;
+    mPerformingQuery = false;
   }
   // Exit lock
 
   if (!mDirectoryQuery)
     return NS_ERROR_NULL_POINTER;
 
   return mDirectoryQuery->StopQuery(mContext);
 }
@@ -393,17 +393,17 @@ NS_IMETHODIMP nsAbLDAPDirectory::StopSea
  *
  */
 NS_IMETHODIMP nsAbLDAPDirectory::OnSearchFinished(PRInt32 aResult, const nsAString &aErrorMessage)
 {
   nsresult rv = Initiate();
   NS_ENSURE_SUCCESS(rv, rv);
 
   MutexAutoLock lock(mLock);
-  mPerformingQuery = PR_FALSE;
+  mPerformingQuery = false;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbLDAPDirectory::OnSearchFoundCard(nsIAbCard* card)
 {
   nsresult rv = Initiate();
   NS_ENSURE_SUCCESS(rv, rv);
@@ -420,54 +420,54 @@ NS_IMETHODIMP nsAbLDAPDirectory::OnSearc
     abManager->NotifyDirectoryItemAdded(this, card);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbLDAPDirectory::GetSupportsMailingLists(bool *aSupportsMailingsLists)
 {
   NS_ENSURE_ARG_POINTER(aSupportsMailingsLists);
-  *aSupportsMailingsLists = PR_FALSE;
+  *aSupportsMailingsLists = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbLDAPDirectory::GetReadOnly(bool *aReadOnly)
 {
   NS_ENSURE_ARG_POINTER(aReadOnly);
 
-  *aReadOnly = PR_TRUE;
+  *aReadOnly = true;
 
 #ifdef MOZ_EXPERIMENTAL_WRITEABLE_LDAP
   bool readOnly;
-  nsresult rv = GetBoolValue("readonly", PR_FALSE, &readOnly);
+  nsresult rv = GetBoolValue("readonly", false, &readOnly);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (readOnly)
     return NS_OK;
 
   // when online, we'll allow writing as well
   bool offline;
   nsCOMPtr <nsIIOService> ioService =
     do_GetService(NS_IOSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
 
   rv = ioService->GetOffline(&offline);
   NS_ENSURE_SUCCESS(rv,rv);
 
   if (!offline)
-    *aReadOnly = PR_FALSE;
+    *aReadOnly = false;
 #endif
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbLDAPDirectory::GetIsRemote(bool *aIsRemote)
 {
   NS_ENSURE_ARG_POINTER(aIsRemote);
-  *aIsRemote = PR_TRUE;
+  *aIsRemote = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbLDAPDirectory::GetIsSecure(bool *aIsSecure)
 {
   NS_ENSURE_ARG_POINTER(aIsSecure);
 
   nsCAutoString URI;
@@ -480,17 +480,17 @@ NS_IMETHODIMP nsAbLDAPDirectory::GetIsSe
 }
 
 NS_IMETHODIMP nsAbLDAPDirectory::UseForAutocomplete(const nsACString &aIdentityKey,
                                                     bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
 
   // Set this to false by default to make the code easier below.
-  *aResult = PR_FALSE;
+  *aResult = false;
 
   nsresult rv;
   bool offline = false;
   nsCOMPtr <nsIIOService> ioService =
     do_GetService(NS_IOSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = ioService->GetOffline(&offline);
@@ -727,17 +727,17 @@ NS_IMETHODIMP nsAbLDAPDirectory::GetRepl
   nsCOMPtr<nsILocalFile> databaseFile;
  rv = GetReplicationFile(getter_AddRefs(databaseFile));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIAddrDatabase> addrDBFactory =
     do_GetService(NS_ADDRDATABASE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  return addrDBFactory->Open(databaseFile, PR_FALSE /* no create */, PR_TRUE,
+  return addrDBFactory->Open(databaseFile, false /* no create */, true,
                            aResult);
 }
 
 NS_IMETHODIMP nsAbLDAPDirectory::AddCard(nsIAbCard *aUpdatedCard,
                                          nsIAbCard **aAddedCard)
 {
   NS_ENSURE_ARG_POINTER(aUpdatedCard);
   NS_ENSURE_ARG_POINTER(aAddedCard);
--- a/mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp
@@ -111,42 +111,42 @@ nsAbModifyLDAPMessageListener::nsAbModif
     const nsACString &login,
     const PRInt32 timeOut) :
     nsAbLDAPListenerBase(directoryUrl, connection, login, timeOut),
     mType(type),
     mCardDN(cardDN),
     mModification(modArray),
     mNewRDN(newRDN),
     mNewBaseDN(newBaseDN),
-    mFinished(PR_FALSE),
-    mCanceled(PR_FALSE),
-    mFlagRename(PR_FALSE),
+    mFinished(false),
+    mCanceled(false),
+    mFlagRename(false),
     mServerSearchControls(serverSearchControls),
     mClientSearchControls(clientSearchControls)
 {
   if (mType == nsILDAPModification::MOD_REPLACE &&
       !mNewRDN.IsEmpty() && !mNewBaseDN.IsEmpty())
-    mFlagRename = PR_TRUE;
+    mFlagRename = true;
 }
 
 nsAbModifyLDAPMessageListener::~nsAbModifyLDAPMessageListener ()
 {
 }
 
 nsresult nsAbModifyLDAPMessageListener::Cancel ()
 {
   nsresult rv = Initiate();
   NS_ENSURE_SUCCESS(rv, rv);
 
   MutexAutoLock lock(mLock);
 
   if (mFinished || mCanceled)
     return NS_OK;
 
-  mCanceled = PR_TRUE;
+  mCanceled = true;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbModifyLDAPMessageListener::OnLDAPMessage(nsILDAPMessage *aMessage)
 {
   nsresult rv = Initiate();
   NS_ENSURE_SUCCESS(rv, rv);
@@ -163,21 +163,21 @@ NS_IMETHODIMP nsAbModifyLDAPMessageListe
 
     if (mFinished)
       return NS_OK;
 
     // for these messages, no matter the outcome, we're done
     if ((messageType == nsILDAPMessage::RES_ADD) || 
         (messageType == nsILDAPMessage::RES_DELETE) ||
         (messageType == nsILDAPMessage::RES_MODIFY))
-      mFinished = PR_TRUE;
+      mFinished = true;
     else if (mCanceled)
     {
-      mFinished = PR_TRUE;
-      cancelOperation = PR_TRUE;
+      mFinished = true;
+      cancelOperation = true;
     }
   }
   // Leave lock
 
   //    nsCOMPtr<nsIAbDirectoryQueryResult> queryResult;
   if (!cancelOperation)
   {
     switch (messageType)
@@ -191,67 +191,67 @@ NS_IMETHODIMP nsAbModifyLDAPMessageListe
         rv = OnLDAPMessageModifyResult(aMessage);
       break;
     case nsILDAPMessage::RES_ADD:
     case nsILDAPMessage::RES_MODIFY:
     case nsILDAPMessage::RES_DELETE:
       rv = OnLDAPMessageModifyResult(aMessage);
       break;
     case nsILDAPMessage::RES_MODDN:
-      mFlagRename = PR_FALSE;
+      mFlagRename = false;
       rv = OnLDAPMessageRenameResult(aMessage);
       if (NS_FAILED(rv)) 
         // Rename failed, so we stop here
-        mFinished = PR_TRUE;
+        mFinished = true;
       break;
     default:
       break;
     }
   }
   else
   {
     if (mModifyOperation)
       rv = mModifyOperation->AbandonExt();
 
     // reset because we might re-use this listener...except don't do this
     // until the search is done, so we'll ignore results from a previous
     // search.
-    mCanceled = mFinished = PR_FALSE;
+    mCanceled = mFinished = false;
   }
 
   return rv;
 }
 
 void nsAbModifyLDAPMessageListener::InitFailed(bool aCancelled)
 {
   // XXX Just cancel the operation for now
   // we'll need to review this when we've got the proper listeners in place.
   Cancel();
 }
 
 nsresult nsAbModifyLDAPMessageListener::DoTask()
 {
   nsresult rv;
-  mCanceled = mFinished = PR_FALSE;
+  mCanceled = mFinished = false;
 
   mModifyOperation = do_CreateInstance(NS_LDAPOPERATION_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = mModifyOperation->Init (mConnection, this, nsnull);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // XXX do we need the search controls?
   rv = mModifyOperation->SetServerControls(mServerSearchControls);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = mModifyOperation->SetClientControls(mClientSearchControls);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (mFlagRename)
-    return mModifyOperation->Rename(mCardDN, mNewRDN, mNewBaseDN, PR_TRUE);
+    return mModifyOperation->Rename(mCardDN, mNewRDN, mNewBaseDN, true);
 
   switch (mType)
   {
     case nsILDAPModification::MOD_ADD:
       return mModifyOperation->AddExt(mCardDN, mModification);
     case nsILDAPModification::MOD_DELETE:
       return mModifyOperation->DeleteExt(mCardDN);
     case nsILDAPModification::MOD_REPLACE:
--- a/mailnews/addrbook/src/nsAbLDAPDirectoryQuery.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPDirectoryQuery.cpp
@@ -126,19 +126,19 @@ nsAbQueryLDAPMessageListener::nsAbQueryL
         const nsACString &mechanism,
         const PRInt32 resultLimit,
         const PRInt32 timeOut) :
   nsAbLDAPListenerBase(directoryUrl, connection, login, timeOut),
   mSearchUrl(searchUrl),
   mResultListener(resultListener),
   mQueryArguments(queryArguments),
   mResultLimit(resultLimit),
-  mFinished(PR_FALSE),
-  mCanceled(PR_FALSE),
-  mWaitingForPrevQueryToFinish(PR_FALSE),
+  mFinished(false),
+  mCanceled(false),
+  mWaitingForPrevQueryToFinish(false),
   mServerSearchControls(serverSearchControls),
   mClientSearchControls(clientSearchControls)
 {
   mSaslMechanism.Assign(mechanism);
 }
 
 nsAbQueryLDAPMessageListener::~nsAbQueryLDAPMessageListener ()
 {
@@ -149,19 +149,19 @@ nsresult nsAbQueryLDAPMessageListener::C
     nsresult rv = Initiate();
     NS_ENSURE_SUCCESS(rv, rv);
 
     MutexAutoLock lock(mLock);
 
     if (mFinished || mCanceled)
         return NS_OK;
 
-    mCanceled = PR_TRUE;
+    mCanceled = true;
     if (!mFinished)
-      mWaitingForPrevQueryToFinish = PR_TRUE;
+      mWaitingForPrevQueryToFinish = true;
 
     return NS_OK;
 }
 
 NS_IMETHODIMP nsAbQueryLDAPMessageListener::OnLDAPMessage(nsILDAPMessage *aMessage)
 {
   nsresult rv = Initiate();
   NS_ENSURE_SUCCESS(rv, rv);
@@ -175,21 +175,21 @@ NS_IMETHODIMP nsAbQueryLDAPMessageListen
   // Enter lock
   {
     MutexAutoLock lock (mLock);
 
     if (mFinished)
       return NS_OK;
 
     if (messageType == nsILDAPMessage::RES_SEARCH_RESULT)
-      mFinished = PR_TRUE;
+      mFinished = true;
     else if (mCanceled)
     {
-      mFinished = PR_TRUE;
-      cancelOperation = PR_TRUE;
+      mFinished = true;
+      cancelOperation = true;
     }
   }
   // Leave lock
 
   if (!mResultListener)
     return NS_ERROR_NULL_POINTER;
 
   if (!cancelOperation)
@@ -204,17 +204,17 @@ NS_IMETHODIMP nsAbQueryLDAPMessageListen
         // for us.
         rv = OnLDAPMessageSearchResult(aMessage);
       break;
     case nsILDAPMessage::RES_SEARCH_ENTRY:
       if (!mFinished && !mWaitingForPrevQueryToFinish)
         rv = OnLDAPMessageSearchEntry(aMessage);
       break;
     case nsILDAPMessage::RES_SEARCH_RESULT:
-      mWaitingForPrevQueryToFinish = PR_FALSE;
+      mWaitingForPrevQueryToFinish = false;
       rv = OnLDAPMessageSearchResult(aMessage);
       NS_ENSURE_SUCCESS(rv, rv);
     default:
       break;
     }
   }
   else
   {
@@ -223,26 +223,26 @@ NS_IMETHODIMP nsAbQueryLDAPMessageListen
 
     rv = mResultListener->OnQueryResult(
       nsIAbDirectoryQueryResultListener::queryResultStopped, 0);
 
     // reset because we might re-use this listener...except don't do this
     // until the search is done, so we'll ignore results from a previous
     // search.
     if (messageType == nsILDAPMessage::RES_SEARCH_RESULT)
-      mCanceled = mFinished = PR_FALSE;
+      mCanceled = mFinished = false;
   }
 
   return rv;
 }
 
 nsresult nsAbQueryLDAPMessageListener::DoTask()
 {
   nsresult rv;
-  mCanceled = mFinished = PR_FALSE;
+  mCanceled = mFinished = false;
 
   mOperation = do_CreateInstance(NS_LDAPOPERATION_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = mOperation->Init(mConnection, this, nsnull);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCAutoString dn;
@@ -328,17 +328,17 @@ nsresult nsAbQueryLDAPMessageListener::O
 }
 
 // nsAbLDAPDirectoryQuery
 
 NS_IMPL_THREADSAFE_ISUPPORTS2(nsAbLDAPDirectoryQuery, nsIAbDirectoryQuery,
                               nsIAbDirectoryQueryResultListener)
 
 nsAbLDAPDirectoryQuery::nsAbLDAPDirectoryQuery() :
-    mInitialized(PR_FALSE)
+    mInitialized(false)
 {
 }
 
 nsAbLDAPDirectoryQuery::~nsAbLDAPDirectoryQuery()
 {
 }
 
 NS_IMETHODIMP nsAbLDAPDirectoryQuery::DoQuery(nsIAbDirectory *aDirectory,
@@ -352,17 +352,17 @@ NS_IMETHODIMP nsAbLDAPDirectoryQuery::Do
   NS_ENSURE_ARG_POINTER(aArguments);
 
   mListeners.AppendObject(aListener);
 
   // Ensure existing query is stopped. Context id doesn't matter here
   nsresult rv = StopQuery(0);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  mInitialized = PR_TRUE;
+  mInitialized = true;
 
   // Get the current directory as LDAP specific
   nsCOMPtr<nsIAbLDAPDirectory> directory(do_QueryInterface(aDirectory, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
   
   // We also need the current URL to check as well...
   nsCOMPtr<nsILDAPURL> currentUrl;
   rv = directory->GetLDAPURL(getter_AddRefs(currentUrl));
@@ -389,17 +389,17 @@ NS_IMETHODIMP nsAbLDAPDirectoryQuery::Do
   
   if (!mConnection || !mDirectoryUrl)
   {
     mDirectoryUrl = currentUrl;
     aDirectory->GetUuid(mDirectoryId);
     mCurrentLogin = login;
     mCurrentMechanism = saslMechanism;
     mCurrentProtocolVersion = protocolVersion;
-    redoConnection = PR_TRUE;
+    redoConnection = true;
   }
   else
   {
     bool equal;
     rv = mDirectoryUrl->Equals(currentUrl, &equal);
       NS_ENSURE_SUCCESS(rv, rv);
   
     nsCString spec;
@@ -408,26 +408,26 @@ NS_IMETHODIMP nsAbLDAPDirectoryQuery::Do
 
     if (!equal)
     {
       mDirectoryUrl = currentUrl;
       aDirectory->GetUuid(mDirectoryId);
       mCurrentLogin = login;
       mCurrentMechanism = saslMechanism;
       mCurrentProtocolVersion = protocolVersion;
-      redoConnection = PR_TRUE;
+      redoConnection = true;
     }
     else
     {
       // Has login or version changed?
       if (login != mCurrentLogin ||
           saslMechanism != mCurrentMechanism ||
           protocolVersion != mCurrentProtocolVersion)
       {
-        redoConnection = PR_TRUE;
+        redoConnection = true;
         mCurrentLogin = login;
         mCurrentMechanism = saslMechanism;
         mCurrentProtocolVersion = protocolVersion;
       }
     }
   }
 
   nsCOMPtr<nsIURI> uri;
@@ -594,17 +594,17 @@ NS_IMETHODIMP nsAbLDAPDirectoryQuery::Do
   NS_ENSURE_SUCCESS(rv, rv);
 
   return rv;
 }
 
 /* void stopQuery (in long contextID); */
 NS_IMETHODIMP nsAbLDAPDirectoryQuery::StopQuery(PRInt32 contextID)
 {
-  mInitialized = PR_TRUE;
+  mInitialized = true;
 
   if (!mListener)
     return NS_OK;
 
   nsAbQueryLDAPMessageListener *listener = 
     static_cast<nsAbQueryLDAPMessageListener *>(static_cast<nsILDAPMessageListener *>(mListener.get()));
   if (listener)
     return listener->Cancel();
--- a/mailnews/addrbook/src/nsAbLDAPListenerBase.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPListenerBase.cpp
@@ -54,34 +54,34 @@
 
 using namespace mozilla;
 
 nsAbLDAPListenerBase::nsAbLDAPListenerBase(nsILDAPURL* url,
                                            nsILDAPConnection* connection,
                                            const nsACString &login,
                                            const PRInt32 timeOut) :
   mDirectoryUrl(url), mConnection(connection), mLogin(login),
-  mTimeOut(timeOut), mBound(PR_FALSE), mInitialized(PR_FALSE),
+  mTimeOut(timeOut), mBound(false), mInitialized(false),
   mLock("nsAbLDAPListenerBase.mLock")
 {
 }
 
 nsAbLDAPListenerBase::~nsAbLDAPListenerBase()
 {
 }
 
 nsresult nsAbLDAPListenerBase::Initiate()
 {
   if (!mConnection || !mDirectoryUrl)
     return NS_ERROR_NULL_POINTER;
 
   if (mInitialized)
     return NS_OK;
 
-  mInitialized = PR_TRUE;
+  mInitialized = true;
 
   return NS_OK;
 }
 
 // If something fails in this function, we must call InitFailed() so that the
 // derived class (and listener) knows to cancel what its doing as there is
 // a problem.
 NS_IMETHODIMP nsAbLDAPListenerBase::OnLDAPInit(nsILDAPConnection *aConn, nsresult aStatus)
@@ -247,17 +247,17 @@ NS_IMETHODIMP nsAbLDAPListenerBase::OnLD
     {
       NS_ERROR("nsAbLDAPMessageBase::OnLDAPInit(): failed to prompt for"
                " password");
       InitFailed();
       return rv;
     }
     else if (!status)
     {
-      InitFailed(PR_TRUE);
+      InitFailed(true);
       return NS_OK;
     }
   }
 
   // Initiate the LDAP operation
   mOperation = do_CreateInstance(NS_LDAPOPERATION_CONTRACTID, &rv);
   if (NS_FAILED(rv))
   {
@@ -371,11 +371,11 @@ nsresult nsAbLDAPListenerBase::OnLDAPMes
       return OnLDAPInit(nsnull, NS_OK);
     }
 
     // Don't know how to handle this, so use the message error code in
     // the failure return value so we hopefully get it back to the UI.
     return NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_LDAP, errCode);
   }
 
-  mBound = PR_TRUE;
+  mBound = true;
   return DoTask();
 }
--- a/mailnews/addrbook/src/nsAbLDAPReplicationData.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPReplicationData.cpp
@@ -53,26 +53,26 @@
 // independently along with its related independent nsAbLDAPReplicationQuery object.
 NS_IMPL_THREADSAFE_ISUPPORTS2(nsAbLDAPProcessReplicationData, nsIAbLDAPProcessReplicationData, nsILDAPMessageListener)
 
 nsAbLDAPProcessReplicationData::nsAbLDAPProcessReplicationData() :
   nsAbLDAPListenerBase(),
   mState(kIdle),
   mProtocol(-1),
   mCount(0),
-  mDBOpen(PR_FALSE),
-  mInitialized(PR_FALSE)
+  mDBOpen(false),
+  mInitialized(false)
 {
 }
 
 nsAbLDAPProcessReplicationData::~nsAbLDAPProcessReplicationData()
 {
   /* destructor code */
   if(mDBOpen && mReplicationDB)
-      mReplicationDB->Close(PR_FALSE);
+      mReplicationDB->Close(false);
 }
 
 NS_IMETHODIMP nsAbLDAPProcessReplicationData::Init(
   nsIAbLDAPDirectory *aDirectory,
   nsILDAPConnection *aConnection,
   nsILDAPURL* aURL,
   nsIAbLDAPReplicationQuery *aQuery,
   nsIWebProgressListener *aProgressListener)
@@ -102,17 +102,17 @@ NS_IMETHODIMP nsAbLDAPProcessReplication
   }
   
   rv = mDirectory->GetSaslMechanism(mSaslMechanism);
   if (NS_FAILED(rv)) {
     mQuery = nsnull;
     return rv;
   }
 
-  mInitialized = PR_TRUE;
+  mInitialized = true;
 
   return rv;
 }
 
 NS_IMETHODIMP nsAbLDAPProcessReplicationData::GetReplicationState(PRInt32 *aReplicationState) 
 {
     NS_ENSURE_ARG_POINTER(aReplicationState);
     *aReplicationState = mState; 
@@ -131,17 +131,17 @@ NS_IMETHODIMP nsAbLDAPProcessReplication
   NS_ENSURE_ARG_POINTER(aMessage);
 
   if (!mInitialized)
     return NS_ERROR_NOT_INITIALIZED;
 
   PRInt32 messageType;
   nsresult rv = aMessage->GetType(&messageType);
   if (NS_FAILED(rv)) {
-    Done(PR_FALSE);
+    Done(false);
     return rv;
   }
 
   switch (messageType)
   {
   case nsILDAPMessage::RES_BIND:
     rv = OnLDAPMessageBind(aMessage);
     if (NS_FAILED(rv))
@@ -173,42 +173,42 @@ NS_IMETHODIMP nsAbLDAPProcessReplication
     rv = mOperation->AbandonExt();
     if (NS_SUCCEEDED(rv))
       mState = kIdle;
   }
 
   if (mReplicationDB && mDBOpen) {
     // force close since we need to delete the file.
     mReplicationDB->ForceClosed();
-    mDBOpen = PR_FALSE;
+    mDBOpen = false;
 
     // delete the unsaved replication file
     if (mReplicationFile) {
-      rv = mReplicationFile->Remove(PR_FALSE);
+      rv = mReplicationFile->Remove(false);
       if (NS_SUCCEEDED(rv) && mDirectory) {
         nsCAutoString fileName;
         rv = mDirectory->GetReplicationFileName(fileName);
         // now put back the backed up replicated file if aborted
         if (NS_SUCCEEDED(rv) && mBackupReplicationFile)
           rv = mBackupReplicationFile->MoveToNative(nsnull, fileName);
       }
     }
   }
 
-  Done(PR_FALSE);
+  Done(false);
 
   return rv;
 }
 
 nsresult nsAbLDAPProcessReplicationData::DoTask()
 {
   if (!mInitialized)
     return NS_ERROR_NOT_INITIALIZED;
 
-  nsresult rv = OpenABForReplicatedDir(PR_TRUE);
+  nsresult rv = OpenABForReplicatedDir(true);
   if (NS_FAILED(rv))
     // do not call done here since it is called by OpenABForReplicationDir
     return rv;
 
   mOperation = do_CreateInstance(NS_LDAPOPERATION_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = mOperation->Init(mConnection, this, nsnull);
@@ -237,25 +237,25 @@ nsresult nsAbLDAPProcessReplicationData:
   rv = mDirectoryUrl->GetAttributes(attributes);
   if (NS_FAILED(rv))
     return rv;
 
   mState = kReplicatingAll;
 
   if (mListener && NS_SUCCEEDED(rv))
     mListener->OnStateChange(nsnull, nsnull,
-                             nsIWebProgressListener::STATE_START, PR_TRUE);
+                             nsIWebProgressListener::STATE_START, true);
 
   return mOperation->SearchExt(dn, scope, urlFilter, attributes, 0, 0);
 }
 
 void nsAbLDAPProcessReplicationData::InitFailed(bool aCancelled)
 {
   // Just call Done() which will ensure everything is tidied up nicely.
-  Done(PR_FALSE);
+  Done(false);
 }
 
 nsresult nsAbLDAPProcessReplicationData::OnLDAPSearchEntry(nsILDAPMessage *aMessage)
 {
     NS_ENSURE_ARG_POINTER(aMessage);
     if (!mInitialized)
         return NS_ERROR_NOT_INITIALIZED;
     // since this runs on the main thread and is single threaded, this will 
@@ -279,31 +279,31 @@ nsresult nsAbLDAPProcessReplicationData:
     if (NS_FAILED(rv))
     {
         NS_WARNING("nsAbLDAPProcessReplicationData::OnLDAPSearchEntry"
            "No card properties could be set");
         // if some entries are bogus for us, continue with next one
         return NS_OK;
     }
 
-    rv = mReplicationDB->CreateNewCardAndAddToDB(newCard, PR_FALSE, nsnull);
+    rv = mReplicationDB->CreateNewCardAndAddToDB(newCard, false, nsnull);
     if(NS_FAILED(rv)) {
         Abort();
         return rv;
     }
 
     // now set the attribute for the DN of the entry in the card in the DB
     nsCAutoString authDN;
     rv = aMessage->GetDn(authDN);
     if(NS_SUCCEEDED(rv) && !authDN.IsEmpty())
     {
         newCard->SetPropertyAsAUTF8String("_DN", authDN);
     }
 
-    rv = mReplicationDB->EditCard(newCard, PR_FALSE, nsnull);
+    rv = mReplicationDB->EditCard(newCard, false, nsnull);
     if(NS_FAILED(rv)) {
         Abort();
         return rv;
     }
     
 
     mCount ++;
 
@@ -330,79 +330,79 @@ nsresult nsAbLDAPProcessReplicationData:
         return NS_ERROR_NOT_INITIALIZED;
 
     PRInt32 errorCode;
     nsresult rv = aMessage->GetErrorCode(&errorCode);
 
     if(NS_SUCCEEDED(rv)) {
         // We are done with the LDAP search for all entries.
         if(errorCode == nsILDAPErrors::SUCCESS || errorCode == nsILDAPErrors::SIZELIMIT_EXCEEDED) {
-            Done(PR_TRUE);
+            Done(true);
             if(mReplicationDB && mDBOpen) {
-                rv = mReplicationDB->Close(PR_TRUE);
+                rv = mReplicationDB->Close(true);
                 NS_ASSERTION(NS_SUCCEEDED(rv), "Replication DB Close on Success failed");
-                mDBOpen = PR_FALSE;
+                mDBOpen = false;
                 // once we have saved the new replication file, delete the backup file
                 if(mBackupReplicationFile)
                 {
-                    rv = mBackupReplicationFile->Remove(PR_FALSE);
+                    rv = mBackupReplicationFile->Remove(false);
                     NS_ASSERTION(NS_SUCCEEDED(rv), "Replication BackupFile Remove on Success failed");
                 }
             }
             return NS_OK;
         }
     }
 
     // in case if GetErrorCode returned error or errorCode is not SUCCESS / SIZELIMIT_EXCEEDED
     if(mReplicationDB && mDBOpen) {
         // if error result is returned close the DB without saving ???
         // should we commit anyway ??? whatever is returned is not lost then !!
         rv = mReplicationDB->ForceClosed(); // force close since we need to delete the file.
         NS_ASSERTION(NS_SUCCEEDED(rv), "Replication DB ForceClosed on Failure failed");
-        mDBOpen = PR_FALSE;
+        mDBOpen = false;
         // if error result is returned remove the replicated file
         if(mReplicationFile) {
-            rv = mReplicationFile->Remove(PR_FALSE);
+            rv = mReplicationFile->Remove(false);
             NS_ASSERTION(NS_SUCCEEDED(rv), "Replication File Remove on Failure failed");
             if(NS_SUCCEEDED(rv)) {
                 // now put back the backed up replicated file
                 if(mBackupReplicationFile && mDirectory) 
                 {
                   nsCAutoString fileName;
                   rv = mDirectory->GetReplicationFileName(fileName);
                   if (NS_SUCCEEDED(rv) && !fileName.IsEmpty())
                   {
                     rv = mBackupReplicationFile->MoveToNative(nsnull, fileName);
                     NS_ASSERTION(NS_SUCCEEDED(rv), "Replication Backup File Move back on Failure failed");
                   }
                 }
             }
         }
-        Done(PR_FALSE);
+        Done(false);
     }
 
     return NS_OK;
 }
 
 nsresult nsAbLDAPProcessReplicationData::OpenABForReplicatedDir(bool aCreate)
 {
   if (!mInitialized)
     return NS_ERROR_NOT_INITIALIZED;
 
   nsresult rv = mDirectory->GetReplicationFile(getter_AddRefs(mReplicationFile));
   if (NS_FAILED(rv))
   {
-     Done(PR_FALSE);
+     Done(false);
      return NS_ERROR_FAILURE;
   }
 
   nsCString fileName;
   rv = mReplicationFile->GetNativeLeafName(fileName);
   if (NS_FAILED(rv)) {
-    Done(PR_FALSE);
+    Done(false);
     return rv;
   }
 
     // if the AB DB already exists backup existing one, 
     // in case if the user cancels or Abort put back the backed up file
     bool fileExists;
     rv = mReplicationFile->Exists(&fileExists);
     if(NS_SUCCEEDED(rv) && fileExists) {
@@ -410,39 +410,39 @@ nsresult nsAbLDAPProcessReplicationData:
         // we create a backup file here since we need to cleanup the existing file
         // for create and then commit so instead of deleting existing cards we just
         // clone the existing one for a much better performance - for Download All.
         // And also important in case if replication fails we donot lose user's existing 
         // replicated data for both Download all and Changelog.
         nsCOMPtr<nsIFile> clone;
         rv = mReplicationFile->Clone(getter_AddRefs(clone));
         if(NS_FAILED(rv))  {
-            Done(PR_FALSE);
+            Done(false);
             return rv;
         }
         mBackupReplicationFile = do_QueryInterface(clone, &rv);
         if(NS_FAILED(rv))  {
-            Done(PR_FALSE);
+            Done(false);
             return rv;
         }
         rv = mBackupReplicationFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0777);
         if(NS_FAILED(rv))  {
-            Done(PR_FALSE);
+            Done(false);
             return rv;
         }
         nsAutoString backupFileLeafName;
         rv = mBackupReplicationFile->GetLeafName(backupFileLeafName);
         if(NS_FAILED(rv))  {
-            Done(PR_FALSE);
+            Done(false);
             return rv;
         }
         // remove the newly created unique backup file so that move and copy succeeds.
-        rv = mBackupReplicationFile->Remove(PR_FALSE);
+        rv = mBackupReplicationFile->Remove(false);
         if(NS_FAILED(rv))  {
-            Done(PR_FALSE);
+            Done(false);
             return rv;
         }
 
         if(aCreate) {
             // set backup file to existing replication file for move
             mBackupReplicationFile->SetNativeLeafName(fileName);
 
             rv = mBackupReplicationFile->MoveTo(nsnull, backupFileLeafName);
@@ -461,39 +461,39 @@ nsresult nsAbLDAPProcessReplicationData:
             rv = mBackupReplicationFile->GetParent(getter_AddRefs(parent));
             if (NS_SUCCEEDED(rv))
                 rv = mBackupReplicationFile->CopyTo(parent, backupFileLeafName);
             // set the backup file leaf name now
             if (NS_SUCCEEDED(rv))
                 mBackupReplicationFile->SetLeafName(backupFileLeafName);
         }
         if(NS_FAILED(rv))  {
-            Done(PR_FALSE);
+            Done(false);
             return rv;
         }
     }
 
     nsCOMPtr<nsIAddrDatabase> addrDBFactory = 
              do_GetService(NS_ADDRDATABASE_CONTRACTID, &rv);
     if(NS_FAILED(rv)) {
         if (mBackupReplicationFile)
-            mBackupReplicationFile->Remove(PR_FALSE);
-        Done(PR_FALSE);
+            mBackupReplicationFile->Remove(false);
+        Done(false);
         return rv;
     }
     
-    rv = addrDBFactory->Open(mReplicationFile, aCreate, PR_TRUE, getter_AddRefs(mReplicationDB));
+    rv = addrDBFactory->Open(mReplicationFile, aCreate, true, getter_AddRefs(mReplicationDB));
     if(NS_FAILED(rv)) {
-        Done(PR_FALSE);
+        Done(false);
         if (mBackupReplicationFile)
-            mBackupReplicationFile->Remove(PR_FALSE);
+            mBackupReplicationFile->Remove(false);
         return rv;
     }
 
-    mDBOpen = PR_TRUE;  // replication DB is now Open
+    mDBOpen = true;  // replication DB is now Open
     return rv;
 }
 
 void nsAbLDAPProcessReplicationData::Done(bool aSuccess)
 {
    if (!mInitialized) 
        return;
 
@@ -509,11 +509,11 @@ void nsAbLDAPProcessReplicationData::Don
    // failure or abort release the query now.
    mQuery = nsnull;
 }
 
 nsresult nsAbLDAPProcessReplicationData::DeleteCard(nsString & aDn)
 {
     nsCOMPtr<nsIAbCard> cardToDelete;
     mReplicationDB->GetCardFromAttribute(nsnull, "_DN", NS_ConvertUTF16toUTF8(aDn),
-                                         PR_FALSE, getter_AddRefs(cardToDelete));
-    return mReplicationDB->DeleteCard(cardToDelete, PR_FALSE, nsnull);
+                                         false, getter_AddRefs(cardToDelete));
+    return mReplicationDB->DeleteCard(cardToDelete, false, nsnull);
 }
--- a/mailnews/addrbook/src/nsAbLDAPReplicationQuery.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPReplicationQuery.cpp
@@ -49,17 +49,17 @@
 #include "prmem.h"
 #include "nsComponentManagerUtils.h"
 #include "nsMsgUtils.h"
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsAbLDAPReplicationQuery,
                               nsIAbLDAPReplicationQuery)
 
 nsAbLDAPReplicationQuery::nsAbLDAPReplicationQuery()
-    :  mInitialized(PR_FALSE)
+    :  mInitialized(false)
 {
 }
 
 nsresult nsAbLDAPReplicationQuery::InitLDAPData()
 {
   nsCAutoString fileName;
   nsresult rv = mDirectory->GetReplicationFileName(fileName);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -148,17 +148,17 @@ NS_IMETHODIMP nsAbLDAPReplicationQuery::
     return rv;
 
   mDataProcessor =
     do_CreateInstance(NS_ABLDAP_PROCESSREPLICATIONDATA_CONTRACTID, &rv);
   if (NS_FAILED(rv)) 
     return rv;
 
   // 'this' initialized
-  mInitialized = PR_TRUE;
+  mInitialized = true;
 
   return mDataProcessor->Init(mDirectory, mConnection, mURL, this,
                               aProgressListener);
 }
 
 NS_IMETHODIMP nsAbLDAPReplicationQuery::DoReplicationQuery()
 {
     return ConnectToLDAPServer();
--- a/mailnews/addrbook/src/nsAbLDAPReplicationService.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPReplicationService.cpp
@@ -47,17 +47,17 @@
 //#include "nsAbLDAPChangeLogQuery.h"
 #include "nsIAbLDAPReplicationData.h"
 
 /*** implementation of the service ******/
 
 NS_IMPL_ISUPPORTS1(nsAbLDAPReplicationService, nsIAbLDAPReplicationService)
 
 nsAbLDAPReplicationService::nsAbLDAPReplicationService() 
-    : mReplicating(PR_FALSE)
+    : mReplicating(false)
 {
 }
 
 nsAbLDAPReplicationService::~nsAbLDAPReplicationService()
 {
 }
 
 /* void startReplication(in string aURI, in nsIWebProgressListener progressListener); */
@@ -94,26 +94,26 @@ NS_IMETHODIMP nsAbLDAPReplicationService
   if (NS_SUCCEEDED(rv) && mQuery)
   {
     rv = mQuery->Init(mDirectory, progressListener);
     if (NS_SUCCEEDED(rv))
     {
       rv = mQuery->DoReplicationQuery();
       if (NS_SUCCEEDED(rv))
 	{
-	  mReplicating = PR_TRUE;
+	  mReplicating = true;
 	  return rv;
 	}
     }
   }
 
   if (progressListener && NS_FAILED(rv))
     progressListener->OnStateChange(nsnull, nsnull,
 				    nsIWebProgressListener::STATE_STOP,
-				    PR_FALSE);
+				    false);
 
   if (NS_FAILED(rv))
   {
     mDirectory = nsnull;
     mQuery = nsnull;
   }
 
   return rv;
@@ -129,24 +129,24 @@ NS_IMETHODIMP nsAbLDAPReplicationService
   if (aDirectory == mDirectory)
   {
     if (mQuery && mReplicating)
       rv = mQuery->CancelQuery();  
   }
 
   // If query has been cancelled successfully
   if (NS_SUCCEEDED(rv))
-    Done(PR_FALSE);
+    Done(false);
 
   return rv;
 }
 
 NS_IMETHODIMP nsAbLDAPReplicationService::Done(bool aSuccess)
 {
-  mReplicating = PR_FALSE;
+  mReplicating = false;
   if (mQuery)
   {
     mQuery = nsnull;  // Release query obj
     mDirectory = nsnull; // Release directory
   }
 
   return NS_OK;
 }
--- a/mailnews/addrbook/src/nsAbLDIFService.cpp
+++ b/mailnews/addrbook/src/nsAbLDIFService.cpp
@@ -53,17 +53,17 @@
 
 NS_IMPL_ISUPPORTS1(nsAbLDIFService, nsIAbLDIFService)
 
 // If we get a line longer than 32K it's just toooooo bad!
 #define kTextAddressBufferSz    (64 * 1024)
 
 nsAbLDIFService::nsAbLDIFService()
 {
-  mStoreLocAsHome = PR_FALSE;
+  mStoreLocAsHome = false;
   mLFCount = 0;
   mCRCount = 0;
 }
 
 nsAbLDIFService::~nsAbLDIFService()
 {
 }
 
@@ -121,34 +121,34 @@ NS_IMETHODIMP nsAbLDIFService::ImportLDI
   {
     if (NS_SUCCEEDED(inputStream->Read(pBuf, sizeof(buf), &len)) && len > 0)
     {
       startPos = 0;
 
       while (NS_SUCCEEDED(GetLdifStringRecord(buf, len, startPos)))
       {
         if (mLdifLine.Find("groupOfNames") == -1)
-          AddLdifRowToDatabase(aDb, PR_FALSE);
+          AddLdifRowToDatabase(aDb, false);
         else
         {
           //keep file position for mailing list
           listPosArray.AppendElement((void*)savedStartPos);
           listSizeArray.AppendElement((void*)(filePos + startPos-savedStartPos));
           ClearLdifRecordBuffer();
         }
         savedStartPos = filePos + startPos;
       }
       filePos += len;
       if (aProgress)
         *aProgress = (PRUint32)filePos;
     }
   }
   //last row
   if (!mLdifLine.IsEmpty() && mLdifLine.Find("groupOfNames") == -1)
-    AddLdifRowToDatabase(aDb, PR_FALSE); 
+    AddLdifRowToDatabase(aDb, false); 
 
   // mail Lists
   PRInt32 i, pos;
   PRUint32 size;
   PRInt32 listTotal = listPosArray.Count();
   char *listBuf;
   ClearLdifRecordBuffer();  // make sure the buffer is clean
 
@@ -168,17 +168,17 @@ NS_IMETHODIMP nsAbLDIFService::ImportLDI
       if (NS_SUCCEEDED(inputStream->Read(listBuf, size, &len)) && len > 0)
       {
         startPos = 0;
 
         while (NS_SUCCEEDED(GetLdifStringRecord(listBuf, len, startPos)))
         {
           if (mLdifLine.Find("groupOfNames") != -1)
           {
-            AddLdifRowToDatabase(aDb, PR_TRUE);
+            AddLdifRowToDatabase(aDb, true);
             if (NS_SUCCEEDED(seekableStream->Seek(nsISeekableStream::NS_SEEK_SET, 0)))
               break;
           }
         }
       }
     PR_FREEIF(listBuf);
     }
   }
@@ -795,17 +795,17 @@ static const char *const sLDIFFields[] =
 
 // Count total number of legal ldif fields and records in the first 100 lines of the 
 // file and if the average legal ldif field is 3 or higher than it's a valid ldif file.
 NS_IMETHODIMP nsAbLDIFService::IsLDIFFile(nsIFile *pSrc, bool *_retval)
 {
   NS_ENSURE_ARG_POINTER(pSrc);
   NS_ENSURE_ARG_POINTER(_retval);
 
-  *_retval = PR_FALSE;
+  *_retval = false;
 
   nsresult rv = NS_OK;
 
   nsCOMPtr<nsIInputStream> fileStream;
   rv = NS_NewLocalFileInputStream(getter_AddRefs(fileStream), pSrc);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsILineInputStream> lineInputStream(do_QueryInterface(fileStream, &rv));
@@ -829,17 +829,17 @@ NS_IMETHODIMP nsAbLDIFService::IsLDIFFil
 
     if (NS_SUCCEEDED(rv) && more)
     {
       pChar = line.get();
       lineLen = line.Length();
       if (!lineLen && gotLDIF)
       {
         recCount++;
-        gotLDIF = PR_FALSE;
+        gotLDIF = false;
       }
                    
       if (lineLen && (*pChar != ' ') && (*pChar != 9))
       {
         fLen = 0;
 
         while (lineLen && (fLen < (kMaxLDIFLen - 1)) && (*pChar != ':'))
         {
@@ -855,17 +855,17 @@ NS_IMETHODIMP nsAbLDIFService::IsLDIFFil
         {
           // see if this is an ldif field (case insensitive)?
           i = 0;
           while (sLDIFFields[i])
           {
             if (!PL_strcasecmp( sLDIFFields[i], field))
             {
               ldifFields++;
-              gotLDIF = PR_TRUE;
+              gotLDIF = true;
               break;
             }
             i++;
           }
         }
       }
     }
     lineCount++;
@@ -878,17 +878,17 @@ NS_IMETHODIMP nsAbLDIFService::IsLDIFFil
   rv = fileStream->Close();
 
   if (recCount > 1)
     ldifFields /= recCount;
 
   // If the average field number >= 3 then it's a good ldif file.
   if (ldifFields >= 3)
   {
-    *_retval = PR_TRUE;
+    *_retval = true;
   }
 
   return rv;
 }
 
 void nsAbLDIFService::SplitCRLFAddressField(nsCString &inputAddress, nsCString &outputLine1, nsCString &outputLine2) const
 {
   PRInt32 crlfPos = inputAddress.Find("\r\n");
--- a/mailnews/addrbook/src/nsAbMDBCard.cpp
+++ b/mailnews/addrbook/src/nsAbMDBCard.cpp
@@ -46,17 +46,17 @@ nsAbMDBCard::~nsAbMDBCard(void)
 {
 }
 
 NS_IMPL_ISUPPORTS_INHERITED0(nsAbMDBCard, nsAbCardProperty)
 
 NS_IMETHODIMP nsAbMDBCard::Equals(nsIAbCard *card, bool *result)
 {
   if (this == card) {
-    *result = PR_TRUE;
+    *result = true;
     return NS_OK;
   }
 
   // If we have the same directory, we will equal the other card merely given
   // the row IDs. If not, we are never equal. But we are dumb in that we don't
   // know who our directory is, which may change in the future. For now,
   // however, the only known users of this method are for locating us in a list
   // of cards, most commonly mailing lists; a warning on the IDL has also
@@ -67,17 +67,17 @@ NS_IMETHODIMP nsAbMDBCard::Equals(nsIAbC
   // If the other directory is a local address book, we could return a spurious
   // true result. If not, then DbRowID should be unset and we can definitively
   // return false.
 
   PRUint32 row;
   nsresult rv = card->GetPropertyAsUint32("DbRowID", &row);
   if (NS_FAILED(rv))
   {
-    *result = PR_FALSE;
+    *result = false;
     return NS_OK;
   }
 
   PRUint32 ourRow;
   rv = GetPropertyAsUint32("DbRowID", &ourRow);
   NS_ENSURE_SUCCESS(rv, rv);
 
   *result = (row == ourRow);
--- a/mailnews/addrbook/src/nsAbMDBDirFactory.cpp
+++ b/mailnews/addrbook/src/nsAbMDBDirFactory.cpp
@@ -95,17 +95,17 @@ NS_IMETHODIMP nsAbMDBDirFactory::GetDire
       fileName = Substring(aURI, kMDBDirectoryRootLen, aURI.Length() - kMDBDirectoryRootLen);
 
     rv = dbPath->AppendNative(fileName);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsIAddrDatabase> addrDBFactory = do_GetService(NS_ADDRDATABASE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = addrDBFactory->Open(dbPath, PR_TRUE, PR_TRUE, getter_AddRefs(listDatabase));
+    rv = addrDBFactory->Open(dbPath, true, true, getter_AddRefs(listDatabase));
   }
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = listDatabase->GetMailingListsFromDB(directory);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_NewSingletonEnumerator(_retval, directory);
 }
--- a/mailnews/addrbook/src/nsAbMDBDirProperty.cpp
+++ b/mailnews/addrbook/src/nsAbMDBDirProperty.cpp
@@ -92,34 +92,34 @@ NS_IMETHODIMP nsAbMDBDirProperty::AddMai
   {
     nsresult rv;
     m_AddressList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   PRUint32 position;
   if (NS_FAILED(m_AddressList->IndexOf(0, mailList, &position)))
-    m_AddressList->AppendElement(mailList, PR_FALSE);
+    m_AddressList->AppendElement(mailList, false);
 
   return NS_OK;
 }
 
 /* add addresses to the mailing list */
 NS_IMETHODIMP nsAbMDBDirProperty::AddAddressToList(nsIAbCard *card)
 {
   if (!m_AddressList)
   {
     nsresult rv;
     m_AddressList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   PRUint32 position;
   if (NS_FAILED(m_AddressList->IndexOf(0, card, &position)))
-    m_AddressList->AppendElement(card, PR_FALSE);
+    m_AddressList->AppendElement(card, false);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbMDBDirProperty::CopyDBMailList(nsIAbMDBDirectory* srcListDB)
 {
 	nsresult err = NS_OK;
 	nsCOMPtr<nsIAbDirectory> srcList(do_QueryInterface(srcListDB));
--- a/mailnews/addrbook/src/nsAbMDBDirectory.cpp
+++ b/mailnews/addrbook/src/nsAbMDBDirectory.cpp
@@ -60,17 +60,17 @@
 #include "nsILocalFile.h"
 #include "nsComponentManagerUtils.h"
 #include "nsMemory.h"
 #include "nsArrayUtils.h"
 #include "nsUnicharUtils.h"
 
 nsAbMDBDirectory::nsAbMDBDirectory(void):
      nsAbMDBDirProperty(),
-     mPerformingQuery(PR_FALSE)
+     mPerformingQuery(false)
 {
   mSearchCache.Init();
 }
 
 nsAbMDBDirectory::~nsAbMDBDirectory(void)
 {
   if (mDatabase) {
     mDatabase->RemoveListener(this);
@@ -83,17 +83,17 @@ NS_IMPL_ISUPPORTS_INHERITED3(nsAbMDBDire
                              nsIAddrDBListener)
 
 NS_IMETHODIMP nsAbMDBDirectory::Init(const char *aUri)
 {
   // We need to ensure  that the m_DirPrefId is initialized properly
   nsDependentCString uri(aUri);
 
   if (uri.Find("MailList") != -1)
-    m_IsMailList = PR_TRUE;
+    m_IsMailList = true;
 
   // Mailing lists don't have their own prefs.
   if (m_DirPrefId.IsEmpty() && !m_IsMailList)
   {
     // Find the first ? (of the search params) if there is one.
     // We know we can start at the end of the moz-abmdbdirectory:// because
     // that's the URI we should have been passed.
     PRInt32 searchCharLocation = uri.FindChar('?', kMDBDirectoryRootLen);
@@ -188,17 +188,17 @@ nsresult nsAbMDBDirectory::RemoveCardFro
   NS_ENSURE_SUCCESS(rv,rv);
 
   for (i = listTotal - 1; i >= 0; i--)
   {
     nsCOMPtr<nsIAbDirectory> listDir(do_QueryElementAt(m_AddressList, i, &rv));
     if (listDir)
     {
       // First remove the instance in the database
-      mDatabase->DeleteCardFromMailList(listDir, card, PR_FALSE);
+      mDatabase->DeleteCardFromMailList(listDir, card, false);
 
       // Now remove the instance in any lists we hold.
       nsCOMPtr<nsIMutableArray> pAddressLists;
       listDir->GetAddressLists(getter_AddRefs(pAddressLists));
       if (pAddressLists)
       {  
         PRUint32 total;
         rv = pAddressLists->GetLength(&total);
@@ -389,17 +389,17 @@ NS_IMETHODIMP nsAbMDBDirectory::GetDatab
   nsCOMPtr<nsILocalFile> databaseFile;
   rv = GetDatabaseFile(getter_AddRefs(databaseFile));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIAddrDatabase> addrDBFactory =
     do_GetService(NS_ADDRDATABASE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  return addrDBFactory->Open(databaseFile, PR_FALSE /* no create */, PR_TRUE,
+  return addrDBFactory->Open(databaseFile, false /* no create */, true,
                            aResult);
 }
 
 // nsIAbDirectory methods
 
 NS_IMETHODIMP nsAbMDBDirectory::GetURI(nsACString &aURI)
 {
   if (mURI.IsEmpty())
@@ -417,17 +417,17 @@ NS_IMETHODIMP nsAbMDBDirectory::GetChild
   return NS_NewArrayEnumerator(aResult, mSubDirectories);
 }
 
 static PLDHashOperator 
 enumerateSearchCache(nsISupports *aKey, nsCOMPtr<nsIAbCard> &aData, void* aClosure)
 {
   nsIMutableArray* array = static_cast<nsIMutableArray*>(aClosure);
 
-  array->AppendElement(aData, PR_FALSE);
+  array->AppendElement(aData, false);
   return PL_DHASH_NEXT;
 }
 
 NS_IMETHODIMP nsAbMDBDirectory::GetChildCards(nsISimpleEnumerator* *result)
 {
   nsresult rv;
 
   if (mIsQueryURI)
@@ -509,17 +509,17 @@ NS_IMETHODIMP nsAbMDBDirectory::DeleteCa
       if (card)
       {
         PRUint32 rowID;
         rv = card->GetPropertyAsUint32("DbRowID", &rowID);
         NS_ENSURE_SUCCESS(rv, rv);
 
         if (m_IsMailList)
         {
-          mDatabase->DeleteCardFromMailList(this, card, PR_TRUE);
+          mDatabase->DeleteCardFromMailList(this, card, true);
 
           PRUint32 cardTotal = 0;
           PRInt32 i;
           if (m_AddressList)
             rv = m_AddressList->GetLength(&cardTotal);
           for (i = cardTotal - 1; i >= 0; i--)
           {            
             nsCOMPtr<nsIAbCard> arrayCard(do_QueryElementAt(m_AddressList, i, &rv));
@@ -530,17 +530,17 @@ NS_IMETHODIMP nsAbMDBDirectory::DeleteCa
               arrayCard->GetPropertyAsUint32("DbRowID", &arrayRowID);
               if (rowID == arrayRowID)
                 m_AddressList->RemoveElementAt(i);
             }
           }
         }
         else
         {
-          mDatabase->DeleteCard(card, PR_TRUE, this);
+          mDatabase->DeleteCard(card, true, this);
           bool bIsMailList = false;
           card->GetIsMailList(&bIsMailList);
           if (bIsMailList)
           {
             //to do, get mailing list dir side uri and notify nsIAbManager to remove it
             nsCAutoString listUri(mURI);
             listUri.AppendLiteral("/MailList");
             listUri.AppendInt(rowID);
@@ -648,20 +648,20 @@ NS_IMETHODIMP nsAbMDBDirectory::AddMailL
       return NS_ERROR_OUT_OF_MEMORY;
 
     rv = newlist->CopyMailList(list);
     NS_ENSURE_SUCCESS(rv, rv);
 
     dblist = do_QueryInterface(newlist, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     
-    mDatabase->CreateMailListAndAddToDB(newlist, PR_TRUE, this);
+    mDatabase->CreateMailListAndAddToDB(newlist, true, this);
   }
   else
-    mDatabase->CreateMailListAndAddToDB(list, PR_TRUE, this);
+    mDatabase->CreateMailListAndAddToDB(list, true, this);
 
   mDatabase->Commit(nsAddrDBCommitType::kLargeCommit);
 
   PRUint32 dbRowID;
   dblist->GetDbRowID(&dbRowID);
 
   nsCAutoString listUri(mURI);
   listUri.AppendLiteral("/MailList");
@@ -691,19 +691,19 @@ NS_IMETHODIMP nsAbMDBDirectory::AddCard(
   nsresult rv = NS_OK;
   if (!mDatabase)
     rv = GetAbDatabase();
 
   if (NS_FAILED(rv) || !mDatabase)
     return NS_ERROR_FAILURE;
 
   if (m_IsMailList)
-    rv = mDatabase->CreateNewListCardAndAddToDB(this, m_dbRowID, card, PR_TRUE /* notify */);
+    rv = mDatabase->CreateNewListCardAndAddToDB(this, m_dbRowID, card, true /* notify */);
   else
-    rv = mDatabase->CreateNewCardAndAddToDB(card, PR_TRUE, this);
+    rv = mDatabase->CreateNewCardAndAddToDB(card, true, this);
   NS_ENSURE_SUCCESS(rv, rv);
 
   mDatabase->Commit(nsAddrDBCommitType::kLargeCommit);
 
   NS_IF_ADDREF(*addedCard = card);
   return NS_OK;
 }
 
@@ -713,17 +713,17 @@ NS_IMETHODIMP nsAbMDBDirectory::ModifyCa
 
   nsresult rv;
   if (!mDatabase)
   {
     rv = GetAbDatabase();
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
-  rv = mDatabase->EditCard(aModifiedCard, PR_TRUE, this);
+  rv = mDatabase->EditCard(aModifiedCard, true, this);
   NS_ENSURE_SUCCESS(rv, rv);
   return mDatabase->Commit(nsAddrDBCommitType::kLargeCommit);
 }
 
 NS_IMETHODIMP nsAbMDBDirectory::DropCard(nsIAbCard* aCard, bool needToCopyCard)
 {
   NS_ENSURE_ARG_POINTER(aCard);
 
@@ -753,73 +753,73 @@ NS_IMETHODIMP nsAbMDBDirectory::DropCard
 
   if (m_IsMailList) {
     if (needToCopyCard) {
       nsCOMPtr <nsIMdbRow> cardRow;
       // if card doesn't exist in db, add the card to the directory that 
       // contains the mailing list.
       mDatabase->FindRowByCard(newCard, getter_AddRefs(cardRow));
       if (!cardRow)
-        mDatabase->CreateNewCardAndAddToDB(newCard, PR_TRUE /* notify */, this);
+        mDatabase->CreateNewCardAndAddToDB(newCard, true /* notify */, this);
       else
         mDatabase->InitCardFromRow(newCard, cardRow);
     }
     // since we didn't copy the card, we don't have to notify that it was inserted
-    mDatabase->CreateNewListCardAndAddToDB(this, m_dbRowID, newCard, PR_FALSE /* notify */);
+    mDatabase->CreateNewListCardAndAddToDB(this, m_dbRowID, newCard, false /* notify */);
   }
   else {
-    mDatabase->CreateNewCardAndAddToDB(newCard, PR_TRUE /* notify */, this);
+    mDatabase->CreateNewCardAndAddToDB(newCard, true /* notify */, this);
   }
   mDatabase->Commit(nsAddrDBCommitType::kLargeCommit);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbMDBDirectory::EditMailListToDatabase(nsIAbCard *listCard)
 {
   if (mIsQueryURI)
     return NS_ERROR_NOT_IMPLEMENTED;
 
   if (!m_IsMailList)
     return NS_ERROR_UNEXPECTED;
 
   nsresult rv = GetAbDatabase();
   NS_ENSURE_SUCCESS(rv, rv);
 
-  mDatabase->EditMailList(this, listCard, PR_TRUE);
+  mDatabase->EditMailList(this, listCard, true);
   mDatabase->Commit(nsAddrDBCommitType::kLargeCommit);
 
   return NS_OK;
 }
 
 static bool ContainsDirectory(nsIAbDirectory *parent, nsIAbDirectory *directory)
 {
   // If parent is a maillist, 'addressLists' contains AbCards.
   bool bIsMailList = false;
   nsresult rv = parent->GetIsMailList(&bIsMailList);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   if (bIsMailList)
-    return PR_FALSE;
+    return false;
 
   nsCOMPtr<nsIMutableArray> pAddressLists;
   parent->GetAddressLists(getter_AddRefs(pAddressLists));
   if (pAddressLists)
   {
     PRUint32 total;
     rv = pAddressLists->GetLength(&total);
     for (PRUint32 i = 0; i < total; ++i)
     {
       nsCOMPtr<nsIAbDirectory> pList(do_QueryElementAt(pAddressLists, i, &rv));
 
       if (directory == pList)
-          return PR_TRUE;
+          return true;
     }
   }
 
-  return PR_FALSE;
+  return false;
 }
 
 // nsIAddrDBListener methods
 
 NS_IMETHODIMP nsAbMDBDirectory::OnCardAttribChange(PRUint32 abCode)
 {
   return NS_OK;
 }
@@ -911,17 +911,17 @@ NS_IMETHODIMP nsAbMDBDirectory::OnAnnoun
 
 NS_IMETHODIMP nsAbMDBDirectory::StartSearch()
 {
   if (!mIsQueryURI)
     return NS_ERROR_FAILURE;
 
   nsresult rv;
 
-  mPerformingQuery = PR_TRUE;
+  mPerformingQuery = true;
   mSearchCache.Clear();
 
   nsCOMPtr<nsIAbDirectoryQueryArguments> arguments = do_CreateInstance(NS_ABDIRECTORYQUERYARGUMENTS_CONTRACTID,&rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIAbBooleanExpression> expression;
   rv = nsAbQueryStringToExpression::Convert(mQueryString,
     getter_AddRefs(expression));
@@ -930,17 +930,17 @@ NS_IMETHODIMP nsAbMDBDirectory::StartSea
   rv = arguments->SetExpression(expression);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // don't search the subdirectories 
   // if the current directory is a mailing list, it won't have any subdirectories
   // if the current directory is a addressbook, searching both it
   // and the subdirectories (the mailing lists), will yield duplicate results
   // because every entry in a mailing list will be an entry in the parent addressbook
-  rv = arguments->SetQuerySubDirectories(PR_FALSE);
+  rv = arguments->SetQuerySubDirectories(false);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIAbManager> abManager =
       do_GetService(NS_ABMANAGER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Get the directory without the query
   nsCOMPtr<nsIAbDirectory> directory;
@@ -982,17 +982,17 @@ NS_IMETHODIMP nsAbMDBDirectory::StopSear
 }
 
 
 // nsAbDirSearchListenerContext methods
 
 NS_IMETHODIMP nsAbMDBDirectory::OnSearchFinished(PRInt32 aResult,
                                                  const nsAString &aErrorMsg)
 {
-  mPerformingQuery = PR_FALSE;
+  mPerformingQuery = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbMDBDirectory::OnSearchFoundCard(nsIAbCard* card)
 {
   mSearchCache.Put(card, card);
 
   // TODO
@@ -1072,22 +1072,22 @@ NS_IMETHODIMP nsAbMDBDirectory::CardForE
 
   // Convert Email to lower case in UTF-16 format. This correctly lower-cases
   // it and doing this change means that we can use a hash lookup in the
   // database rather than searching and comparing each line individually.
   NS_ConvertUTF8toUTF16 lowerEmail(aEmailAddress);
   ToLowerCase(lowerEmail);
 
   mDatabase->GetCardFromAttribute(this, kLowerPriEmailColumn, NS_ConvertUTF16toUTF8(lowerEmail),
-                                  PR_FALSE, aAbCard);
+                                  false, aAbCard);
   if (!*aAbCard)
     // We don't have a lower case second email column, so we have to search
     // case-sensitively here.
     mDatabase->GetCardFromAttribute(this, k2ndEmailProperty, aEmailAddress,
-                                    PR_TRUE, aAbCard);
+                                    true, aAbCard);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbMDBDirectory::GetCardFromProperty(const char *aProperty,
                                                     const nsACString &aValue,
                                                     bool caseSensitive,
                                                     nsIAbCard **result)
--- a/mailnews/addrbook/src/nsAbManager.cpp
+++ b/mailnews/addrbook/src/nsAbManager.cpp
@@ -78,17 +78,17 @@ struct ExportAttributesTableStruct
   PRUint32 plainTextStringID;
 };
 
 // our schema is not fixed yet, but we still want some sort of objectclass
 // for now, use obsolete in the class name, hinting that this will change
 // see bugs bug #116692 and #118454
 #define MOZ_AB_OBJECTCLASS "mozillaAbPersonAlpha"
 
-// for now, the oder of the attributes with PR_TRUE for includeForPlainText
+// for now, the oder of the attributes with true for includeForPlainText
 // should be in the same order as they are in the import code
 // see importMsgProperties and nsImportStringBundle.
 // 
 // XXX todo, merge with what's in nsAbLDAPProperties.cpp, so we can
 // use this for LDAP and LDIF export
 //
 // here's how we're coming up with the ldapPropertyName values
 // if they are specified in RFC 2798, use them
@@ -172,21 +172,21 @@ nsresult nsAbManager::Init()
 {
   NS_ENSURE_TRUE(NS_IsMainThread(), NS_ERROR_FAILURE);
 
   nsresult rv;
   nsCOMPtr<nsIObserverService> observerService =
     do_GetService("@mozilla.org/observer-service;1", &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = observerService->AddObserver(this, "profile-do-change", PR_FALSE);
+  rv = observerService->AddObserver(this, "profile-do-change", false);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID,
-                                    PR_FALSE);
+                                    false);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbManager::Observe(nsISupports *aSubject, const char *aTopic,
                                    const PRUnichar *someData)
 {
@@ -472,17 +472,17 @@ NS_IMETHODIMP nsAbManager::GetUserProfil
   return CallQueryInterface(profileDir, userDir);
 }
 
 NS_IMETHODIMP nsAbManager::MailListNameExists(const PRUnichar *name, bool *exist)
 {
   nsresult rv;
   NS_ENSURE_ARG_POINTER(exist);
 
-  *exist = PR_FALSE;
+  *exist = false;
 
   // now get the top-level book
   nsCOMPtr<nsIAbDirectory> topDirectory;
   rv = GetRootDirectory(getter_AddRefs(topDirectory));
 
   // now go through the address books
   nsCOMPtr<nsISimpleEnumerator> enumerator;
   rv = topDirectory->GetChildNodes(getter_AddRefs(enumerator));
@@ -582,17 +582,17 @@ NS_IMETHODIMP nsAbManager::ExportAddress
   rv = filePicker->GetFile(getter_AddRefs(localFile));
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (dialogResult == nsIFilePicker::returnReplace) {
     // be extra safe and only delete when the file is really a file
     bool isFile;
     rv = localFile->IsFile(&isFile);
     if (NS_SUCCEEDED(rv) && isFile) {
-      rv = localFile->Remove(PR_FALSE /* recursive delete */);
+      rv = localFile->Remove(false /* recursive delete */);
       NS_ENSURE_SUCCESS(rv, rv);
     }
   }
 
   // The type of export is determined by the drop-down in
   // the file picker dialog.
   PRInt32 exportType;
   rv = filePicker->GetFilterIndex(&exportType);
@@ -602,41 +602,41 @@ NS_IMETHODIMP nsAbManager::ExportAddress
   rv = localFile->GetLeafName(fileName);
   NS_ENSURE_SUCCESS(rv, rv);
 
   switch ( exportType )
   {
     default:
     case LDIF_EXPORT_TYPE: // ldif
       // If filename does not have the correct ext, add one.
-      if ((MsgFind(fileName, LDIF_FILE_EXTENSION, PR_TRUE, fileName.Length() - strlen(LDIF_FILE_EXTENSION)) == -1) &&
-          (MsgFind(fileName, LDIF_FILE_EXTENSION2, PR_TRUE, fileName.Length() - strlen(LDIF_FILE_EXTENSION2)) == -1)) {
+      if ((MsgFind(fileName, LDIF_FILE_EXTENSION, true, fileName.Length() - strlen(LDIF_FILE_EXTENSION)) == -1) &&
+          (MsgFind(fileName, LDIF_FILE_EXTENSION2, true, fileName.Length() - strlen(LDIF_FILE_EXTENSION2)) == -1)) {
 
        // Add the extension and build a new localFile.
        fileName.AppendLiteral(LDIF_FILE_EXTENSION2);
        localFile->SetLeafName(fileName);
     }
       rv = ExportDirectoryToLDIF(aDirectory, localFile);
       break;
 
     case CSV_EXPORT_TYPE: // csv
       // If filename does not have the correct ext, add one.
-      if (MsgFind(fileName, CSV_FILE_EXTENSION, PR_TRUE, fileName.Length() - strlen(CSV_FILE_EXTENSION)) == -1) {
+      if (MsgFind(fileName, CSV_FILE_EXTENSION, true, fileName.Length() - strlen(CSV_FILE_EXTENSION)) == -1) {
 
        // Add the extension and build a new localFile.
        fileName.AppendLiteral(CSV_FILE_EXTENSION);
        localFile->SetLeafName(fileName);
     }
       rv = ExportDirectoryToDelimitedText(aDirectory, CSV_DELIM, CSV_DELIM_LEN, localFile);
       break;
 
     case TAB_EXPORT_TYPE: // tab & text
       // If filename does not have the correct ext, add one.
-      if ((MsgFind(fileName, TXT_FILE_EXTENSION, PR_TRUE, fileName.Length() - strlen(TXT_FILE_EXTENSION)) == -1) &&
-          (MsgFind(fileName, TAB_FILE_EXTENSION, PR_TRUE, fileName.Length() - strlen(TAB_FILE_EXTENSION)) == -1)) {
+      if ((MsgFind(fileName, TXT_FILE_EXTENSION, true, fileName.Length() - strlen(TXT_FILE_EXTENSION)) == -1) &&
+          (MsgFind(fileName, TAB_FILE_EXTENSION, true, fileName.Length() - strlen(TAB_FILE_EXTENSION)) == -1)) {
 
        // Add the extension and build a new localFile.
        fileName.AppendLiteral(TXT_FILE_EXTENSION);
        localFile->SetLeafName(fileName);
   }
       rv = ExportDirectoryToDelimitedText(aDirectory, TAB_DELIM, TAB_DELIM_LEN, localFile);
       break;
   };
@@ -741,38 +741,38 @@ nsAbManager::ExportDirectoryToDelimitedT
 
               // If a string contains at least one comma, tab or double quote then
               // we need to quote the entire string. Also if double quote is part
               // of the string we need to quote the double quote(s) as well.
               nsAutoString newValue(value);
               bool needsQuotes = false;
               if(newValue.FindChar('"') != -1)
               {
-                needsQuotes = PR_TRUE;
+                needsQuotes = true;
                 
                 PRInt32 match = 0;
                 PRUint32 offset = 0;
                 nsString oldSubstr = NS_LITERAL_STRING("\"");
                 nsString newSubstr = NS_LITERAL_STRING("\"\""); 
                 while (offset < newValue.Length()) {
                     match = newValue.Find(oldSubstr, offset);
                     if (match == -1)
                         break;
 
                     newValue.Replace(offset + match, oldSubstr.Length(), newSubstr);
                     offset += (match + newSubstr.Length());
                 }
               }
               if (!needsQuotes && (newValue.FindChar(',') != -1 || newValue.FindChar('\x09') != -1))
-                needsQuotes = PR_TRUE;
+                needsQuotes = true;
 
               // Make sure we quote if containing CR/LF.
               if (newValue.FindChar('\r') != -1 ||
                   newValue.FindChar('\n') != -1)
-                  needsQuotes = PR_TRUE;
+                  needsQuotes = true;
 
               if (needsQuotes)
               {
                 newValue.Insert(NS_LITERAL_STRING("\""), 0);
                 newValue.AppendLiteral("\"");
               }
 
               rv = nsMsgI18NConvertFromUnicode(nsMsgI18NFileSystemCharset(),
@@ -1096,29 +1096,29 @@ nsresult nsAbManager::AppendBasicLDIFFor
 }
 
 bool nsAbManager::IsSafeLDIFString(const PRUnichar *aStr)
 {
   // follow RFC 2849 to determine if something is safe "as is" for LDIF
   if (aStr[0] == PRUnichar(' ') ||
       aStr[0] == PRUnichar(':') ||
       aStr[0] == PRUnichar('<'))
-    return PR_FALSE;
+    return false;
 
   PRUint32 i;
   PRUint32 len = NS_strlen(aStr);
   for (i=0; i<len; i++) {
     // If string contains CR or LF, it is not safe for LDIF
     // and MUST be base64 encoded
     if ((aStr[i] == PRUnichar('\n')) ||
         (aStr[i] == PRUnichar('\r')) ||
         (!NS_IsAscii(aStr[i])))
-      return PR_FALSE;
+      return false;
   }
-  return PR_TRUE;
+  return true;
 }
 
 nsresult nsAbManager::AppendProperty(const char *aProperty, const PRUnichar *aValue, nsACString &aResult)
 {
   NS_ENSURE_ARG_POINTER(aValue);
 
   aResult += aProperty;
 
@@ -1263,29 +1263,29 @@ NS_IMETHODIMP nsAbManager::EscapedVCardT
 }
 
 NS_IMETHODIMP
 nsAbManager::Handle(nsICommandLine* aCmdLine)
 {
   nsresult rv;
   bool found;
 
-  rv = aCmdLine->HandleFlag(NS_LITERAL_STRING("addressbook"), PR_FALSE, &found);
+  rv = aCmdLine->HandleFlag(NS_LITERAL_STRING("addressbook"), false, &found);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (!found)
     return NS_OK;
 
   nsCOMPtr<nsIWindowWatcher> wwatch (do_GetService(NS_WINDOWWATCHER_CONTRACTID));
   NS_ENSURE_TRUE(wwatch, NS_ERROR_FAILURE);
 
   nsCOMPtr<nsIDOMWindow> opened;
   wwatch->OpenWindow(nsnull, "chrome://messenger/content/addressbook/addressbook.xul",
                      "_blank", "chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar", nsnull, getter_AddRefs(opened));
-  aCmdLine->SetPreventDefault(PR_TRUE);
+  aCmdLine->SetPreventDefault(true);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsAbManager::GetHelpInfo(nsACString& aResult)
 {
   aResult.Assign(NS_LITERAL_CSTRING("  -addressbook       Open the address book at startup.\n"));
   return NS_OK;
--- a/mailnews/addrbook/src/nsAbOSXCard.mm
+++ b/mailnews/addrbook/src/nsAbOSXCard.mm
@@ -161,39 +161,39 @@ MapMultiValue(nsAbOSXCard *aCard, ABReco
       if ([[value labelAtIndex:j] isEqualToString:aMap.mOSXLabel]) {
         NSString *stringValue = (aMap.mOSXKey)
           ? [[value valueAtIndex:j] objectForKey:aMap.mOSXKey]
           : [value valueAtIndex:j];
         
         SetStringProperty(aCard, stringValue, aMap.mPropertyName, aNotify,
                           aAbManager);
         
-        return PR_TRUE;
+        return true;
       }
     }
   }
   // String wasn't found, set value of card to empty if it was set previously
   SetStringProperty(aCard, EmptyString(), aMap.mPropertyName, aNotify,
                     aAbManager);
   
-  return PR_FALSE;
+  return false;
 }
 
 nsresult
 nsAbOSXCard::Init(const char *aUri)
 {
   if (strncmp(aUri, NS_ABOSXCARD_URI_PREFIX,
               sizeof(NS_ABOSXCARD_URI_PREFIX) - 1) != 0)
     return NS_ERROR_FAILURE;
 
   mURI = aUri;
 
   SetLocalId(nsDependentCString(aUri));
 
-  return Update(PR_FALSE);
+  return Update(false);
 }
 
 nsresult
 nsAbOSXCard::GetURI(nsACString &aURI)
 {
   if (mURI.IsEmpty())
     return NS_ERROR_NOT_INITIALIZED;
 
@@ -213,17 +213,17 @@ nsAbOSXCard::Update(bool aNotify)
   nsCOMPtr<nsIAbManager> abManager;
   nsresult rv;
   if (aNotify) {
     abManager = do_GetService(NS_ABMANAGER_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   if ([card isKindOfClass:[ABGroup class]]) {
-    m_IsMailList = PR_TRUE;
+    m_IsMailList = true;
     m_MailListURI.AssignLiteral(NS_ABOSXDIRECTORY_URI_PREFIX);
     m_MailListURI.Append(uid);
     MapStringProperty(this, card, kABGroupNameProperty, "DisplayName", aNotify,
                       abManager);
     MapStringProperty(this, card, kABGroupNameProperty, "LastName", aNotify,
                       abManager);
 
     return NS_OK;
@@ -236,19 +236,19 @@ nsAbOSXCard::Update(bool aNotify)
     const nsAbOSXPropertyMap &propertyMap = nsAbOSXUtils::kPropertyMap[i];
     if (!propertyMap.mOSXProperty)
       continue;
     
     if (propertyMap.mOSXLabel) {
       if (MapMultiValue(this, card, propertyMap, aNotify,
                         abManager) && propertyMap.mOSXProperty == kABAddressProperty) {
         if (propertyMap.mOSXLabel == kABAddressHomeLabel) 
-          foundHome = PR_TRUE;
+          foundHome = true;
         else
-          foundWork = PR_TRUE;
+          foundWork = true;
       }
     }
     else {
       MapStringProperty(this, card, propertyMap.mOSXProperty,
                         propertyMap.mPropertyName, aNotify, abManager);
     }
   }
   
--- a/mailnews/addrbook/src/nsAbOSXDirectory.mm
+++ b/mailnews/addrbook/src/nsAbOSXDirectory.mm
@@ -165,17 +165,17 @@ Sync(NSString *aUid)
     nsCOMPtr<nsIAbOSXDirectory> osxDirectory =
       do_QueryInterface(directory, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = GetCard(card, getter_AddRefs(abCard), osxDirectory);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsIAbOSXCard> osxCard = do_QueryInterface(abCard);
-    osxCard->Update(PR_TRUE);
+    osxCard->Update(true);
   }
   return NS_OK;
 }
 
 @interface ABChangedMonitor : NSObject
 -(void)ABChanged:(NSNotification *)aNotification;
 @end
 
@@ -267,75 +267,75 @@ Sync(NSString *aUid)
   }
 }
 @end
 
 static nsresult
 MapConditionString(nsIAbBooleanConditionString *aCondition, bool aNegate,
                    bool &aCanHandle, ABSearchElement **aResult)
 {
-  aCanHandle = PR_FALSE;
+  aCanHandle = false;
   
   nsAbBooleanConditionType conditionType = 0;
   nsresult rv = aCondition->GetCondition(&conditionType);
   NS_ENSURE_SUCCESS(rv, rv);
   
   ABSearchComparison comparison;
   switch (conditionType) {
     case nsIAbBooleanConditionTypes::Contains:
     {
       if (!aNegate) {
         comparison = kABContainsSubString;
-        aCanHandle = PR_TRUE;
+        aCanHandle = true;
       }
       break;
     }
     case nsIAbBooleanConditionTypes::DoesNotContain:
     {
       if (aNegate) {
         comparison = kABContainsSubString;
-        aCanHandle = PR_TRUE;
+        aCanHandle = true;
       }
       break;
     }
     case nsIAbBooleanConditionTypes::Is:
     {
       comparison = aNegate ? kABNotEqual : kABEqual;
-      aCanHandle = PR_TRUE;
+      aCanHandle = true;
       break;
     }
     case nsIAbBooleanConditionTypes::IsNot:
     {
       comparison = aNegate ? kABEqual : kABNotEqual;
-      aCanHandle = PR_TRUE;
+      aCanHandle = true;
       break;
     }
     case nsIAbBooleanConditionTypes::BeginsWith:
     {
       if (!aNegate) {
         comparison = kABPrefixMatch;
-        aCanHandle = PR_TRUE;
+        aCanHandle = true;
       }
       break;
     }
     case nsIAbBooleanConditionTypes::EndsWith:
     {
       //comparison = kABSuffixMatch;
       break;
     }
     case nsIAbBooleanConditionTypes::LessThan:
     {
       comparison = aNegate ? kABGreaterThanOrEqual : kABLessThan;
-      aCanHandle = PR_TRUE;
+      aCanHandle = true;
       break;
     }
     case nsIAbBooleanConditionTypes::GreaterThan:
     {
       comparison = aNegate ? kABLessThanOrEqual : kABGreaterThan;
-      aCanHandle = PR_TRUE;
+      aCanHandle = true;
       break;
     }
   }
   
   if (!aCanHandle)
     return NS_OK;
   
   nsCString name;
@@ -382,27 +382,27 @@ MapConditionString(nsIAbBooleanCondition
                                   value:[NSString stringWithCharacters:value.get() length:length]
                              comparison:comparison];
     
     *aResult = [ABSearchElement searchElementForConjunction:kABSearchOr children:[NSArray arrayWithObjects:first, second, third, nil]];
     
     return NS_OK;
   }
   
-  aCanHandle = PR_FALSE;
+  aCanHandle = false;
   
   return NS_OK;
 }
 
 static nsresult
 BuildSearchElements(nsIAbBooleanExpression *aExpression,
                     bool &aCanHandle,
                     ABSearchElement **aResult)
 {
-  aCanHandle = PR_TRUE;
+  aCanHandle = true;
   
   nsCOMPtr<nsIArray> expressions;
   nsresult rv = aExpression->GetExpressions(getter_AddRefs(expressions));
   NS_ENSURE_SUCCESS(rv, rv);
   
   nsAbBooleanOperationType operation;
   rv = aExpression->GetOperation(&operation);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -465,17 +465,17 @@ BuildSearchElements(nsIAbBooleanExpressi
 }
 
 static bool
 Search(nsIAbBooleanExpression *aExpression, NSArray **aResult)
 {
   bool canHandle = false;
   ABSearchElement *searchElement;
   nsresult rv = BuildSearchElements(aExpression, canHandle, &searchElement);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
   
   if (canHandle)
     *aResult = [[ABAddressBook sharedAddressBook] recordsMatchingSearchElement:searchElement];
 
   return canHandle;
 }
 
 static PRUint32 sObserverCount = 0;
@@ -516,17 +516,17 @@ nsAbOSXDirectory::Init(const char *aUri)
   }
   ++sObserverCount;
 
   NSArray *cards;
   nsCOMPtr<nsIMutableArray> cardList;
   bool isRootOSXDirectory = false;
 
   if (!mIsQueryURI && mURINoQuery.Length() <= sizeof(NS_ABOSXDIRECTORY_URI_PREFIX))
-    isRootOSXDirectory = PR_TRUE;
+    isRootOSXDirectory = true;
 
   if (mIsQueryURI || isRootOSXDirectory)
   {
     m_DirPrefId.AssignLiteral("ldap_2.servers.osx");
 
     cards = [[addressBook people] arrayByAddingObjectsFromArray:[addressBook groups]];
     if (!mCardList)
       mCardList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
@@ -537,17 +537,17 @@ nsAbOSXDirectory::Init(const char *aUri)
     cardList = mCardList;
   }
   else
   {
     nsCAutoString uid(Substring(mURINoQuery, sizeof(NS_ABOSXDIRECTORY_URI_PREFIX) - 1));
     ABRecord *card = [addressBook recordForUniqueId:[NSString stringWithUTF8String:uid.get()]];
     NS_ASSERTION([card isKindOfClass:[ABGroup class]], "Huh.");
 
-    m_IsMailList = PR_TRUE;
+    m_IsMailList = true;
     AppendToString([card valueForProperty:kABGroupNameProperty], m_ListDirName);
 
     ABGroup *group = (ABGroup*)[addressBook recordForUniqueId:[NSString stringWithUTF8String:nsCAutoString(Substring(mURINoQuery, 21)).get()]];
     cards = [[group members] arrayByAddingObjectsFromArray:[group subgroups]];
 
     if (!m_AddressList)
       m_AddressList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
     else
@@ -610,47 +610,47 @@ nsAbOSXDirectory::GetURI(nsACString &aUR
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsAbOSXDirectory::GetReadOnly(bool *aReadOnly)
 {
   NS_ENSURE_ARG_POINTER(aReadOnly);
 
-  *aReadOnly = PR_TRUE;
+  *aReadOnly = true;
   return NS_OK;
 }
 
 static bool
 CheckRedundantCards(nsIAbManager *aManager, nsIAbDirectory *aDirectory,
                     nsIAbCard *aCard, NSMutableArray *aCardList)
 {
   nsresult rv;
   nsCOMPtr<nsIAbOSXCard> osxCard = do_QueryInterface(aCard, &rv);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   nsCAutoString uri;
   rv = osxCard->GetURI(uri);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
   NSString *uid = [NSString stringWithUTF8String:(uri.get() + 21)];
   
   unsigned int i, count = [aCardList count];
   for (i = 0; i < count; ++i) {
     if ([[[aCardList objectAtIndex:i] uniqueId] isEqualToString:uid]) {
       [aCardList removeObjectAtIndex:i];
       break;
     }
   }
 
   if (i == count) {
     aManager->NotifyDirectoryItemDeleted(aDirectory, aCard);
-    return PR_TRUE;
+    return true;
   }
   
-  return PR_FALSE;
+  return false;
 }
 
 nsresult
 nsAbOSXDirectory::GetRootOSXDirectory(nsIAbOSXDirectory **aResult)
 {
   if (!mCacheTopLevelOSXAb)
   {
     // Attempt to get card from the toplevel directories
@@ -853,32 +853,32 @@ nsAbOSXDirectory::AssertDirectory(nsIAbM
     return NS_OK;
 
   nsresult rv;
   if (!m_AddressList) {
     m_AddressList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
   }
   
-  rv = m_AddressList->AppendElement(aDirectory, PR_FALSE);
+  rv = m_AddressList->AppendElement(aDirectory, false);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return aManager->NotifyDirectoryItemAdded(this, aDirectory);
 }
 
 nsresult
 nsAbOSXDirectory::AssertCard(nsIAbManager *aManager,
                              nsIAbCard *aCard)
 {
   nsCAutoString ourUuid;
   GetUuid(ourUuid);
   aCard->SetDirectoryId(ourUuid);
 
-  nsresult rv = m_IsMailList ? m_AddressList->AppendElement(aCard, PR_FALSE) :
-                               mCardList->AppendElement(aCard, PR_FALSE);
+  nsresult rv = m_IsMailList ? m_AddressList->AppendElement(aCard, false) :
+                               mCardList->AppendElement(aCard, false);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Get the card's URI and add it to our card store
   nsCOMPtr<nsIAbOSXCard> osxCard = do_QueryInterface(aCard, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCString uri;
   rv = osxCard->GetURI(uri);
@@ -976,17 +976,17 @@ nsAbOSXDirectory::GetChildCards(nsISimpl
 
       if (NS_FAILED(rv))
         rv = CreateCard([cards objectAtIndex:i],
                         getter_AddRefs(card));
 
       NS_ENSURE_SUCCESS(rv, rv);
       card->SetDirectoryId(ourUuid);
 
-      mCardList->AppendElement(card, PR_FALSE);
+      mCardList->AppendElement(card, false);
     }
 
     return NS_NewArrayEnumerator(aCards, mCardList);
   }
 
   // Not a search, so just return the appropriate list of items.
   return m_IsMailList ? NS_NewArrayEnumerator(aCards, m_AddressList) :
          NS_NewArrayEnumerator(aCards, mCardList);
@@ -1199,21 +1199,21 @@ nsAbOSXDirectory::HasCard(nsIAbCard *aCa
 
 NS_IMETHODIMP
 nsAbOSXDirectory::HasDirectory(nsIAbDirectory *aDirectory,
                                bool *aHasDirectory)
 {
   NS_ENSURE_ARG_POINTER(aDirectory);
   NS_ENSURE_ARG_POINTER(aHasDirectory);
   
-  *aHasDirectory = PR_FALSE;
+  *aHasDirectory = false;
 
   PRUint32 pos;
   if (m_AddressList && NS_SUCCEEDED(m_AddressList->IndexOf(0, aDirectory, &pos)))
-    *aHasDirectory = PR_TRUE;
+    *aHasDirectory = true;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsAbOSXDirectory::OnSearchFinished(PRInt32 aResult, const nsAString &aErrorMsg)
 {
   return NS_OK;
@@ -1228,20 +1228,20 @@ nsAbOSXDirectory::OnSearchFoundCard(nsIA
     NS_ENSURE_SUCCESS(rv, rv);
   }
   
   if (!mCardList) {
     mCardList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
-  rv = m_AddressList->AppendElement(aCard, PR_FALSE);
+  rv = m_AddressList->AppendElement(aCard, false);
   NS_ENSURE_SUCCESS(rv, rv);
   
-  rv = mCardList->AppendElement(aCard, PR_FALSE);
+  rv = mCardList->AppendElement(aCard, false);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCAutoString ourUuid;
   GetUuid(ourUuid);
   aCard->SetDirectoryId(ourUuid);
   
   return NS_OK;
 }
@@ -1273,17 +1273,17 @@ nsAbOSXDirectory::FallbackSearch(nsIAbBo
   rv = arguments->SetExpression(aExpression);
   NS_ENSURE_SUCCESS(rv, rv);
   
   // Don't search the subdirectories. If the current directory is a mailing
   // list, it won't have any subdirectories. If the current directory is an
   // addressbook, searching both it and the subdirectories (the mailing
   // lists), will yield duplicate results because every entry in a mailing
   // list will be an entry in the parent addressbook.
-  rv = arguments->SetQuerySubDirectories(PR_FALSE);
+  rv = arguments->SetQuerySubDirectories(false);
   NS_ENSURE_SUCCESS(rv, rv);
   
   // Get the directory without the query
   nsCOMPtr<nsIAbManager> abManager = do_GetService(NS_ABMANAGER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIAbDirectory> directory;
   rv = abManager->GetDirectory(mURINoQuery, getter_AddRefs(directory));
--- a/mailnews/addrbook/src/nsAbOutlookDirFactory.cpp
+++ b/mailnews/addrbook/src/nsAbOutlookDirFactory.cpp
@@ -104,17 +104,17 @@ nsAbOutlookDirFactory::GetDirectories(co
   for (ULONG i = 0; i < folders.mNbEntries; ++i) {
     folders.mEntries[i].ToString(entryId);
     buildAbWinUri(kOutlookDirectoryScheme, abType, uri);
     uri.Append(entryId);
 
 	nsCOMPtr<nsIAbDirectory> directory;
 	rv = abManager->GetDirectory(uri, getter_AddRefs(directory));
     NS_ENSURE_SUCCESS(rv, rv);
-    directories->AppendElement(directory, PR_FALSE);
+    directories->AppendElement(directory, false);
   }
   return NS_NewArrayEnumerator(aDirectories, directories);
 }
 
 // No actual deletion, since you cannot create the address books from Mozilla.
 NS_IMETHODIMP nsAbOutlookDirFactory::DeleteDirectory(nsIAbDirectory *aDirectory)
 {
   return NS_OK;
--- a/mailnews/addrbook/src/nsAbOutlookDirectory.cpp
+++ b/mailnews/addrbook/src/nsAbOutlookDirectory.cpp
@@ -122,21 +122,21 @@ NS_IMETHODIMP nsAbOutlookDirectory::Init
 
   if (mAbWinType == nsAbWinType_Outlook)
     prefix.AssignLiteral("OP ");
   else
     prefix.AssignLiteral("OE ");
   prefix.Append(unichars);
 
   if (objectType == MAPI_DISTLIST) {
-    m_IsMailList = PR_TRUE;
+    m_IsMailList = true;
     SetDirName(unichars);
   }
   else {
-    m_IsMailList = PR_FALSE;
+    m_IsMailList = false;
     SetDirName(prefix);
   }
 
   return UpdateAddressList();
 }
 
 // nsIAbDirectory methods
 
@@ -231,22 +231,22 @@ NS_IMETHODIMP nsAbOutlookDirectory::GetC
         // we must add the directory to m_AddressList
         nsCString mailListUri;
         rv = card->GetMailListURI(getter_Copies(mailListUri));
         NS_ENSURE_SUCCESS(rv, rv);
         nsCOMPtr<nsIAbDirectory> mailList;
         rv = abManager->GetDirectory(mailListUri, getter_AddRefs(mailList));
         NS_ENSURE_SUCCESS(rv, rv);
 
-        m_AddressList->AppendElement(mailList, PR_FALSE);
+        m_AddressList->AppendElement(mailList, false);
         NotifyItemAddition(mailList);
       }
       else if (m_IsMailList)
       {
-        m_AddressList->AppendElement(card, PR_FALSE);
+        m_AddressList->AppendElement(card, false);
         NotifyItemAddition(card);
       }
     }
   }
   return rv;
 }
 
 NS_IMETHODIMP nsAbOutlookDirectory::GetIsQuery(bool *aResult)
@@ -265,21 +265,21 @@ NS_IMETHODIMP nsAbOutlookDirectory::HasC
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbOutlookDirectory::HasDirectory(nsIAbDirectory *aDirectory, bool *aHasDirectory)
 {
   NS_ENSURE_ARG_POINTER(aDirectory);
   NS_ENSURE_ARG_POINTER(aHasDirectory);
 
-  *aHasDirectory = PR_FALSE;
+  *aHasDirectory = false;
 
   PRUint32 pos;
   if (m_AddressList && NS_SUCCEEDED(m_AddressList->IndexOf(0, aDirectory, &pos)))
-      *aHasDirectory = PR_TRUE;
+      *aHasDirectory = true;
 
   return NS_OK;
 }
 
 
 static nsresult ExtractCardEntry(nsIAbCard *aCard, nsCString& aEntry)
 {
   aEntry.Truncate();
@@ -411,17 +411,17 @@ NS_IMETHODIMP nsAbOutlookDirectory::AddC
 
     if (!m_AddressList)
     {
         m_AddressList = do_CreateInstance(NS_ARRAY_CONTRACTID, &retCode);
         NS_ENSURE_SUCCESS(retCode, retCode);
     }
 
     if (m_IsMailList)
-        m_AddressList->AppendElement(*addedCard, PR_FALSE);
+        m_AddressList->AppendElement(*addedCard, false);
     NotifyItemAddition(*addedCard) ;
     return retCode ;
 }
 
 NS_IMETHODIMP nsAbOutlookDirectory::DropCard(nsIAbCard *aData, bool needToCopyCard)
 {
     nsCOMPtr <nsIAbCard> addedCard;
     return AddCard(aData, getter_AddRefs(addedCard));
@@ -451,17 +451,17 @@ NS_IMETHODIMP nsAbOutlookDirectory::AddM
       mapiAddBook->CopyEntry(*mMapiData, sourceEntry, newEntry);
   }
   if (newEntry.mByteCount == 0)
   {
     if (!mapiAddBook->CreateDistList(*mMapiData, newEntry))
         return NS_ERROR_FAILURE;
   }
   else {
-    didCopy = PR_TRUE;
+    didCopy = true;
   }
   newEntry.ToString(entryString);
   nsCAutoString uri;
 
   buildAbWinUri(kOutlookDirectoryScheme, mAbWinType, uri);
   uri.Append(entryString);
 
   nsCOMPtr<nsIAbManager> abManager(do_GetService(NS_ABMANAGER_CONTRACTID,
@@ -480,17 +480,17 @@ NS_IMETHODIMP nsAbOutlookDirectory::AddM
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   if (!m_AddressList)
   {
     m_AddressList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
   }
-  m_AddressList->AppendElement(newList, PR_FALSE);
+  m_AddressList->AppendElement(newList, false);
   NotifyItemAddition(newList);
   NS_IF_ADDREF(*addedList = newList);
 
   return rv;
 }
 
 NS_IMETHODIMP nsAbOutlookDirectory::EditMailListToDatabase(nsIAbCard *listCard)
 {
@@ -574,34 +574,34 @@ static ULONG findPropertyTag(const char 
     return 0 ;
 }
 
 static nsresult BuildRestriction(nsIAbBooleanConditionString *aCondition, 
                                  SRestriction& aRestriction,
                                  bool& aSkipItem)
 {
     if (!aCondition) { return NS_ERROR_NULL_POINTER ; }
-    aSkipItem = PR_FALSE ;
+    aSkipItem = false ;
     nsAbBooleanConditionType conditionType = 0 ;
     nsresult retCode = NS_OK ;
     nsCString name;
     nsString value;
     ULONG propertyTag = 0 ;
     nsCAutoString valueAscii ;
     
     retCode = aCondition->GetCondition(&conditionType) ;
     NS_ENSURE_SUCCESS(retCode, retCode) ;
     retCode = aCondition->GetName(getter_Copies(name)) ;
     NS_ENSURE_SUCCESS(retCode, retCode) ;
     retCode = aCondition->GetValue(getter_Copies(value)) ;
     NS_ENSURE_SUCCESS(retCode, retCode) ;
     LossyCopyUTF16toASCII(value, valueAscii);
     propertyTag = findPropertyTag(name.get()) ;
     if (propertyTag == 0) {
-        aSkipItem = PR_TRUE ;
+        aSkipItem = true ;
         return retCode ;
     }
     switch (conditionType) {
     case nsIAbBooleanConditionTypes::Exists :
         aRestriction.rt = RES_EXIST ;
         aRestriction.res.resExist.ulPropTag = propertyTag ;
         break ;
     case nsIAbBooleanConditionTypes::DoesNotExist :
@@ -660,35 +660,35 @@ static nsresult BuildRestriction(nsIAbBo
 #if 0
         aRestriction.rt = RES_PROPERTY ;
         aRestriction.res.resProperty.relop = RELOP_RE ;
         aRestriction.res.resProperty.ulPropTag = propertyTag ;
         aRestriction.res.resProperty.lpProp = new SPropValue ;
         aRestriction.res.resProperty.lpProp->ulPropTag = propertyTag ;
         aRestriction.res.resProperty.lpProp->Value.lpszA = strdup(valueAscii.get()) ;
 #else
-        aSkipItem = PR_TRUE ;
+        aSkipItem = true ;
 #endif // 0
         break ;
     case nsIAbBooleanConditionTypes::SoundsLike :
         // This condition cannot be implemented in MAPI.
-        aSkipItem = PR_TRUE ;
+        aSkipItem = true ;
         break ;
     case nsIAbBooleanConditionTypes::RegExp :
         // This condition should be implemented this way, but the following
         // code will never match (through MAPI's fault).
 #if 0
         aRestriction.rt = RES_PROPERTY ;
         aRestriction.res.resProperty.relop = RELOP_RE ;
         aRestriction.res.resProperty.ulPropTag = propertyTag ;
         aRestriction.res.resProperty.lpProp = new SPropValue ;
         aRestriction.res.resProperty.lpProp->ulPropTag = propertyTag ;
         aRestriction.res.resProperty.lpProp->Value.lpszA = strdup(valueAscii.get()) ;
 #else
-        aSkipItem = PR_TRUE ;
+        aSkipItem = true ;
 #endif // 0
         break ;
     case nsIAbBooleanConditionTypes::LessThan :
         aRestriction.rt = RES_PROPERTY ;
         aRestriction.res.resProperty.relop = RELOP_LT ;
         aRestriction.res.resProperty.ulPropTag = propertyTag ;
         aRestriction.res.resProperty.lpProp = new SPropValue ;
         aRestriction.res.resProperty.lpProp->ulPropTag = propertyTag ;
@@ -698,17 +698,17 @@ static nsresult BuildRestriction(nsIAbBo
         aRestriction.rt = RES_PROPERTY ;
         aRestriction.res.resProperty.relop = RELOP_GT ;
         aRestriction.res.resProperty.ulPropTag = propertyTag ;
         aRestriction.res.resProperty.lpProp = new SPropValue ;
         aRestriction.res.resProperty.lpProp->ulPropTag = propertyTag ;
         aRestriction.res.resProperty.lpProp->Value.lpszA = strdup(valueAscii.get()) ;
         break ;
     default :
-        aSkipItem = PR_TRUE ;
+        aSkipItem = true ;
         break ;
     }
     return retCode ;
 }
 
 static nsresult BuildRestriction(nsIAbBooleanExpression *aLevel, 
                                  SRestriction& aRestriction)
 {
@@ -964,17 +964,17 @@ NS_IMETHODIMP nsAbOutlookDirectory::Star
     nsCOMPtr<nsIAbDirectoryQueryArguments> arguments = do_CreateInstance(NS_ABDIRECTORYQUERYARGUMENTS_CONTRACTID,&retCode);
     NS_ENSURE_SUCCESS(retCode, retCode);
 
     retCode = nsAbQueryStringToExpression::Convert(mQueryString, getter_AddRefs(expression)) ;
     NS_ENSURE_SUCCESS(retCode, retCode) ;
     retCode = arguments->SetExpression(expression) ;
     NS_ENSURE_SUCCESS(retCode, retCode) ;
 
-    retCode = arguments->SetQuerySubDirectories(PR_TRUE) ;
+    retCode = arguments->SetQuerySubDirectories(true) ;
     NS_ENSURE_SUCCESS(retCode, retCode) ;
 
     return DoQuery(this, arguments, this, -1, 0, &mSearchContext);
 }
 
 NS_IMETHODIMP nsAbOutlookDirectory::StopSearch(void) 
 {
     if (!mIsQueryURI) { return NS_ERROR_NOT_IMPLEMENTED ; }
@@ -1072,17 +1072,17 @@ nsresult nsAbOutlookDirectory::GetChildC
     cardEntries.mEntries[card].ToString(entryId);
     buildAbWinUri(kOutlookCardScheme, mAbWinType, uriName);
     uriName.Append(entryId);
 
     rv = OutlookCardForURI(uriName, getter_AddRefs(childCard));
     NS_ENSURE_SUCCESS(rv, rv);
     childCard->SetDirectoryId(ourUuid);
 
-    aCards->AppendElement(childCard, PR_FALSE);
+    aCards->AppendElement(childCard, false);
   }
   return rv;
 }
 
 nsresult nsAbOutlookDirectory::GetChildNodes(nsIMutableArray* aNodes)
 {
   NS_ENSURE_ARG_POINTER(aNodes);
 
@@ -1112,17 +1112,17 @@ nsresult nsAbOutlookDirectory::GetChildN
     nodeEntries.mEntries[node].ToString(entryId);
     buildAbWinUri(kOutlookDirectoryScheme, mAbWinType, uriName);
     uriName.Append(entryId);
 
     nsCOMPtr <nsIAbDirectory> directory;
     rv = abManager->GetDirectory(uriName, getter_AddRefs(directory));
     NS_ENSURE_SUCCESS(rv, rv);
 
-    aNodes->AppendElement(directory, PR_FALSE);
+    aNodes->AppendElement(directory, false);
   }
   return rv;
 }
 
 nsresult nsAbOutlookDirectory::NotifyItemDeletion(nsISupports *aItem) 
 {
   nsresult rv;
   nsCOMPtr<nsIAbManager> abManager(do_GetService(NS_ABMANAGER_CONTRACTID, &rv));
@@ -1181,17 +1181,17 @@ nsresult nsAbOutlookDirectory::CommitAdd
         NS_ENSURE_SUCCESS(rv, rv);
 
         // The entry was not already there
         nsCOMPtr<nsIAbCard> card(do_QueryInterface(element, &rv));
         NS_ENSURE_SUCCESS(rv, rv);
 
         rv = CreateCard(card, getter_AddRefs(newCard));
         NS_ENSURE_SUCCESS(rv, rv);
-        m_AddressList->ReplaceElementAt(newCard, i, PR_FALSE);
+        m_AddressList->ReplaceElementAt(newCard, i, false);
     }
   }
   return DeleteCards(oldList);
 }
 
 nsresult nsAbOutlookDirectory::UpdateAddressList(void)
 {
     if (!m_AddressList)
@@ -1224,17 +1224,17 @@ nsresult nsAbOutlookDirectory::CreateCar
         
         
         sourceEntry.Assign(entryString) ;
         if (m_IsMailList) {
             // In the case of a mailing list, we can use the address
             // as a direct template to build the new one (which is done
             // by CopyEntry).
             mapiAddBook->CopyEntry(*mMapiData, sourceEntry, newEntry) ;
-            didCopy = PR_TRUE ;
+            didCopy = true ;
         }
         else {
             // Else, we have to create a temporary address and copy the
             // source into it. Yes it's silly.
             mapiAddBook->CreateEntry(*mMapiData, newEntry) ;
         }
     }
     // If this approach doesn't work, well we're back to creating and copying.
@@ -1443,17 +1443,17 @@ NS_IMETHODIMP nsAbOutlookDirectory::OnQu
                                                   PRInt32 aErrorCode)
 {
   return OnSearchFinished(aResult, EmptyString());
 }
 
 NS_IMETHODIMP nsAbOutlookDirectory::UseForAutocomplete(const nsACString &aIdentityKey, bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = PR_FALSE;
+  *aResult = false;
   return NS_OK;
 }
 
 static void splitString(nsString& aSource, nsString& aTarget)
 {
   aTarget.Truncate();
   PRInt32 offset = aSource.FindChar('\n');
 
--- a/mailnews/addrbook/src/nsAbQueryStringToExpression.cpp
+++ b/mailnews/addrbook/src/nsAbQueryStringToExpression.cpp
@@ -154,17 +154,17 @@ nsresult nsAbQueryStringToExpression::Pa
     // Case: ")(*)(*)....(*))"
     // printf ("Case: )(*)(*)....(*)): %s\n", *index);
     while (**index == '(')
     {
         nsCOMPtr<nsISupports> childExpression;
         rv = ParseExpression(index, getter_AddRefs (childExpression));
         NS_ENSURE_SUCCESS(rv, rv);
 
-        expressions->AppendElement(childExpression, PR_FALSE);
+        expressions->AppendElement(childExpression, false);
     }
 
     if (**index == 0)
         return NS_ERROR_FAILURE;
 
     // Case: "))"
     // printf ("Case: )): %s\n", *index);
 
--- a/mailnews/addrbook/src/nsAbView.cpp
+++ b/mailnews/addrbook/src/nsAbView.cpp
@@ -68,19 +68,19 @@
 #define PREF_MAIL_ADDR_BOOK_DISPLAYNAME_AUTOGENERATION "mail.addr_book.displayName.autoGeneration"
 #define PREF_MAIL_ADDR_BOOK_DISPLAYNAME_LASTNAMEFIRST "mail.addr_book.displayName.lastnamefirst"
 
 // Also, our default primary sort
 #define GENERATED_NAME_COLUMN_ID "GeneratedName" 
 
 NS_IMPL_ISUPPORTS4(nsAbView, nsIAbView, nsITreeView, nsIAbListener, nsIObserver)
 
-nsAbView::nsAbView() : mInitialized(PR_FALSE),
-                       mSuppressSelectionChange(PR_FALSE),
-                       mSuppressCountChange(PR_FALSE),
+nsAbView::nsAbView() : mInitialized(false),
+                       mSuppressSelectionChange(false),
+                       mSuppressCountChange(false),
                        mGeneratedNameFormat(0)
 {
   mMailListAtom = MsgGetAtom("MailList");
 }
 
 nsAbView::~nsAbView()
 {
   if (mInitialized) {
@@ -95,17 +95,17 @@ NS_IMETHODIMP nsAbView::ClearView()
   if (mTree)
     mTree->SetView(nsnull);
   mTree = nsnull;
   mTreeSelection = nsnull;
 
   if (mInitialized)
   {
     nsresult rv;
-    mInitialized = PR_FALSE;
+    mInitialized = false;
     nsCOMPtr<nsIPrefBranch2> pbi(do_GetService(NS_PREFSERVICE_CONTRACTID,
                                                &rv));
     NS_ENSURE_SUCCESS(rv,rv);
 
     rv = pbi->RemoveObserver(PREF_MAIL_ADDR_BOOK_LASTNAMEFIRST, this);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsIAbManager> abManager(do_GetService(NS_ABMANAGER_CONTRACTID,
@@ -157,29 +157,29 @@ nsresult nsAbView::SetGeneratedNameForma
   return prefBranchInt->GetIntPref(PREF_MAIL_ADDR_BOOK_LASTNAMEFIRST, &mGeneratedNameFormat);
 }
 
 nsresult nsAbView::Initialize()
 {
   if (mInitialized)
     return NS_OK;
 
-  mInitialized = PR_TRUE;
+  mInitialized = true;
 
   nsresult rv;
   nsCOMPtr<nsIAbManager> abManager(do_GetService(NS_ABMANAGER_CONTRACTID, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = abManager->AddAddressBookListener(this, nsIAbListener::all);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIPrefBranch2> pbi(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = pbi->AddObserver(PREF_MAIL_ADDR_BOOK_LASTNAMEFIRST, this, PR_FALSE);
+  rv = pbi->AddObserver(PREF_MAIL_ADDR_BOOK_LASTNAMEFIRST, this, false);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (!mABBundle)
   {
     nsCOMPtr<nsIStringBundleService> stringBundleService =
       do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv); 
     NS_ENSURE_SUCCESS(rv, rv);
 
@@ -357,33 +357,33 @@ NS_IMETHODIMP nsAbView::GetCellPropertie
 
 NS_IMETHODIMP nsAbView::GetColumnProperties(nsITreeColumn* col, nsISupportsArray *properties)
 {
     return NS_OK;
 }
 
 NS_IMETHODIMP nsAbView::IsContainer(PRInt32 index, bool *_retval)
 {
-    *_retval = PR_FALSE;
+    *_retval = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP nsAbView::IsContainerOpen(PRInt32 index, bool *_retval)
 {
     return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsAbView::IsContainerEmpty(PRInt32 index, bool *_retval)
 {
     return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsAbView::IsSeparator(PRInt32 index, bool *_retval)
 {
-  *_retval = PR_FALSE;
+  *_retval = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAbView::IsSorted(bool *_retval)
 {
     return NS_ERROR_NOT_IMPLEMENTED;
 }
 
@@ -439,17 +439,17 @@ nsresult nsAbView::GetCardValue(nsIAbCar
 {
   // "G" == "GeneratedName", "_P" == "_PhoneticName"
   // else, standard column (like PrimaryEmail and _AimScreenName)
   if (colID[0] == PRUnichar('G'))
     return card->GenerateName(mGeneratedNameFormat, mABBundle, _retval);
 
   if (colID[0] == PRUnichar('_') && colID[1] == PRUnichar('P'))
     // Use LN/FN order for the phonetic name
-    return card->GeneratePhoneticName(PR_TRUE, _retval);
+    return card->GeneratePhoneticName(true, _retval);
 
   nsresult rv = card->GetPropertyAsAString(NS_ConvertUTF16toUTF8(colID).get(), _retval);
   if (rv == NS_ERROR_NOT_AVAILABLE) {
     rv = NS_OK;
     _retval.Truncate();
   }
   return rv;
 }
@@ -807,17 +807,17 @@ NS_IMETHODIMP nsAbView::OnItemAdded(nsIS
 
       abcard->card = addedCard;
       NS_IF_ADDREF(abcard->card);
     
       rv = GenerateCollationKeysForCard(mSortColumn.get(), abcard);
       NS_ENSURE_SUCCESS(rv,rv);
 
       PRInt32 index;
-      rv = AddCard(abcard, PR_FALSE /* select card */, &index);
+      rv = AddCard(abcard, false /* select card */, &index);
       NS_ENSURE_SUCCESS(rv,rv);
     }
   }
   return rv;
 }
 
 NS_IMETHODIMP nsAbView::Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *someData)
 {
@@ -844,17 +844,17 @@ nsresult nsAbView::AddCard(AbCard *abcar
     
   // This needs to happen after we insert the card, as RowCountChanged() will call GetRowCount()
   if (mTree)
     rv = mTree->RowCountChanged(*index, 1);
 
   // Checking for mTree here works around core bug 399227
   if (selectCardAfterAdding && mTreeSelection && mTree) {
     mTreeSelection->SetCurrentIndex(*index);
-    mTreeSelection->RangedSelect(*index, *index, PR_FALSE /* augment */);
+    mTreeSelection->RangedSelect(*index, *index, false /* augment */);
   }
 
   if (mAbViewListener && !mSuppressCountChange) {
     rv = mAbViewListener->OnCountChanged(mCards.Count());
     NS_ENSURE_SUCCESS(rv,rv);
   }
 
   return rv;
@@ -923,31 +923,31 @@ nsresult nsAbView::RemoveCardAndSelectNe
     if (index != CARD_NOT_FOUND) {
       bool selectNextCard = false;
       if (mTreeSelection) {
         PRInt32 selectedIndex;
         // XXX todo
         // Make sure it works if nothing selected
         mTreeSelection->GetCurrentIndex(&selectedIndex);
         if (index == selectedIndex)
-          selectNextCard = PR_TRUE;
+          selectNextCard = true;
       }
 
       rv = RemoveCardAt(index);
       NS_ENSURE_SUCCESS(rv,rv);
 
       if (selectNextCard) {
       PRInt32 count = mCards.Count();
       if (count && mTreeSelection) {
         // If we deleted the last card, adjust so we select the new "last" card
         if (index >= (count - 1)) {
           index = count -1;
         }
         mTreeSelection->SetCurrentIndex(index);
-        mTreeSelection->RangedSelect(index, index, PR_FALSE /* augment */);
+        mTreeSelection->RangedSelect(index, index, false /* augment */);
       }
     }
   }
   }
   return rv;
 }
 
 PRInt32 nsAbView::FindIndexForCard(nsIAbCard *card)
@@ -1013,29 +1013,29 @@ NS_IMETHODIMP nsAbView::OnItemPropertyCh
       nsMemory::Free(newCard->secondaryCollationKey);
     PR_FREEIF(newCard);
 
     // Still need to invalidate, as the other columns may have changed.
     rv = InvalidateTree(index);
     NS_ENSURE_SUCCESS(rv,rv);
   }
   else {
-    mSuppressSelectionChange = PR_TRUE;
-    mSuppressCountChange = PR_TRUE;
+    mSuppressSelectionChange = true;
+    mSuppressCountChange = true;
 
     // Remove the old card.
     rv = RemoveCardAt(index);
     NS_ASSERTION(NS_SUCCEEDED(rv), "remove card failed\n");
 
     // Add the card we created, and select it (to restore selection) if it was selected.
     rv = AddCard(newCard, cardWasSelected /* select card */, &index);
     NS_ASSERTION(NS_SUCCEEDED(rv), "add card failed\n");
 
-    mSuppressSelectionChange = PR_FALSE;
-    mSuppressCountChange = PR_FALSE;
+    mSuppressSelectionChange = false;
+    mSuppressCountChange = false;
 
     // Ensure restored selection is visible
     if (cardWasSelected && mTree) 
       mTree->EnsureRowIsVisible(index);
   }
 
   // Although the selection hasn't changed, the card that is selected may need
   // to be displayed differently, therefore pretend that the selection has
@@ -1085,17 +1085,17 @@ nsresult nsAbView::ReselectCards(nsIArra
   if (!count)
     return NS_OK;
 
   for (i = 0; i < count; i++) {
     nsCOMPtr<nsIAbCard> card = do_QueryElementAt(aCards, i);
     if (card) {
       PRInt32 index = FindIndexForCard(card);
       if (index != CARD_NOT_FOUND) {
-        mTreeSelection->RangedSelect(index, index, PR_TRUE /* augment */);
+        mTreeSelection->RangedSelect(index, index, true /* augment */);
       }
     }
   }
 
   // Reset the index card, and ensure it is visible.
   if (aIndexCard) {
     PRInt32 currentIndex = FindIndexForCard(aIndexCard);
     rv = mTreeSelection->SetCurrentIndex(currentIndex);
@@ -1149,17 +1149,17 @@ nsresult nsAbView::GetSelectedCards(nsCO
     PRInt32 totalCards = mCards.Count();
     if (startRange >= 0 && startRange < totalCards)
     {
       for (PRInt32 rangeIndex = startRange; rangeIndex <= endRange && rangeIndex < totalCards; rangeIndex++) {
         nsCOMPtr<nsIAbCard> abCard;
         rv = GetCardFromRow(rangeIndex, getter_AddRefs(abCard));
         NS_ENSURE_SUCCESS(rv,rv);
         
-        rv = aSelectedCards->AppendElement(abCard, PR_FALSE);
+        rv = aSelectedCards->AppendElement(abCard, false);
         NS_ENSURE_SUCCESS(rv, rv);
       }
     }
   }
 
   return NS_OK;
 }
 
@@ -1344,28 +1344,28 @@ NS_IMETHODIMP nsAbView::GetSelectedAddre
         NS_ENSURE_SUCCESS(rv,rv);
 
         rv = mailListCard->GetPrimaryEmail(primaryEmail);
         NS_ENSURE_SUCCESS(rv,rv);
 
         if (!primaryEmail.IsEmpty()) {
           nsCOMPtr<nsISupportsString> supportsEmail(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));
           supportsEmail->SetData(primaryEmail);
-          addresses->AppendElement(supportsEmail, PR_FALSE);
+          addresses->AppendElement(supportsEmail, false);
         }
       }
     }
     else {
       rv = card->GetPrimaryEmail(primaryEmail);
       NS_ENSURE_SUCCESS(rv,rv);
 
       if (!primaryEmail.IsEmpty()) {
         nsCOMPtr<nsISupportsString> supportsEmail(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));
         supportsEmail->SetData(primaryEmail);
-        addresses->AppendElement(supportsEmail, PR_FALSE);
+        addresses->AppendElement(supportsEmail, false);
       }
     }    
   }
 
   NS_IF_ADDREF(*_retval = addresses);
 
   return NS_OK;
 }
--- a/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
+++ b/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
@@ -103,17 +103,17 @@ NS_IMETHODIMP nsAddbookProtocolHandler::
   NS_ADDREF(*_retval = uri);
   return NS_OK;
 }
 
 NS_IMETHODIMP 
 nsAddbookProtocolHandler::AllowPort(PRInt32 port, const char *scheme, bool *_retval)
 {
     // don't override anything.  
-    *_retval = PR_FALSE;
+    *_retval = false;
     return NS_OK;
 }
 
 nsresult
 nsAddbookProtocolHandler::GenerateXMLOutputChannel( nsString &aOutput,
                                                      nsIAddbookUrl *addbookUrl,
                                                      nsIURI *aURI, 
                                                      nsIChannel **_retval)
@@ -159,17 +159,17 @@ nsAddbookProtocolHandler::NewChannel(nsI
   }
  
   if (mAddbookOperation == nsIAddbookUrlOperation::AddVCard) {
       // create an empty pipe for use with the input stream channel.
       nsCOMPtr<nsIAsyncInputStream> pipeIn;
       nsCOMPtr<nsIAsyncOutputStream> pipeOut;
       nsCOMPtr<nsIPipe> pipe = do_CreateInstance("@mozilla.org/pipe;1");
       
-      rv = pipe->Init(PR_FALSE, PR_FALSE, 0, 0, nsnull);
+      rv = pipe->Init(false, false, 0, 0, nsnull);
       NS_ENSURE_SUCCESS(rv, rv);
 
       pipe->GetInputStream(getter_AddRefs(pipeIn));
       pipe->GetOutputStream(getter_AddRefs(pipeOut));
       
       pipeOut->Close();
       
       return NS_NewInputStreamChannel(_retval, aURI, pipeIn,
--- a/mailnews/addrbook/src/nsAddrDatabase.cpp
+++ b/mailnews/addrbook/src/nsAddrDatabase.cpp
@@ -99,17 +99,17 @@ static const char kLowerListNameColumn[]
 struct mdbOid gAddressBookTableOID;
 
 static const char kMailListAddressFormat[] = "Address%d";
 
 nsAddrDatabase::nsAddrDatabase()
     : m_mdbEnv(nsnull), m_mdbStore(nsnull),
       m_mdbPabTable(nsnull),
       m_mdbDeletedCardsTable(nsnull),
-      m_mdbTokensInitialized(PR_FALSE),
+      m_mdbTokensInitialized(false),
       m_PabTableKind(0),
       m_MailListTableKind(0),
       m_DeletedCardsTableKind(0),
       m_CardRowScopeToken(0),
       m_FirstNameColumnToken(0),
       m_LastNameColumnToken(0),
       m_PhoneticFirstNameColumnToken(0),
       m_PhoneticLastNameColumnToken(0),
@@ -165,17 +165,17 @@ nsAddrDatabase::nsAddrDatabase()
       m_AddressCharSetColumnToken(0),
       m_LastRecordKey(0),
       m_dbDirectory(nsnull)
 {
 }
 
 nsAddrDatabase::~nsAddrDatabase()
 {
-    Close(PR_FALSE);    // better have already been closed.
+    Close(false);    // better have already been closed.
 
     // better not be any listeners, because we're going away.
     NS_ASSERTION(m_ChangeListeners.Length() == 0, "shouldn't have any listeners");
 
     RemoveFromCache(this);
 }
 
 NS_IMPL_THREADSAFE_ADDREF(nsAddrDatabase)
@@ -320,17 +320,17 @@ nsAddrDatabase* nsAddrDatabase::FindInCa
 }
 
 bool nsAddrDatabase::MatchDbName(nsIFile* dbName)    // returns true if they match
 {
     bool dbMatches = false;
 
     nsresult rv = m_dbName->Equals(dbName, &dbMatches);
     if (NS_FAILED(rv))
-      return PR_FALSE;
+      return false;
 
     return dbMatches;
 }
 
 //----------------------------------------------------------------------
 // RemoveFromCache
 //----------------------------------------------------------------------
 void nsAddrDatabase::RemoveFromCache(nsAddrDatabase* pAddrDB)
@@ -382,17 +382,17 @@ NS_IMETHODIMP nsAddrDatabase::Open
     return NS_OK;
 
   if (rv == NS_ERROR_FILE_ACCESS_DENIED)
   {
     static bool gAlreadyAlerted;
      // only do this once per session to avoid annoying the user
     if (!gAlreadyAlerted)
     {
-      gAlreadyAlerted = PR_TRUE;
+      gAlreadyAlerted = true;
       nsAutoString mabFileName;
       rv = aMabFile->GetLeafName(mabFileName);
       NS_ENSURE_SUCCESS(rv, rv);
       AlertAboutLockedMabFile(mabFileName.get());
 
       // We just overwrote rv, so return the proper value here.
       return NS_ERROR_FILE_ACCESS_DENIED;
     }
@@ -552,17 +552,17 @@ NS_IMETHODIMP nsAddrDatabase::OpenMDB(ns
 
       ret = dbName->GetNativePath(filePath);
       NS_ENSURE_SUCCESS(ret, ret);
 
       nsIMdbHeap* dbHeap = 0;
       mdb_bool dbFrozen = mdbBool_kFalse; // not readonly, we want modifiable
 
       if (m_mdbEnv)
-        m_mdbEnv->SetAutoClear(PR_TRUE);
+        m_mdbEnv->SetAutoClear(true);
 
       bool dbNameExists = false;
       ret = dbName->Exists(&dbNameExists);
       NS_ENSURE_SUCCESS(ret, ret);
 
       if (!dbNameExists)
         ret = NS_ERROR_FILE_NOT_FOUND;
       else
@@ -600,35 +600,35 @@ NS_IMETHODIMP nsAddrDatabase::OpenMDB(ns
         if (NS_FAILED(ret))
           ret = NS_ERROR_FILE_ACCESS_DENIED;
       }
 
       if (NS_SUCCEEDED(ret) && thumb)
       {
         mdb_count outTotal;    // total somethings to do in operation
         mdb_count outCurrent;  // subportion of total completed so far
-        mdb_bool outDone = PR_FALSE;      // is operation finished?
+        mdb_bool outDone = false;      // is operation finished?
         mdb_bool outBroken;     // is operation irreparably dead and broken?
         do
         {
           ret = thumb->DoMore(m_mdbEnv, &outTotal, &outCurrent, &outDone, &outBroken);
           if (ret != 0)
           {
-            outDone = PR_TRUE;
+            outDone = true;
             break;
           }
         }
         while (NS_SUCCEEDED(ret) && !outBroken && !outDone);
         if (NS_SUCCEEDED(ret) && outDone)
         {
           ret = mdbFactory->ThumbToOpenStore(m_mdbEnv, thumb, &m_mdbStore);
           if (ret == NS_OK && m_mdbStore)
           {
             ret = InitExistingDB();
-            create = PR_FALSE;
+            create = false;
           }
         }
       }
       else if (create && ret != NS_ERROR_FILE_ACCESS_DENIED)
       {
         nsIMdbFile* newFile = 0;
         ret = mdbFactory->CreateNewFile(m_mdbEnv, dbHeap, filePath.get(), &newFile);
         if ( newFile )
@@ -676,17 +676,17 @@ NS_IMETHODIMP nsAddrDatabase::ForceClose
     nsCOMPtr<nsIAddrDatabase> aDb(do_QueryInterface(this, &err));
 
     // make sure someone has a reference so object won't get deleted out from under us.
     AddRef();
     NotifyAnnouncerGoingAway();
     // OK, remove from cache first and close the store.
     RemoveFromCache(this);
 
-    err = CloseMDB(PR_FALSE);    // since we're about to delete it, no need to commit.
+    err = CloseMDB(false);    // since we're about to delete it, no need to commit.
     NS_IF_RELEASE(m_mdbStore);
     Release();
     return err;
 }
 
 NS_IMETHODIMP nsAddrDatabase::Commit(PRUint32 commitType)
 {
   nsresult err = NS_OK;
@@ -728,18 +728,18 @@ NS_IMETHODIMP nsAddrDatabase::Commit(PRU
         err = m_mdbStore->CompressCommit(m_mdbEnv, &commitThumb);
         break;
       }
   }
   if (commitThumb && m_mdbEnv)
   {
     mdb_count outTotal = 0;    // total somethings to do in operation
     mdb_count outCurrent = 0;  // subportion of total completed so far
-    mdb_bool outDone = PR_FALSE;      // is operation finished?
-    mdb_bool outBroken = PR_FALSE;     // is operation irreparably dead and broken?
+    mdb_bool outDone = false;      // is operation finished?
+    mdb_bool outBroken = false;     // is operation irreparably dead and broken?
     while (!outDone && !outBroken && err == NS_OK)
     {
       err = commitThumb->DoMore(m_mdbEnv, &outTotal, &outCurrent, &outDone, &outBroken);
     }
     NS_RELEASE(commitThumb);
   }
   // ### do something with error, but clear it now because mork errors out on commits.
   if (m_mdbEnv)
@@ -767,17 +767,17 @@ nsresult nsAddrDatabase::InitNewDB()
 
 nsresult nsAddrDatabase::AddRowToDeletedCardsTable(nsIAbCard *card, nsIMdbRow **pCardRow)
 {
   if (!m_mdbEnv)
     return NS_ERROR_NULL_POINTER;
 
   nsresult rv = NS_OK;
   if (!m_mdbDeletedCardsTable)
-    rv = InitDeletedCardsTable(PR_TRUE);
+    rv = InitDeletedCardsTable(true);
 
   if (NS_SUCCEEDED(rv)) {
     // lets first purge old records if there are more than PURGE_CUTOFF_COUNT records
     PurgeDeletedCardTable();
     nsCOMPtr<nsIMdbRow> cardRow;
     rv = GetNewRow(getter_AddRefs(cardRow));
     if (NS_SUCCEEDED(rv) && cardRow) {
       mdb_err merror = m_mdbDeletedCardsTable->AddRow(m_mdbEnv, cardRow);
@@ -803,17 +803,17 @@ nsresult nsAddrDatabase::AddRowToDeleted
 
       nsString value;
       GetCardValue(card, CARD_ATTRIB_PALMID, getter_Copies(value));
       if (!value.IsEmpty())
       {
         nsCOMPtr<nsIAbCard> addedCard;
         rv = CreateCardFromDeletedCardsTable(cardRow, 0, getter_AddRefs(addedCard));
         if (NS_SUCCEEDED(rv))
-          SetCardValue(addedCard, CARD_ATTRIB_PALMID, value.get(), PR_FALSE);
+          SetCardValue(addedCard, CARD_ATTRIB_PALMID, value.get(), false);
       }
       NS_IF_ADDREF(*pCardRow = cardRow);
     }
     Commit(nsAddrDBCommitType::kLargeCommit);
   }
   return rv;
 }
 
@@ -842,30 +842,30 @@ nsresult nsAddrDatabase::InitDeletedCard
     if (m_mdbStore && m_mdbEnv)
     {
       m_mdbStore->GetTable(m_mdbEnv, &deletedCardsTableOID, &m_mdbDeletedCardsTable);
       // if deletedCardsTable does not exist and bCreate is set, create a new one
       if (!m_mdbDeletedCardsTable && aCreate)
       {
         mdberr = (nsresult) m_mdbStore->NewTableWithOid(m_mdbEnv, &deletedCardsTableOID,
                                                         m_DeletedCardsTableKind,
-                                                        PR_TRUE, (const mdbOid*)nsnull,
+                                                        true, (const mdbOid*)nsnull,
                                                         &m_mdbDeletedCardsTable);
       }
     }
   }
   return mdberr;
 }
 
 nsresult nsAddrDatabase::InitPabTable()
 {
   return m_mdbStore && m_mdbEnv ? m_mdbStore->NewTableWithOid(m_mdbEnv,
                                                   &gAddressBookTableOID,
                                                   m_PabTableKind,
-                                                  PR_FALSE,
+                                                  false,
                                                   (const mdbOid*)nsnull,
                                                   &m_mdbPabTable)
       : NS_ERROR_NULL_POINTER;
 }
 
 //save the last record number, store in m_DataRowScopeToken, row 1
 nsresult nsAddrDatabase::InitLastRecorKey()
 {
@@ -1036,27 +1036,27 @@ nsresult nsAddrDatabase::UpdateLowercase
         if (IsCardRowScopeToken(rowOid.mOid_Scope))
         {
           err = GetStringColumn(findRow, m_LowerPriEmailColumnToken, tempString);
           if (NS_SUCCEEDED(err))
             break;
 
           err = ConvertAndAddLowercaseColumn(findRow, m_PriEmailColumnToken,
             m_LowerPriEmailColumnToken);
-          commitRequired = PR_TRUE;
+          commitRequired = true;
         }
         else if (IsListRowScopeToken(rowOid.mOid_Scope))
         {
           err = GetStringColumn(findRow, m_LowerListNameColumnToken, tempString);
           if (NS_SUCCEEDED(err))
             break;
 
           err = ConvertAndAddLowercaseColumn(findRow, m_ListNameColumnToken,
             m_LowerListNameColumnToken);
-          commitRequired = PR_TRUE;
+          commitRequired = true;
         }
       }
       findRow->Release();
     }
   } while (findRow);
 
   if (findRow)
     findRow->Release();
@@ -1098,17 +1098,17 @@ nsresult nsAddrDatabase::AddUnicodeToCol
 
 // initialize the various tokens and tables in our db's env
 nsresult nsAddrDatabase::InitMDBInfo()
 {
   nsresult err = NS_OK;
 
   if (!m_mdbTokensInitialized && m_mdbStore && m_mdbEnv)
   {
-    m_mdbTokensInitialized = PR_TRUE;
+    m_mdbTokensInitialized = true;
     err = m_mdbStore->StringToToken(m_mdbEnv, kCardRowScope, &m_CardRowScopeToken);
     err = m_mdbStore->StringToToken(m_mdbEnv, kListRowScope, &m_ListRowScopeToken);
     err = m_mdbStore->StringToToken(m_mdbEnv, kDataRowScope, &m_DataRowScopeToken);
     gAddressBookTableOID.mOid_Scope = m_CardRowScopeToken;
     gAddressBookTableOID.mOid_Id = ID_PAB_TABLE;
     if (NS_SUCCEEDED(err))
     {
       m_mdbStore->StringToToken(m_mdbEnv,  kFirstNameProperty, &m_FirstNameColumnToken);
@@ -1385,20 +1385,20 @@ NS_IMETHODIMP nsAddrDatabase::CreateNewL
       return NS_OK;
     }
   }
 
   // start from 1
   PRUint32 totalAddress = GetListAddressTotal(pListRow) + 1;
   SetListAddressTotal(pListRow, totalAddress);
   nsCOMPtr<nsIAbCard> pNewCard;
-  rv = AddListCardColumnsToRow(newCard, pListRow, totalAddress, getter_AddRefs(pNewCard), PR_TRUE /* aInMailingList */, aList, nsnull);
+  rv = AddListCardColumnsToRow(newCard, pListRow, totalAddress, getter_AddRefs(pNewCard), true /* aInMailingList */, aList, nsnull);
   NS_ENSURE_SUCCESS(rv,rv);
 
-  addressList->AppendElement(newCard, PR_FALSE);
+  addressList->AppendElement(newCard, false);
 
   if (notify)
     NotifyCardEntryChange(AB_NotifyInserted, newCard, aList);
 
     return rv;
 }
 
 NS_IMETHODIMP nsAddrDatabase::AddListCardColumnsToRow
@@ -1409,35 +1409,35 @@ NS_IMETHODIMP nsAddrDatabase::AddListCar
 
   nsresult    err = NS_OK;
   nsString email;
   aPCard->GetPrimaryEmail(email);
   if (!email.IsEmpty())
   {
     nsIMdbRow    *pCardRow = nsnull;
     // Please DO NOT change the 3rd param of GetRowFromAttribute() call to
-    // PR_TRUE (ie, case insensitive) without reading bugs #128535 and #121478.
+    // true (ie, case insensitive) without reading bugs #128535 and #121478.
     err = GetRowFromAttribute(kPriEmailProperty, NS_ConvertUTF16toUTF8(email),
-                              PR_FALSE /* retain case */, &pCardRow, nsnull);
+                              false /* retain case */, &pCardRow, nsnull);
     bool cardWasAdded = false;
     if (NS_FAILED(err) || !pCardRow)
     {
       //New Email, then add a new row with this email
       err  = GetNewRow(&pCardRow);
 
       if (NS_SUCCEEDED(err) && pCardRow)
       {
         AddPrimaryEmail(pCardRow, NS_ConvertUTF16toUTF8(email).get());
         err = m_mdbPabTable->AddRow(m_mdbEnv, pCardRow);
         // Create a key for this row as well.
         if (NS_SUCCEEDED(err))
           AddRecordKeyColumnToRow(pCardRow);
       }
 
-      cardWasAdded = PR_TRUE;
+      cardWasAdded = true;
     }
 
     NS_ENSURE_TRUE(pCardRow, NS_ERROR_NULL_POINTER);
 
     nsString name;
     aPCard->GetDisplayName(name);
     if (!name.IsEmpty()) {
       AddDisplayName(pCardRow, NS_ConvertUTF16toUTF8(name).get());
@@ -1553,17 +1553,17 @@ nsresult nsAddrDatabase::AddListAttribut
             // start from 1
             pos = i + 1;
             pCard->GetPrimaryEmail(email);
             if (!email.IsEmpty())
             {
                 nsCOMPtr<nsIAbCard> pNewCard;
                 err = AddListCardColumnsToRow(pCard, listRow, pos, getter_AddRefs(pNewCard), listHasCard, list, aParent);
                 if (pNewCard)
-                    pAddressLists->ReplaceElementAt(pNewCard, i, PR_FALSE);
+                    pAddressLists->ReplaceElementAt(pNewCard, i, false);
             }
         }
     }
     return NS_OK;
 }
 
 PRUint32 nsAddrDatabase::GetListAddressTotal(nsIMdbRow* listRow)
 {
@@ -1577,17 +1577,17 @@ NS_IMETHODIMP nsAddrDatabase::SetListAdd
     return AddIntColumn(aListRow, m_ListTotalColumnToken, aTotal);
 }
 
 NS_IMETHODIMP nsAddrDatabase::FindRowByCard(nsIAbCard * aCard,nsIMdbRow **aRow)
 {
     nsString primaryEmail;
     aCard->GetPrimaryEmail(primaryEmail);
     return GetRowForCharColumn(primaryEmail.get(), m_PriEmailColumnToken,
-                               PR_TRUE, PR_TRUE, aRow, nsnull);
+                               true, true, aRow, nsnull);
 }
 
 nsresult nsAddrDatabase::GetAddressRowByPos(nsIMdbRow* listRow, PRUint16 pos, nsIMdbRow** cardRow)
 {
   if (!m_mdbStore || !listRow || !cardRow || !m_mdbEnv)
     return NS_ERROR_NULL_POINTER;
 
   mdb_token listAddressColumnToken;
@@ -1878,17 +1878,17 @@ NS_IMETHODIMP nsAddrDatabase::GetDeleted
   *aResult = nsnull;
 
   nsresult rv;
   nsCOMPtr<nsIMutableArray> resultCardArray =
     do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // make sure the member is set properly
-  InitDeletedCardsTable(PR_FALSE);
+  InitDeletedCardsTable(false);
   if (m_mdbDeletedCardsTable)
   {
     nsCOMPtr<nsIMdbTableRowCursor>      rowCursor;
     mdb_pos                             rowPos;
     bool                                done = false;
     nsCOMPtr<nsIMdbRow>                 currentRow;
 
     m_mdbDeletedCardsTable->GetTableRowCursor(m_mdbEnv, -1, getter_AddRefs(rowCursor));
@@ -1900,35 +1900,35 @@ NS_IMETHODIMP nsAddrDatabase::GetDeleted
       if (currentRow && NS_SUCCEEDED(rv))
       {
         mdbOid rowOid;
         if (currentRow->GetOid(m_mdbEnv, &rowOid) == NS_OK)
         {
           nsCOMPtr<nsIAbCard>    card;
           rv = CreateCardFromDeletedCardsTable(currentRow, 0, getter_AddRefs(card));
           if (NS_SUCCEEDED(rv)) {
-            resultCardArray->AppendElement(card, PR_FALSE);
+            resultCardArray->AppendElement(card, false);
           }
         }
       }
       else
-          done = PR_TRUE;
+          done = true;
     }
   }
 
   NS_IF_ADDREF(*aResult = resultCardArray);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAddrDatabase::GetDeletedCardCount(PRUint32 *aCount)
 {
     // initialize count first
     *aCount = 0;
-    InitDeletedCardsTable(PR_FALSE);
+    InitDeletedCardsTable(false);
     if (m_mdbDeletedCardsTable)
       return m_mdbDeletedCardsTable->GetCount(m_mdbEnv, aCount);
     return NS_OK;
 }
 
 NS_IMETHODIMP nsAddrDatabase::PurgeDeletedCardTable()
 {
   if (!m_mdbEnv)
@@ -2167,18 +2167,18 @@ NS_IMETHODIMP nsAddrDatabase::AddLdifLis
   //add member
   nsCAutoString valueString(value);
   nsCAutoString email;
   PRInt32 emailPos = valueString.Find("mail=");
   emailPos += strlen("mail=");
   email = Substring(valueString, emailPos);
   nsCOMPtr <nsIMdbRow> cardRow;
   // Please DO NOT change the 3rd param of GetRowFromAttribute() call to
-  // PR_TRUE (ie, case insensitive) without reading bugs #128535 and #121478.
-  nsresult rv = GetRowFromAttribute(kPriEmailProperty, email, PR_FALSE /* retain case */,
+  // true (ie, case insensitive) without reading bugs #128535 and #121478.
+  nsresult rv = GetRowFromAttribute(kPriEmailProperty, email, false /* retain case */,
                                     getter_AddRefs(cardRow), nsnull);
   if (NS_SUCCEEDED(rv) && cardRow)
   {
     mdbOid outOid;
     mdb_id rowID = 0;
     if (cardRow->GetOid(m_mdbEnv, &outOid) == NS_OK)
       rowID = outOid.mOid_Id;
 
@@ -2374,17 +2374,17 @@ nsresult nsAddrDatabase::GetBoolColumn(n
             cardCell->AliasYarn(m_mdbEnv, &yarn);
             YarnToUInt32(&yarn, &nValue);
             cardCell->Release();
         }
         else
             err = NS_ERROR_FAILURE;
     }
 
-    *pValue = nValue ? PR_TRUE : PR_FALSE;
+    *pValue = nValue ? true : false;
     return err;
 }
 
 /*  value is UTF8 string */
 NS_IMETHODIMP nsAddrDatabase::AddPrimaryEmail(nsIMdbRow *aRow, const char *aValue)
 {
   NS_ENSURE_ARG_POINTER(aValue);
 
@@ -2612,17 +2612,17 @@ void nsAddrDBEnumerator::Clear()
 }
 
 NS_IMPL_ISUPPORTS2(nsAddrDBEnumerator, nsISimpleEnumerator, nsIAddrDBListener)
 
 NS_IMETHODIMP
 nsAddrDBEnumerator::HasMoreElements(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
-    *aResult = PR_FALSE;
+    *aResult = false;
 
     if (!mDbTable || !mDb->GetEnv())
     {
         return NS_ERROR_NULL_POINTER;
     }
 
     nsCOMPtr<nsIMdbTableRowCursor> rowCursor;
     mDbTable->GetTableRowCursor(mDb->GetEnv(), mRowPos,
@@ -2631,17 +2631,17 @@ nsAddrDBEnumerator::HasMoreElements(bool
 
     mdbOid rowOid;
     rowCursor->NextRowOid(mDb->GetEnv(), &rowOid, nsnull);
     while (rowOid.mOid_Id != (mdb_id)-1)
     {
         if (mDb->IsListRowScopeToken(rowOid.mOid_Scope) ||
             mDb->IsCardRowScopeToken(rowOid.mOid_Scope))
         {
-            *aResult = PR_TRUE;
+            *aResult = true;
 
             return NS_OK;
         }
 
         if (!mDb->IsDataRowScopeToken(rowOid.mOid_Scope))
         {
             return NS_ERROR_FAILURE;
         }
@@ -2767,17 +2767,17 @@ nsListAddressEnumerator::nsListAddressEn
 
 NS_IMPL_ISUPPORTS1(nsListAddressEnumerator, nsISimpleEnumerator)
 
 NS_IMETHODIMP
 nsListAddressEnumerator::HasMoreElements(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
 
-  *aResult = PR_FALSE;
+  *aResult = false;
 
   if (!mDbTable || !mDb->GetEnv())
   {
     return NS_ERROR_NULL_POINTER;
   }
 
   // In some cases it is possible that GetAddressRowByPos returns success,
   // but currentRow is null. This is typically due to the fact that a card
@@ -2790,17 +2790,17 @@ nsListAddressEnumerator::HasMoreElements
   {
     nsCOMPtr<nsIMdbRow> currentRow;
     nsresult rv = mDb->GetAddressRowByPos(mListRow, mAddressPos + 1,
                                           getter_AddRefs(currentRow));
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (currentRow)
     {
-      *aResult = PR_TRUE;
+      *aResult = true;
       break;
     }
 
     ++mAddressPos;
   }
 
   return NS_OK;
 }
@@ -2879,17 +2879,17 @@ NS_IMETHODIMP nsAddrDatabase::GetMailing
 
             if (currentRow->GetOid(m_mdbEnv, &rowOid) == NS_OK)
             {
                 if (IsListRowScopeToken(rowOid.mOid_Scope))
                     rv = CreateABList(currentRow, getter_AddRefs(resultList));
             }
         }
         else
-            done = PR_TRUE;
+            done = true;
     }
         NS_IF_RELEASE(rowCursor);
     return NS_OK;
 }
 
 NS_IMETHODIMP nsAddrDatabase::EnumerateListAddresses(nsIAbDirectory *directory, nsISimpleEnumerator **result)
 {
     nsresult rv = NS_OK;
@@ -3011,17 +3011,17 @@ nsresult nsAddrDatabase::CreateABListCar
         personCard = do_CreateInstance(NS_ABMDBCARD_CONTRACTID, &rv);
         NS_ENSURE_SUCCESS(rv,rv);
 
         if (personCard)
         {
             GetListCardFromDB(personCard, listRow);
 
             personCard->SetPropertyAsUint32(kRowIDProperty, rowID);
-            personCard->SetIsMailList(PR_TRUE);
+            personCard->SetIsMailList(true);
             personCard->SetMailListURI(listURI);
 
             nsCAutoString id;
             id.AppendInt(rowID);
             personCard->SetLocalId(id);
 
             nsCOMPtr<nsIAbDirectory> abDir(do_QueryReferent(m_dbDirectory));
             if (abDir)
@@ -3077,17 +3077,17 @@ nsresult nsAddrDatabase::CreateABList(ns
             // be a mailing list, with a valid row and all the entries
             // in that scenario, we can skip GetListFromDB(), which would have
             // have added all the cards to the list again.
             // see bug #134743
             mdb_id existingID;
             dbmailList->GetDbRowID(&existingID);
             if (existingID != rowID) {
               // Ensure IsMailList is set up first.
-              mailList->SetIsMailList(PR_TRUE);
+              mailList->SetIsMailList(true);
               GetListFromDB(mailList, listRow);
               dbmailList->SetDbRowID(rowID);
             }
 
             dbm_dbDirectory->AddMailListToDirectory(mailList);
             NS_IF_ADDREF(*result = mailList);
         }
     }
@@ -3132,17 +3132,17 @@ nsresult nsAddrDatabase::GetRowFromAttri
   NS_ENSURE_ARG_POINTER(aCardRow);
   if (!m_mdbStore || !m_mdbEnv)
     return NS_ERROR_NULL_POINTER;
 
   mdb_token token;
   m_mdbStore->StringToToken(m_mdbEnv, aName, &token);
   NS_ConvertUTF8toUTF16 newUnicodeString(aUTF8Value);
 
-  return GetRowForCharColumn(newUnicodeString.get(), token, PR_TRUE,
+  return GetRowForCharColumn(newUnicodeString.get(), token, true,
                              aCaseInsensitive, aCardRow, aRowPos);
 }
 
 NS_IMETHODIMP nsAddrDatabase::GetCardFromAttribute(nsIAbDirectory *aDirectory,
                                                    const char *aName,
                                                    const nsACString &aUTF8Value,
                                                    bool aCaseInsensitive,
                                                    nsIAbCard **aCardResult)
@@ -3179,17 +3179,17 @@ NS_IMETHODIMP nsAddrDatabase::GetCardsFr
     if (NS_SUCCEEDED(GetRowFromAttribute(aName, aUTF8Value, aCaseInsensitive,
                                          getter_AddRefs(row), &rowPos)) && row)
     {
       if (NS_FAILED(CreateABCard(row, 0, getter_AddRefs(card))))
         continue;
       list.AppendObject(card);
     }
     else
-      done = PR_TRUE;
+      done = true;
   } while (!done);
 
   return NS_NewArrayEnumerator(cards, list);
 }
 
 NS_IMETHODIMP nsAddrDatabase::AddListDirNode(nsIMdbRow * listRow)
 {
   nsresult rv = NS_OK;
@@ -3227,18 +3227,18 @@ NS_IMETHODIMP nsAddrDatabase::AddListDir
 
 NS_IMETHODIMP nsAddrDatabase::FindMailListbyUnicodeName(const PRUnichar *listName, bool *exist)
 {
   nsAutoString unicodeString(listName);
   ToLowerCase(unicodeString);
 
   nsCOMPtr <nsIMdbRow> listRow;
   nsresult rv = GetRowForCharColumn(unicodeString.get(),
-                                    m_LowerListNameColumnToken, PR_FALSE,
-                                    PR_FALSE, getter_AddRefs(listRow), nsnull);
+                                    m_LowerListNameColumnToken, false,
+                                    false, getter_AddRefs(listRow), nsnull);
   *exist = (NS_SUCCEEDED(rv) && listRow);
   return rv;
 }
 
 NS_IMETHODIMP nsAddrDatabase::GetCardCount(PRUint32 *count)
 {
     mdb_err rv;
     mdb_count c;
@@ -3248,17 +3248,17 @@ NS_IMETHODIMP nsAddrDatabase::GetCardCou
 
     return rv;
 }
 
 bool
 nsAddrDatabase::HasRowButDeletedForCharColumn(const PRUnichar *unicodeStr, mdb_column findColumn, bool aIsCard, nsIMdbRow **aFindRow)
 {
   if (!m_mdbStore || !aFindRow || !m_mdbEnv)
-    return PR_FALSE;
+    return false;
 
   mdbYarn    sourceYarn;
 
   NS_ConvertUTF16toUTF8 UTF8String(unicodeStr);
   sourceYarn.mYarn_Buf = (void *) UTF8String.get();
   sourceYarn.mYarn_Fill = UTF8String.Length();
   sourceYarn.mYarn_Form = 0;
   sourceYarn.mYarn_Size = sourceYarn.mYarn_Fill;
@@ -3268,29 +3268,29 @@ nsAddrDatabase::HasRowButDeletedForCharC
 
   if (aIsCard)
   {
     rv = m_mdbStore->FindRow(m_mdbEnv, m_CardRowScopeToken,
       findColumn, &sourceYarn,  &outRowId, aFindRow);
 
     // no such card, so bail out early
     if (NS_FAILED(rv) || !*aFindRow)
-      return PR_FALSE;
+      return false;
 
     // we might not have loaded the "delete cards" table yet
     // so do that (but don't create it, if we don't have one),
     // so we can see if the row is really a delete card.
     if (!m_mdbDeletedCardsTable)
-      rv = InitDeletedCardsTable(PR_FALSE);
+      rv = InitDeletedCardsTable(false);
 
     // if still no deleted cards table, there are no deleted cards
     if (!m_mdbDeletedCardsTable)
-      return PR_FALSE;
-
-    mdb_bool hasRow = PR_FALSE;
+      return false;
+
+    mdb_bool hasRow = false;
     rv = m_mdbDeletedCardsTable->HasRow(m_mdbEnv, *aFindRow, &hasRow);
     return (NS_SUCCEEDED(rv) && hasRow);
   }
 
   rv = m_mdbStore->FindRow(m_mdbEnv, m_ListRowScopeToken,
     findColumn, &sourceYarn,  &outRowId, aFindRow);
   return (NS_SUCCEEDED(rv) && *aFindRow);
 }
@@ -3383,17 +3383,17 @@ nsAddrDatabase::GetRowForCharColumn(cons
           NS_IF_ADDREF(*aFindRow = currentRow);
           if (aRowPos)
             *aRowPos = rowPos;
           return NS_OK;
         }
       }
     }
     else
-      done = PR_TRUE;
+      done = true;
   }
   return NS_ERROR_FAILURE;
 }
 
 nsresult nsAddrDatabase::DeleteRow(nsIMdbTable* dbTable, nsIMdbRow* dbRow)
 {
   if (!m_mdbEnv)
     return NS_ERROR_NULL_POINTER;
--- a/mailnews/addrbook/src/nsDirPrefs.cpp
+++ b/mailnews/addrbook/src/nsDirPrefs.cpp
@@ -196,17 +196,17 @@ static nsresult DIR_GetDirServers()
         return rv;
       prefObserver = new DirPrefObserver();
 
       if (!prefObserver)
         return NS_ERROR_OUT_OF_MEMORY;
 
       NS_ADDREF(prefObserver);
 
-      pbi->AddObserver(PREF_LDAP_SERVER_TREE_NAME, prefObserver, PR_TRUE);
+      pbi->AddObserver(PREF_LDAP_SERVER_TREE_NAME, prefObserver, true);
     }
   }
   return rv;
 }
 
 nsVoidArray* DIR_GetDirectories()
 {
     if (!dir_ServerList)
@@ -275,22 +275,22 @@ nsresult DIR_ContainsServer(DIR_Server* 
   {
     PRInt32 count = dir_ServerList->Count();
     PRInt32 i;
     for (i = 0; i < count; i++)
     {
       DIR_Server* server = (DIR_Server *)(dir_ServerList->ElementAt(i));
       if (server == pServer)
       {
-        *hasDir = PR_TRUE;
+        *hasDir = true;
         return NS_OK;
       }
     }
   }
-  *hasDir = PR_FALSE;
+  *hasDir = false;
   return NS_OK;
 }
 
 nsresult DIR_AddNewAddressBook(const nsAString &dirName,
                                const nsACString &fileName,
                                const nsACString &uri, 
                                DirectoryType dirType,
                                const nsACString &prefName,
@@ -343,53 +343,53 @@ static void DIR_InitServer(DIR_Server *s
   if (!server) {
     NS_WARNING("DIR_InitServer: server parameter not initialized");
     return;
   }
 
   memset(server, 0, sizeof(DIR_Server));
   server->position = kDefaultPosition;
   server->uri = nsnull;
-  server->savingServer = PR_FALSE;
+  server->savingServer = false;
   server->dirType = dirType;
 }
 
 /* Function for setting the position of a server.  Can be used to append,
  * delete, or move a server in a server list.
  *
  * The third parameter specifies the new position the server is to occupy.
  * The resulting position may differ depending on the lock state of the
  * given server and other servers in the list.  The following special values
  * are supported:
  *   DIR_POS_APPEND - Appends the server to the end of the list.  If the server
  *                    is already in the list, does nothing.
  *   DIR_POS_DELETE - Deletes the given server from the list.  Note that this
  *                    does not cause the server structure to be freed.
  *
- * Returns PR_TRUE if the server list was re-sorted.
+ * Returns true if the server list was re-sorted.
  */
 static bool DIR_SetServerPosition(nsVoidArray *wholeList, DIR_Server *server, PRInt32 position)
  {
-   NS_ENSURE_TRUE(wholeList, PR_FALSE);
+   NS_ENSURE_TRUE(wholeList, false);
 
    PRInt32    i, count, num;
    bool       resort = false;
    DIR_Server *s=nsnull;
    
    switch (position) {
    case DIR_POS_APPEND:
    /* Do nothing if the request is to append a server that is already
      * in the list.
      */
      count = wholeList->Count();
      for (i= 0; i < count; i++)
      {
        if  ((s = (DIR_Server *)wholeList->ElementAt(i)) != nsnull)
          if (s == server)
-           return PR_FALSE;
+           return false;
      }
      /* In general, if there are any servers already in the list, set the
      * position to the position of the last server plus one.  If there
      * are none, set it to position 1.
      */
      if (count > 0)
      {
        s = (DIR_Server *)wholeList->ElementAt(count - 1);
@@ -406,17 +406,17 @@ static bool DIR_SetServerPosition(nsVoid
        * value is nsnull, the server has never been saved and there are no
        * prefs to remove.
      */
      if (server->prefName)
      {
        nsresult rv;
        nsCOMPtr<nsIPrefBranch> pPref(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
        if (NS_FAILED(rv))
-         return PR_FALSE;
+         return false;
 
        pPref->DeleteBranch(server->prefName);
 
        // mark the server as deleted by setting its position to 0
        DIR_SetIntPref(server->prefName, "position", 0, -1);
      }
      
      /* If the server is in the server list, remove it.
@@ -429,17 +429,17 @@ static bool DIR_SetServerPosition(nsVoid
        */
        count = wholeList->Count();
        if (num == count - 1)
        {
          wholeList->RemoveElementAt(num);
        }
        else
        {
-         resort = PR_TRUE;
+         resort = true;
          wholeList->RemoveElement(server);
        }
      }
      break;
      
    default:
    /* See if the server is already in the list.
      */
@@ -452,27 +452,27 @@ static bool DIR_SetServerPosition(nsVoid
      }
      
      /* If the server is not in the list, add it to the beginning and re-sort.
      */
      if (s == nsnull)
      {
        server->position = position;
        wholeList->AppendElement(server);
-       resort = PR_TRUE;
+       resort = true;
      }
      
        /* Don't re-sort if the server is already in the requested position.
      */
      else if (server->position != position)
      {
        server->position = position;
        wholeList->RemoveElement(server);
        wholeList->AppendElement(server);
-       resort = PR_TRUE;
+       resort = true;
      }
      break;
         }
         
         /* Make sure our position changes get saved back to prefs
         */
         DIR_SaveServerPreferences(wholeList);
         
@@ -540,17 +540,17 @@ static bool dir_ValidateAndAddNewServer(
         {
           DIR_Server *server = (DIR_Server *)PR_Malloc(sizeof(DIR_Server));
           if (server)
           {
             DIR_InitServer(server, (DirectoryType)dirType);
             server->prefName = prefname;
             DIR_GetPrefsForOneServer(server);
             DIR_SetServerPosition(wholeList, server, server->position);
-            rc = PR_TRUE;
+            rc = true;
           }
           PR_FREEIF(t2);
         }
         PR_Free(t1);
       }
       else
         PR_Free(prefname);
     }
@@ -674,21 +674,21 @@ nsresult DIR_DeleteServerFromList(DIR_Se
       rv = dbPath->AppendNative(nsDependentCString(server->fileName));
       NS_ENSURE_SUCCESS(rv, rv);
 
       // close file before delete it
       nsCOMPtr<nsIAddrDatabase> addrDBFactory = 
                do_GetService(NS_ADDRDATABASE_CONTRACTID, &rv);
 
       if (NS_SUCCEEDED(rv) && addrDBFactory)
-        rv = addrDBFactory->Open(dbPath, PR_FALSE, PR_TRUE, getter_AddRefs(database));
+        rv = addrDBFactory->Open(dbPath, false, true, getter_AddRefs(database));
       if (database)  /* database exists */
       {
         database->ForceClosed();
-        rv = dbPath->Remove(PR_FALSE);
+        rv = dbPath->Remove(false);
         NS_ENSURE_SUCCESS(rv, rv);
       }
     }
 
     nsVoidArray *dirList = DIR_GetDirectories();
     DIR_SetServerPosition(dirList, server, DIR_POS_DELETE);
     DIR_DeleteServer(server);
 
@@ -1061,29 +1061,29 @@ static char *dir_CreateServerPrefName (D
   }
 
   if (leafName)
   {
     PRInt32 uniqueIDCnt = 0;
         char **children = nsnull;
     /* we need to verify that this pref string name is unique */
     prefName = PR_smprintf(PREF_LDAP_SERVER_TREE_NAME".%s", leafName);
-    isUnique = PR_FALSE;
+    isUnique = false;
     PRUint32 prefCount;
     nsresult rv = dir_GetChildList(NS_LITERAL_CSTRING(PREF_LDAP_SERVER_TREE_NAME "."),
                                    &prefCount, &children);
     if (NS_SUCCEEDED(rv))
     {
       while (!isUnique && prefName)
       {
-        isUnique = PR_TRUE; /* now flip the logic and assume we are unique until we find a match */
+        isUnique = true; /* now flip the logic and assume we are unique until we find a match */
         for (PRUint32 i = 0; i < prefCount && isUnique; ++i)
         {
           if (!PL_strcasecmp(children[i], prefName)) /* are they the same branch? */
-            isUnique = PR_FALSE;
+            isUnique = false;
         }
         if (!isUnique) /* then try generating a new pref name and try again */
         {
           PR_smprintf_free(prefName);
           prefName = PR_smprintf(PREF_LDAP_SERVER_TREE_NAME".%s_%d", leafName, ++uniqueIDCnt);
         }
       } /* if we have a list of pref Names */
 
@@ -1431,30 +1431,30 @@ void DIR_SavePrefsForOneServer(DIR_Serve
     return;
 
   char *prefstring;
 
   if (server->prefName == nsnull)
     server->prefName = dir_CreateServerPrefName(server);
   prefstring = server->prefName;
 
-  server->savingServer = PR_TRUE;
+  server->savingServer = true;
 
   DIR_SetIntPref (prefstring, "position", server->position, kDefaultPosition);
 
   // Only save the non-default address book name
   DIR_SetLocalizedStringPref(prefstring, "description", server->description);
 
   DIR_SetStringPref(prefstring, "filename", server->fileName, "");
   DIR_SetIntPref(prefstring, "dirType", server->dirType, LDAPDirectory);
 
   if (server->dirType != PABDirectory)
     DIR_SetStringPref(prefstring, "uri", server->uri, "");
 
-  server->savingServer = PR_FALSE;
+  server->savingServer = false;
 }
 
 static void DIR_SaveServerPreferences(nsVoidArray *wholeList)
 {
   if (wholeList)
   {
     nsresult rv;
     nsCOMPtr<nsIPrefBranch> pPref(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); 
--- a/mailnews/addrbook/src/nsLDAPAutoCompleteSession.cpp
+++ b/mailnews/addrbook/src/nsLDAPAutoCompleteSession.cpp
@@ -1101,17 +1101,17 @@ nsLDAPAutoCompleteSession::SetCjkMinStri
 // Check to see if the message returned is related to our current operation
 // if there is no current operation, it's not. :-)
 nsresult 
 nsLDAPAutoCompleteSession::IsMessageCurrent(nsILDAPMessage *aMessage, 
                                             bool *aIsCurrent)
 {
     // If there's no operation, this message must be stale (ie non-current).
     if ( !mOperation ) {
-        *aIsCurrent = PR_FALSE;
+        *aIsCurrent = false;
         return NS_OK;
     }
 
     // Get the message id from the current operation.
     PRInt32 currentId;
     nsresult rv = mOperation->GetMessageID(&currentId);
     if (NS_FAILED(rv)) {
         PR_LOG(sLDAPAutoCompleteLogModule, PR_LOG_DEBUG, 
--- a/mailnews/addrbook/src/nsVCardObj.cpp
+++ b/mailnews/addrbook/src/nsVCardObj.cpp
@@ -118,21 +118,21 @@ static void initVObjectIterator(VObjectI
    ----------------------------------------------------------------------*/
 
 static bool needsQuotedPrintable (const char *s)
 {
   const unsigned char *p = (const unsigned char *)s;
 
   while (*p) {
     if (*p & 0x80 || *p == '\015' || *p == '\012')
-      return PR_TRUE;
+      return true;
     p++;
   }
 
-  return PR_FALSE;
+  return false;
 }
 
 VObject* newVObject_(const char *id)
 {
     VObject *p = (VObject*) new(VObject);
     p->next = 0;
     p->id = id;
     p->prop = 0;
@@ -1011,76 +1011,76 @@ static void writeQPString(OFile *fp, con
         }
         else
         {
           appendsOFile(fp,"=0D");
           appendsOFile(fp,"=0A");
           appendcOFile(fp,'=');
           appendcOFile(fp,'\n');
           appendcOFile(fp,'\t');
-          contWhite = PR_FALSE;
+          contWhite = false;
         }
 
         /* If its CRLF, swallow two chars instead of one. */
         if (*p == '\r' && *(p+1) == '\n')
           p++;
-        white = PR_FALSE;
+        white = false;
         current_column = 0;
       }
       else
       {
         if ((*p >= 33 && *p <= 60) ||   /* safe printing chars */
           (*p >= 62 && *p <= 126) ||
           (mb_p && (*p == 61 || *p == 127 || *p == 0x1B)))
         {
           appendcOFile(fp,*p);
           current_column++;
-          white = PR_FALSE;
-          contWhite = PR_FALSE;
+          white = false;
+          contWhite = false;
         }
         else if (*p == ' ' || *p == '\t')   /* whitespace */
         {
           if (contWhite) 
           {
             appendcOFile(fp,'=');
             appendcOFile(fp,hexdigits[*p >> 4]);
             appendcOFile(fp,hexdigits[*p & 0xF]);
             current_column += 3;
-            contWhite = PR_FALSE;
+            contWhite = false;
           }
           else
           {
             appendcOFile(fp,*p);
             current_column++;
           }
-          white = PR_TRUE;
+          white = true;
         }
         else                    /* print as =FF */
         {
           appendcOFile(fp,'=');
           appendcOFile(fp,hexdigits[*p >> 4]);
           appendcOFile(fp,hexdigits[*p & 0xF]);
           current_column += 3;
-          white = PR_FALSE;
-          contWhite = PR_FALSE;
+          white = false;
+          contWhite = false;
         }
 
         NS_ASSERTION(current_column <= 76, "1.10 <rhp@netscape.com> 06 Jan 2000 08:01"); /* Hard limit required by spec */
 
         if (current_column >= 73 || ((*(p+1) == ' ') && (current_column + 3 >= 73)))    /* soft line break: "=\r\n" */
         {
           appendcOFile(fp,'=');
           appendcOFile(fp,'\n');
           appendcOFile(fp,'\t');
           current_column = 0;
           if (white)
-            contWhite = PR_TRUE;
+            contWhite = true;
           else 
-            contWhite = PR_FALSE;
-          white = PR_FALSE;
+            contWhite = false;
+          white = false;
         }
       } 
       p++;
     }  /* while */
   }  /* if */
   else 
   {
       while (*p) {
--- a/mailnews/base/search/public/nsMsgSearchBoolExpression.h
+++ b/mailnews/base/search/public/nsMsgSearchBoolExpression.h
@@ -90,17 +90,17 @@ public:
   // accessors
 
     // Offline
   static nsMsgSearchBoolExpression * AddSearchTerm (nsMsgSearchBoolExpression * aOrigExpr, nsIMsgSearchTerm * aNewTerm, char * aEncodingStr); // IMAP/NNTP
     static nsMsgSearchBoolExpression * AddExpressionTree(nsMsgSearchBoolExpression * aOrigExpr, nsMsgSearchBoolExpression * aExpression, bool aBoolOp);
 
     // parses the expression tree and all
     // expressions underneath this node to
-    // determine if the end result is PR_TRUE or PR_FALSE.
+    // determine if the end result is true or false.
   bool OfflineEvaluate(nsIMsgDBHdr *msgToMatch,
           const char *defaultCharset, nsIMsgSearchScopeTerm *scope,
           nsIMsgDatabase *db, const char *headers, PRUint32 headerSize,
           bool Filtering);
 
     // assuming the expression is for online
     // searches, determine the length of the
     // resulting IMAP/NNTP encoding string
--- a/mailnews/base/search/src/nsMsgBodyHandler.cpp
+++ b/mailnews/base/search/src/nsMsgBodyHandler.cpp
@@ -51,44 +51,44 @@
 nsMsgBodyHandler::nsMsgBodyHandler (nsIMsgSearchScopeTerm * scope,
                                     PRUint32 numLines,
                                     nsIMsgDBHdr* msg, nsIMsgDatabase * db)
 {
   m_scope = scope;
   m_numLocalLines = numLines;
   PRUint32 flags;
   m_lineCountInBodyLines = NS_SUCCEEDED(msg->GetFlags(&flags)) ?
-    !(flags & nsMsgMessageFlags::Offline) : PR_TRUE;
+    !(flags & nsMsgMessageFlags::Offline) : true;
   // account for added x-mozilla-status lines, and envelope line.
   if (!m_lineCountInBodyLines)
     m_numLocalLines += 3;
   m_msgHdr = msg;
   m_db = db;
   
   // the following are variables used when the body handler is handling stuff from filters....through this constructor, that is not the
   // case so we set them to NULL.
   m_headers = NULL;
   m_headersSize = 0;
-  m_Filtering = PR_FALSE; // make sure we set this before we call initialize...
+  m_Filtering = false; // make sure we set this before we call initialize...
   
   Initialize();  // common initialization stuff
   OpenLocalFolder();      
 }
 
 nsMsgBodyHandler::nsMsgBodyHandler(nsIMsgSearchScopeTerm * scope,
                                    PRUint32 numLines,
                                    nsIMsgDBHdr* msg, nsIMsgDatabase* db,
                                    const char * headers, PRUint32 headersSize,
                                    bool Filtering)
 {
   m_scope = scope;
   m_numLocalLines = numLines;
   PRUint32 flags;
   m_lineCountInBodyLines = NS_SUCCEEDED(msg->GetFlags(&flags)) ?
-    !(flags & nsMsgMessageFlags::Offline) : PR_TRUE;
+    !(flags & nsMsgMessageFlags::Offline) : true;
   // account for added x-mozilla-status lines, and envelope line.
   if (!m_lineCountInBodyLines)
     m_numLocalLines += 3;
   m_msgHdr = msg;
   m_db = db;
   m_headersSize = headersSize;
   m_Filtering = Filtering;
   
@@ -99,23 +99,23 @@ nsMsgBodyHandler::nsMsgBodyHandler(nsIMs
   else
     OpenLocalFolder();  // if nothing else applies, then we must be a POP folder file
 }
 
 void nsMsgBodyHandler::Initialize()
 // common initialization code regardless of what body type we are handling...
 {
   // Default transformations for local message search and MAPI access
-  m_stripHeaders = PR_TRUE;
-  m_stripHtml = PR_TRUE;
-  m_partIsHtml = PR_FALSE;
-  m_base64part = PR_FALSE;
-  m_isMultipart = PR_FALSE;
-  m_partIsText = PR_TRUE; // default is text/plain
-  m_pastHeaders = PR_FALSE;
+  m_stripHeaders = true;
+  m_stripHtml = true;
+  m_partIsHtml = false;
+  m_base64part = false;
+  m_isMultipart = false;
+  m_partIsText = true; // default is text/plain
+  m_pastHeaders = false;
   m_headerBytesRead = 0;
 }
 
 nsMsgBodyHandler::~nsMsgBodyHandler()
 {
 }
 
 PRInt32 nsMsgBodyHandler::GetNextLine (nsCString &buf)
@@ -149,17 +149,17 @@ PRInt32 nsMsgBodyHandler::GetNextLine (n
   if (outLength < 0)
     return -1; // eof out
 
   // For non-multipart messages, the entire message minus headers is encoded
   // ApplyTransformations can only decode a part
   if (!m_isMultipart && m_base64part)
   {
     Base64Decode(buf);
-    m_base64part = PR_FALSE;
+    m_base64part = false;
     // And reapply our transformations...
     outLength = ApplyTransformations(buf, buf.Length(), eatThisLine, buf);
   }
 
   return outLength;
 }
 
 void nsMsgBodyHandler::OpenLocalFolder()
@@ -251,22 +251,22 @@ PRInt32 nsMsgBodyHandler::GetNextLocalLi
  *                            decoding; else, it is treated as an out param (a
  *                            redundant version of line).
  * @return            the length of the line after applying transformations
  */
 PRInt32 nsMsgBodyHandler::ApplyTransformations (const nsCString &line, PRInt32 length,
                                                 bool &eatThisLine, nsCString &buf)
 {
   PRInt32 newLength = length;
-  eatThisLine = PR_FALSE;
+  eatThisLine = false;
   
   if (!m_pastHeaders)  // line is a line from the message headers
   {
     if (m_stripHeaders)
-      eatThisLine = PR_TRUE;
+      eatThisLine = true;
 
     // We have already grabbed all worthwhile information from the headers,
     // so there is no need to keep track of the current lines
     buf.Assign(line);
    
     SniffPossibleMIMEHeader(buf);
     
     m_pastHeaders = buf.IsEmpty() || buf.First() == '\r' ||
@@ -280,53 +280,53 @@ PRInt32 nsMsgBodyHandler::ApplyTransform
   {
     if (m_base64part && m_partIsText) 
     {
       Base64Decode(buf);
       // Work on the parsed string
       if (!buf.Length())
       {
         NS_WARNING("Trying to transform an empty buffer");
-        eatThisLine = PR_TRUE;
+        eatThisLine = true;
       }
       else
       {
         ApplyTransformations(buf, buf.Length(), eatThisLine, buf);
         // Avoid spurious failures
-        eatThisLine = PR_FALSE;
+        eatThisLine = false;
       }
     }
     else
     {
       buf.Truncate();
-      eatThisLine = PR_TRUE; // We have no content...
+      eatThisLine = true; // We have no content...
     }
 
     // Reset all assumed headers
-    m_base64part = PR_FALSE;
-    m_pastHeaders = PR_FALSE;
-    m_partIsHtml = PR_FALSE;
-    m_partIsText = PR_TRUE;
+    m_base64part = false;
+    m_pastHeaders = false;
+    m_partIsHtml = false;
+    m_partIsText = true;
 
     return buf.Length();
   }
  
   if (!m_partIsText)
   {
     // Ignore non-text parts
     buf.Truncate();
-    eatThisLine = PR_TRUE;
+    eatThisLine = true;
     return 0;
   }
 
   if (m_base64part)
   {
     // We need to keep track of all lines to parse base64encoded...
     buf.Append(line.get());
-    eatThisLine = PR_TRUE;
+    eatThisLine = true;
     return buf.Length();
   }
     
   // ... but there's no point if we're not parsing base64.
   buf.Assign(line);
   if (m_stripHtml && m_partIsHtml)
   {
     StripHtml (buf);
@@ -344,22 +344,22 @@ void nsMsgBodyHandler::StripHtml (nsCStr
     char *pWalk = pBuf;
     
     char *pWalkInOut = (char *) pBufInOut.get();
     bool inTag = false;
     while (*pWalkInOut) // throw away everything inside < >
     {
       if (!inTag)
         if (*pWalkInOut == '<')
-          inTag = PR_TRUE;
+          inTag = true;
         else
           *pWalk++ = *pWalkInOut;
         else
           if (*pWalkInOut == '>')
-            inTag = PR_FALSE;
+            inTag = false;
           pWalkInOut++;
     }
     *pWalk = 0; // null terminator
     
     pBufInOut.Adopt(pBuf);
   }
 }
 
@@ -378,17 +378,17 @@ void nsMsgBodyHandler::SniffPossibleMIME
   // about are also case-insensitive, with the sole exception of the boundary
   // string, so we can't just take the input line and make it lower case.
   nsCString lowerCaseLine(line);
   ToLowerCase(lowerCaseLine);
 
   if (StringBeginsWith(lowerCaseLine, NS_LITERAL_CSTRING("content-type:")))
   {
     if (lowerCaseLine.Find("text/html", CaseInsensitiveCompare) != -1)
-      m_partIsHtml = PR_TRUE;
+      m_partIsHtml = true;
     // Strenuous edge case: a message/rfc822 is equivalent to the content type
     // of whatever the message is. Headers should be ignored here. Even more
     // strenuous are message/partial and message/external-body, where the first
     // case requires reassembly across messages and the second is actually an
     // external source. And of course, there are other message types to handle.
     // RFC 3798 complicates things with the message/disposition-notification
     // MIME type. message/rfc822 is best treated as a multipart with no proper
     // boundary; since we only use boundaries for retriggering the headers,
@@ -397,22 +397,22 @@ void nsMsgBodyHandler::SniffPossibleMIME
         lowerCaseLine.Find("message/", CaseInsensitiveCompare) != -1)
     {
       if (m_isMultipart)
       {
         // This means we have a nested multipart tree. Since we currently only
         // handle the first children, we are probably better off assuming that
         // this nested part is going to have text/* children. After all, the
         // biggest usage that I've seen is multipart/signed.
-        m_partIsText = PR_TRUE;
+        m_partIsText = true;
       }
-      m_isMultipart = PR_TRUE;
+      m_isMultipart = true;
     }
     else if (lowerCaseLine.Find("text/", CaseInsensitiveCompare) == -1)
-      m_partIsText = PR_FALSE; // We have disproved our assumption
+      m_partIsText = false; // We have disproved our assumption
   }
 
   // TODO: make this work for nested multiparts (requires some redesign)
   if (m_isMultipart && boundary.IsEmpty() &&
       lowerCaseLine.Find("boundary=", CaseInsensitiveCompare) != -1)
   {
     PRInt32 start = lowerCaseLine.Find("boundary=", CaseInsensitiveCompare);
     start += 9;
@@ -424,17 +424,17 @@ void nsMsgBodyHandler::SniffPossibleMIME
 
     boundary.Assign("--");
     boundary.Append(Substring(line,start,end-start));
   }
 
   if (StringBeginsWith(lowerCaseLine,
                        NS_LITERAL_CSTRING("content-transfer-encoding:")) &&
       lowerCaseLine.Find("base64", CaseInsensitiveCompare) != kNotFound)
-    m_base64part = PR_TRUE;
+    m_base64part = true;
 }
 
 /**
  * Decodes the given base64 string.
  *
  * It returns its decoded string in its input.
  *
  * @param pBufInOut   (inout) a buffer of the string
--- a/mailnews/base/search/src/nsMsgFilter.cpp
+++ b/mailnews/base/search/src/nsMsgFilter.cpp
@@ -197,18 +197,18 @@ NS_IMETHODIMP nsMsgRuleAction::GetCustom
   }
 
   // found the correct custom action
   NS_ADDREF(*aCustomAction = m_customAction);
   return NS_OK;
 }
 
 nsMsgFilter::nsMsgFilter():
-    m_temporary(PR_FALSE),
-    m_unparseable(PR_FALSE),
+    m_temporary(false),
+    m_unparseable(false),
     m_filterList(nsnull),
     m_expressionTree(nsnull)
 {
   NS_NewISupportsArray(getter_AddRefs(m_termList));
   NS_NewISupportsArray(getter_AddRefs(m_actionList));
 
   m_type = nsMsgFilterType::InboxRule | nsMsgFilterType::Manual;
 }
@@ -261,17 +261,17 @@ NS_IMETHODIMP nsMsgFilter::SetUnparsedBu
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgFilter::AddTerm(
                                    nsMsgSearchAttribValue attrib,    /* attribute for this term          */
                                    nsMsgSearchOpValue op,         /* operator e.g. opContains           */
                                    nsIMsgSearchValue *value,        /* value e.g. "Dogbert"               */
                                   bool BooleanAND,       /* true if AND is the boolean operator.
-                                                            PR_FALSE if OR is the boolean operators */
+                                                            false if OR is the boolean operators */
                                   const nsACString & arbitraryHeader)  /* arbitrary header specified by user.
                                   ignored unless attrib = attribOtherHeader */
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgFilter::AppendTerm(nsIMsgSearchTerm * aTerm)
 {
@@ -753,17 +753,17 @@ nsresult nsMsgFilter::ConvertMoveOrCopyT
         {
           nsAutoString unicodeStr;
           rv = nsMsgI18NConvertToUnicode(nsMsgI18NFileSystemCharset(),
                                          moveValue, unicodeStr);
           NS_ENSURE_SUCCESS(rv, rv);
           rv = NS_MsgEscapeEncodeURLPath(unicodeStr, moveValue);
         }
         destFolderUri.Append(moveValue);
-        localMailRootMsgFolder->GetChildWithURI (destFolderUri, PR_TRUE, PR_FALSE /*caseInsensitive*/, getter_AddRefs(destIMsgFolder));
+        localMailRootMsgFolder->GetChildWithURI (destFolderUri, true, false /*caseInsensitive*/, getter_AddRefs(destIMsgFolder));
 
         if (destIMsgFolder)
         {
           destIMsgFolder->GetURI(folderUri);
           filterAction->SetTargetFolderUri(folderUri);
           moveValue.Assign(folderUri);
         }
       }
@@ -778,17 +778,17 @@ nsresult nsMsgFilter::ConvertMoveOrCopyT
 
 nsresult nsMsgFilter::SaveToTextFile(nsIOutputStream *aStream)
 {
   NS_ENSURE_ARG_POINTER(aStream);
   if (m_unparseable)
   {
     PRUint32 bytesWritten;
     //we need to trim leading whitespaces before filing out
-    m_unparsedBuffer.Trim(kWhitespace, PR_TRUE /*leadingCharacters*/, PR_FALSE /*trailingCharacters*/);
+    m_unparsedBuffer.Trim(kWhitespace, true /*leadingCharacters*/, false /*trailingCharacters*/);
     return aStream->Write(m_unparsedBuffer.get(), m_unparsedBuffer.Length(), &bytesWritten);
   }
   nsresult err = m_filterList->WriteWstrAttr(nsIMsgFilterList::attribName, m_filterName.get(), aStream);
   err = m_filterList->WriteBoolAttr(nsIMsgFilterList::attribEnabled, m_enabled, aStream);
   err = m_filterList->WriteStrAttr(nsIMsgFilterList::attribDescription, m_description.get(), aStream);
   err = m_filterList->WriteIntAttr(nsIMsgFilterList::attribType, m_type, aStream);
   if (IsScript())
     err = m_filterList->WriteStrAttr(nsIMsgFilterList::attribScriptFile, m_scriptFileName.get(), aStream);
--- a/mailnews/base/search/src/nsMsgFilterList.cpp
+++ b/mailnews/base/search/src/nsMsgFilterList.cpp
@@ -71,19 +71,19 @@ nsMsgFilterList::nsMsgFilterList() :
 {
   // I don't know how we're going to report this error if we failed to create the isupports array...
 #ifdef DEBUG
   nsresult rv =
 #endif
     NS_NewISupportsArray(getter_AddRefs(m_filters));
   NS_ASSERTION(NS_SUCCEEDED(rv), "Fixme bug 180312: NS_NewISupportsArray() failed");
 
-  m_loggingEnabled = PR_FALSE;
-  m_startWritingToBuffer = PR_FALSE;
-  m_temporaryList = PR_FALSE;
+  m_loggingEnabled = false;
+  m_startWritingToBuffer = false;
+  m_temporaryList = false;
   m_curFilter = nsnull;
 }
 
 NS_IMPL_ADDREF(nsMsgFilterList)
 NS_IMPL_RELEASE(nsMsgFilterList)
 NS_IMPL_QUERY_INTERFACE1(nsMsgFilterList, nsIMsgFilterList)
 
 NS_IMETHODIMP nsMsgFilterList::CreateFilter(const nsAString &name,class nsIMsgFilter **aFilter)
@@ -145,28 +145,28 @@ nsresult nsMsgFilterList::TruncateLog()
   // this will flush and close the steam
   nsresult rv = SetLogStream(nsnull);
   NS_ENSURE_SUCCESS(rv,rv);
 
   nsCOMPtr <nsILocalFile> file;
   rv = GetLogFile(getter_AddRefs(file));
   NS_ENSURE_SUCCESS(rv,rv);
 
-  file->Remove(PR_FALSE);
+  file->Remove(false);
   rv = file->Create(nsIFile::NORMAL_FILE_TYPE, 0644);
   NS_ENSURE_SUCCESS(rv,rv);
   return rv;
 }
 
 NS_IMETHODIMP nsMsgFilterList::ClearLog()
 {
   bool loggingEnabled = m_loggingEnabled;
 
   // disable logging while clearing
-  m_loggingEnabled = PR_FALSE;
+  m_loggingEnabled = false;
 
 #ifdef DEBUG
   nsresult rv =
 #endif
     TruncateLog();
   NS_ASSERTION(NS_SUCCEEDED(rv), "failed to truncate filter log");
 
   m_loggingEnabled = loggingEnabled;
@@ -494,17 +494,17 @@ const char *nsMsgFilterList::GetStringFo
 nsresult nsMsgFilterList::LoadValue(nsCString &value, nsIInputStream *aStream)
 {
   nsCAutoString  valueStr;
   char  curChar;
   value = "";
   curChar = SkipWhitespace(aStream);
   if (curChar != '"')
   {
-    NS_ASSERTION(PR_FALSE, "expecting quote as start of value");
+    NS_ASSERTION(false, "expecting quote as start of value");
     return NS_MSG_FILTER_PARSE_ERROR;
   }
   curChar = ReadChar(aStream);
   do
   {
     if (curChar == '\\')
     {
       char nextChar = ReadChar(aStream);
@@ -554,47 +554,47 @@ nsresult nsMsgFilterList::LoadTextFilter
       break;
     err = LoadValue(value, aStream);
     if (err != NS_OK)
       break;
     switch(attrib)
     {
     case nsIMsgFilterList::attribNone:
       if (m_curFilter)
-        m_curFilter->SetUnparseable(PR_TRUE);
+        m_curFilter->SetUnparseable(true);
       break;
     case nsIMsgFilterList::attribVersion:
       m_fileVersion = value.ToInteger(&intToStringResult);
       if (NS_FAILED(intToStringResult))
       {
         attrib = nsIMsgFilterList::attribNone;
-        NS_ASSERTION(PR_FALSE, "error parsing filter file version");
+        NS_ASSERTION(false, "error parsing filter file version");
       }
       break;
     case nsIMsgFilterList::attribLogging:
       m_loggingEnabled = StrToBool(value);
       m_unparsedFilterBuffer.Truncate(); //we are going to buffer each filter as we read them, make sure no garbage is there
-      m_startWritingToBuffer = PR_TRUE; //filters begin now
+      m_startWritingToBuffer = true; //filters begin now
       break;
     case nsIMsgFilterList::attribName:  //every filter starts w/ a name
       {
         if (m_curFilter)
         {
           PRInt32 nextFilterStartPos = m_unparsedFilterBuffer.RFind("name");
 
           nsCAutoString nextFilterPart;
           nextFilterPart = Substring(m_unparsedFilterBuffer, nextFilterStartPos, m_unparsedFilterBuffer.Length());
           m_unparsedFilterBuffer.SetLength(nextFilterStartPos);
 
           bool unparseableFilter;
           m_curFilter->GetUnparseable(&unparseableFilter);
           if (unparseableFilter)
           {
             m_curFilter->SetUnparsedBuffer(m_unparsedFilterBuffer);
-            m_curFilter->SetEnabled(PR_FALSE); //disable the filter because we don't know how to apply it
+            m_curFilter->SetEnabled(false); //disable the filter because we don't know how to apply it
           }
           m_unparsedFilterBuffer = nextFilterPart;
         }
         nsMsgFilter *filter = new nsMsgFilter;
         if (filter == nsnull)
         {
           err = NS_ERROR_OUT_OF_MEMORY;
           break;
@@ -645,17 +645,17 @@ nsresult nsMsgFilterList::LoadTextFilter
       if (m_curFilter)
         m_curFilter->SetFilterScript(&value);
       break;
     case nsIMsgFilterList::attribAction:
       if (m_curFilter)
       {
         nsMsgRuleActionType actionType = nsMsgFilter::GetActionForFilingStr(value);
         if (actionType == nsMsgFilterAction::None)
-          m_curFilter->SetUnparseable(PR_TRUE);
+          m_curFilter->SetUnparseable(true);
         else
         {
           err = m_curFilter->CreateAction(getter_AddRefs(currentFilterAction));
           NS_ENSURE_SUCCESS(err, err);
           currentFilterAction->SetType(actionType);
           m_curFilter->AppendAction(currentFilterAction);
         }
       }
@@ -670,17 +670,17 @@ nsresult nsMsgFilterList::LoadTextFilter
           err = m_curFilter->ConvertMoveOrCopyToFolderValue(currentFilterAction, value);
         else if (type == nsMsgFilterAction::ChangePriority)
         {
           nsMsgPriorityValue outPriority;
           nsresult res = NS_MsgGetPriorityFromString(value.get(), outPriority);
           if (NS_SUCCEEDED(res))
             currentFilterAction->SetPriority(outPriority);
           else
-            NS_ASSERTION(PR_FALSE, "invalid priority in filter file");
+            NS_ASSERTION(false, "invalid priority in filter file");
         }
         else if (type == nsMsgFilterAction::Label)
         {
           // upgrade label to corresponding tag/keyword
           nsresult res;
           PRInt32 labelInt = value.ToInteger(&res);
           if (NS_SUCCEEDED(res))
           {
@@ -718,17 +718,17 @@ nsresult nsMsgFilterList::LoadTextFilter
               break;
 
           char *utf8 = ToNewUTF8String(unicodeStr);
           value.Assign(utf8);
           nsMemory::Free(utf8);
         }
         err = ParseCondition(m_curFilter, value.get());
         if (err == NS_ERROR_INVALID_ARG)
-          err = m_curFilter->SetUnparseable(PR_TRUE);
+          err = m_curFilter->SetUnparseable(true);
         NS_ENSURE_SUCCESS(err, err);
       }
       break;
     case nsIMsgFilterList::attribCustomId:
       if (m_curFilter && currentFilterAction)
       {
         err = currentFilterAction->SetCustomId(value);
         NS_ENSURE_SUCCESS(err, err);
@@ -740,17 +740,17 @@ nsresult nsMsgFilterList::LoadTextFilter
 
   if (m_curFilter)
   {
     bool unparseableFilter;
     m_curFilter->GetUnparseable(&unparseableFilter);
     if (unparseableFilter)
     {
       m_curFilter->SetUnparsedBuffer(m_unparsedFilterBuffer);
-      m_curFilter->SetEnabled(PR_FALSE);  //disable the filter because we don't know how to apply it
+      m_curFilter->SetEnabled(false);  //disable the filter because we don't know how to apply it
     }
   }
 
   return err;
 }
 
 // parse condition like "(subject, contains, fred) AND (body, isn't, "foo)")"
 // values with close parens will be quoted.
@@ -766,43 +766,43 @@ NS_IMETHODIMP nsMsgFilterList::ParseCond
   nsresult  err = NS_OK;
   const char *curPtr = aCondition;
   if (!strcmp(aCondition, "ALL"))
   {
     nsMsgSearchTerm *newTerm = new nsMsgSearchTerm;
 
     if (newTerm)
     {
-      newTerm->m_matchAll = PR_TRUE;
+      newTerm->m_matchAll = true;
       aFilter->AppendTerm(newTerm);
     }
     return (newTerm) ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
   }
 
   while (!done)
   {
     // insert code to save the boolean operator if there is one for this search term....
     const char *openParen = PL_strchr(curPtr, '(');
     const char *orTermPos = PL_strchr(curPtr, 'O');    // determine if an "OR" appears b4 the openParen...
     bool ANDTerm = true;
     if (orTermPos && orTermPos < openParen) // make sure OR term falls before the '('
-      ANDTerm = PR_FALSE;
+      ANDTerm = false;
 
     char *termDup = nsnull;
     if (openParen)
     {
       bool foundEndTerm = false;
       bool inQuote = false;
       for (curPtr = openParen +1; *curPtr; curPtr++)
       {
         if (*curPtr == '\\' && *(curPtr + 1) == '"')
           curPtr++;
         else if (*curPtr == ')' && !inQuote)
         {
-          foundEndTerm = PR_TRUE;
+          foundEndTerm = true;
           break;
         }
         else if (*curPtr == '"')
           inQuote = !inQuote;
       }
       if (foundEndTerm)
       {
         int termLen = curPtr - openParen - 1;
--- a/mailnews/base/search/src/nsMsgFilterService.cpp
+++ b/mailnews/base/search/src/nsMsgFilterService.cpp
@@ -145,17 +145,17 @@ NS_IMETHODIMP nsMsgFilterService::OpenFi
     else if(rv == NS_MSG_INVALID_CUSTOM_HEADER && aMsgWindow)
       ThrowAlertMsg("invalidCustomHeader", aMsgWindow);
   }
   return rv;
 }
 
 NS_IMETHODIMP nsMsgFilterService::CloseFilterList(nsIMsgFilterList *filterList)
 {
-  //NS_ASSERTION(PR_FALSE,"CloseFilterList doesn't do anything yet");
+  //NS_ASSERTION(false,"CloseFilterList doesn't do anything yet");
   return NS_OK;
 }
 
 /* save without deleting */
 NS_IMETHODIMP  nsMsgFilterService::SaveFilterList(nsIMsgFilterList *filterList, nsILocalFile *filterFile)
 {
   NS_ENSURE_ARG_POINTER(filterFile);
   NS_ENSURE_ARG_POINTER(filterList);
@@ -196,17 +196,17 @@ nsresult nsMsgFilterService::BackUpFilte
   //if back-up file exists delete the back up file otherwise copy fails.
   nsCOMPtr <nsIFile> backupFile;
   rv = localParentDir->Clone(getter_AddRefs(backupFile));
   NS_ENSURE_SUCCESS(rv,rv);
   backupFile->AppendNative(NS_LITERAL_CSTRING("rulesbackup.dat"));
   bool exists;
   backupFile->Exists(&exists);
   if (exists)
-    backupFile->Remove(PR_FALSE);
+    backupFile->Remove(false);
 
   return aFilterFile->CopyToNative(localParentDir, NS_LITERAL_CSTRING("rulesbackup.dat"));
 }
 
 nsresult nsMsgFilterService::AlertBackingUpFilterFile(nsIMsgWindow *aMsgWindow)
 {
   return ThrowAlertMsg("filterListBackUpMsg", aMsgWindow);
 }
@@ -418,17 +418,17 @@ NS_IMETHODIMP nsMsgFilterAfterTheFact::O
 
 NS_IMETHODIMP nsMsgFilterAfterTheFact::OnSearchHit(nsIMsgDBHdr *header, nsIMsgFolder *folder)
 {
   NS_ENSURE_ARG_POINTER(header);
 
   nsMsgKey msgKey;
   header->GetMessageKey(&msgKey);
   m_searchHits.AppendElement(msgKey);
-  m_searchHitHdrs->AppendElement(header, PR_FALSE);
+  m_searchHitHdrs->AppendElement(header, false);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgFilterAfterTheFact::OnSearchDone(nsresult status)
 {
   bool continueExecution = NS_SUCCEEDED(status);
   if (!continueExecution)
     continueExecution = ContinueExecutionPrompt();
@@ -447,17 +447,17 @@ NS_IMETHODIMP nsMsgFilterAfterTheFact::O
 }
 
 nsresult nsMsgFilterAfterTheFact::ApplyFilter(bool *aApplyMore)
 {
   nsresult rv = NS_OK;
   bool applyMoreActions;
   if (!aApplyMore)
     aApplyMore = &applyMoreActions;
-  *aApplyMore = PR_TRUE;
+  *aApplyMore = true;
   if (m_curFilter && m_curFolder)
   {
     // we're going to log the filter actions before firing them because some actions are async
     bool loggingEnabled = false;
     if (m_filters)
       (void)m_filters->GetLoggingEnabled(&loggingEnabled);
 
     nsCOMPtr<nsISupportsArray> actionList;
@@ -484,17 +484,17 @@ nsresult nsMsgFilterAfterTheFact::ApplyF
 
       nsCString actionTargetFolderUri;
       if (actionType == nsMsgFilterAction::MoveToFolder ||
           actionType == nsMsgFilterAction::CopyToFolder)
       {
         filterAction->GetTargetFolderUri(actionTargetFolderUri);
         if (actionTargetFolderUri.IsEmpty())
         {
-          NS_ASSERTION(PR_FALSE, "actionTargetFolderUri is empty");
+          NS_ASSERTION(false, "actionTargetFolderUri is empty");
           continue;
         }
       }
 
       if (loggingEnabled)
       {
           for (PRUint32 msgIndex = 0; msgIndex < m_searchHits.Length(); msgIndex++)
           {
@@ -510,21 +510,21 @@ nsresult nsMsgFilterAfterTheFact::ApplyF
       switch (actionType)
       {
       case nsMsgFilterAction::Delete:
         // we can't pass ourselves in as a copy service listener because the copy service
         // listener won't get called in several situations (e.g., the delete model is imap delete)
         // and we rely on the listener getting called to continue the filter application.
         // This means we're going to end up firing off the delete, and then subsequently
         // issuing a search for the next filter, which will block until the delete finishes.
-        m_curFolder->DeleteMessages(m_searchHitHdrs, m_msgWindow, PR_FALSE, PR_FALSE, nsnull, PR_FALSE /*allow Undo*/ );
+        m_curFolder->DeleteMessages(m_searchHitHdrs, m_msgWindow, false, false, nsnull, false /*allow Undo*/ );
         for (PRUint32 i = 0; i < m_searchHits.Length(); i++)
           m_curFolder->OrProcessingFlags(m_searchHits[i], nsMsgProcessingFlags::FilterToMove);
         //if we are deleting then we couldn't care less about applying remaining filter actions
-        *aApplyMore = PR_FALSE;
+        *aApplyMore = false;
         break;
       case nsMsgFilterAction::MoveToFolder:
       case nsMsgFilterAction::CopyToFolder:
       {
         // if moving or copying to a different file, do it.
         nsCString uri;
         rv = m_curFolder->GetURI(uri);
         if (!actionTargetFolderUri.IsEmpty() &&
@@ -540,17 +540,17 @@ nsresult nsMsgFilterAfterTheFact::ApplyF
 
           bool canFileMessages = true;
           nsCOMPtr<nsIMsgFolder> parentFolder;
           destIFolder->GetParent(getter_AddRefs(parentFolder));
           if (parentFolder)
             destIFolder->GetCanFileMessages(&canFileMessages);
           if (!parentFolder || !canFileMessages)
           {
-            m_curFilter->SetEnabled(PR_FALSE);
+            m_curFilter->SetEnabled(false);
             destIFolder->ThrowAlertMsg("filterDisabled",m_msgWindow);
             // we need to explicitly save the filter file.
             m_filters->SaveToDefaultFile();
             // In the case of applying multiple filters
             // we might want to remove the filter from the list, but
             // that's a bit evil since we really don't know that we own
             // the list. Disabling it doesn't do a lot of good since
             // we still apply disabled filters. Currently, we don't
@@ -558,47 +558,47 @@ nsresult nsMsgFilterAfterTheFact::ApplyF
             // so this might be the edge case of an edge case.
             return RunNextFilter();
           }
           nsCOMPtr<nsIMsgCopyService> copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv);
           if (copyService)
           {
             rv = copyService->CopyMessages(m_curFolder, m_searchHitHdrs,
                 destIFolder, actionType == nsMsgFilterAction::MoveToFolder,
-                this, m_msgWindow, PR_FALSE);
+                this, m_msgWindow, false);
             // We'll continue after a copy, but not after a move
             if (NS_SUCCEEDED(rv) && actionType == nsMsgFilterAction::CopyToFolder
                                  && actionIndex < numActions - 1)
               m_nextAction = actionIndex + 1;
             else
               m_nextAction = 0; // OnStopCopy tests this to move to next filter
             // Tell postplugin filters if we are moving the message.
             if (actionType == nsMsgFilterAction::MoveToFolder)
               for (PRUint32 i = 0; i < m_searchHits.Length(); i++)
                 m_curFolder->OrProcessingFlags(m_searchHits[i],
                                                nsMsgProcessingFlags::FilterToMove);
             return rv;
           }
         }
         //we have already moved the hdrs so we can't apply more actions
         if (actionType == nsMsgFilterAction::MoveToFolder)
-          *aApplyMore = PR_FALSE;
+          *aApplyMore = false;
       }
         break;
       case nsMsgFilterAction::MarkRead:
           // crud, no listener support here - we'll probably just need to go on and apply
           // the next filter, and, in the imap case, rely on multiple connection and url
           // queueing to stay out of trouble
         m_curFolder->MarkMessagesRead(m_searchHitHdrs, true);
         break;
       case nsMsgFilterAction::MarkUnread:
         m_curFolder->MarkMessagesRead(m_searchHitHdrs, false);
         break;
       case nsMsgFilterAction::MarkFlagged:
-        m_curFolder->MarkMessagesFlagged(m_searchHitHdrs, PR_TRUE);
+        m_curFolder->MarkMessagesFlagged(m_searchHitHdrs, true);
         break;
       case nsMsgFilterAction::KillThread:
       case nsMsgFilterAction::WatchThread:
         {
           for (PRUint32 msgIndex = 0; msgIndex < m_searchHits.Length(); msgIndex++)
           {
             nsCOMPtr <nsIMsgDBHdr> msgHdr;
             m_searchHitHdrs->QueryElementAt(msgIndex, NS_GET_IID(nsIMsgDBHdr), getter_AddRefs(msgHdr));
@@ -606,32 +606,32 @@ nsresult nsMsgFilterAfterTheFact::ApplyF
             {
               nsCOMPtr <nsIMsgThread> msgThread;
               nsMsgKey threadKey;
               m_curFolderDB->GetThreadContainingMsgHdr(msgHdr, getter_AddRefs(msgThread));
               if (msgThread)
               {
                 msgThread->GetThreadKey(&threadKey);
                 if (actionType == nsMsgFilterAction::KillThread)
-                  m_curFolderDB->MarkThreadIgnored(msgThread, threadKey, PR_TRUE, nsnull);
+                  m_curFolderDB->MarkThreadIgnored(msgThread, threadKey, true, nsnull);
                 else
-                  m_curFolderDB->MarkThreadWatched(msgThread, threadKey, PR_TRUE, nsnull);
+                  m_curFolderDB->MarkThreadWatched(msgThread, threadKey, true, nsnull);
               }
             }
           }
         }
         break;
       case nsMsgFilterAction::KillSubthread:
         {
           for (PRUint32 msgIndex = 0; msgIndex < m_searchHits.Length(); msgIndex++)
           {
             nsCOMPtr <nsIMsgDBHdr> msgHdr;
             m_searchHitHdrs->QueryElementAt(msgIndex, NS_GET_IID(nsIMsgDBHdr), getter_AddRefs(msgHdr));
             if (msgHdr)
-              m_curFolderDB->MarkHeaderKilled(msgHdr, PR_TRUE, nsnull);
+              m_curFolderDB->MarkHeaderKilled(msgHdr, true, nsnull);
           }
         }
         break;
       case nsMsgFilterAction::ChangePriority:
           {
               nsMsgPriorityValue filterPriority;
               filterAction->GetPriority(&filterPriority);
               for (PRUint32 msgIndex = 0; msgIndex < m_searchHits.Length(); msgIndex++)
@@ -732,22 +732,22 @@ nsresult nsMsgFilterAfterTheFact::ApplyF
               {
                 PRUint32 flags;
                 msgHdr->GetFlags(&flags);
                 if (flags & nsMsgMessageFlags::Partial)
                 {
                   if (!partialMsgs)
                     partialMsgs = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
                   NS_ENSURE_SUCCESS(rv, rv);
-                  partialMsgs->AppendElement(msgHdr, PR_FALSE);
+                  partialMsgs->AppendElement(msgHdr, false);
                 }
               }
             }
             if (partialMsgs)
-              m_curFolder->DeleteMessages(partialMsgs, m_msgWindow, PR_TRUE, PR_FALSE, nsnull, PR_FALSE);
+              m_curFolder->DeleteMessages(partialMsgs, m_msgWindow, true, false, nsnull, false);
           }
         }
         break;
       case nsMsgFilterAction::FetchBodyFromPop3Server:
         {
           nsCOMPtr <nsIMsgLocalMailFolder> localFolder = do_QueryInterface(m_curFolder);
           if (localFolder)
           {
@@ -757,31 +757,31 @@ nsresult nsMsgFilterAfterTheFact::ApplyF
             {
               nsCOMPtr <nsIMsgDBHdr> msgHdr;
               m_searchHitHdrs->QueryElementAt(msgIndex, NS_GET_IID(nsIMsgDBHdr), getter_AddRefs(msgHdr));
               if (msgHdr)
               {
                 PRUint32 flags = 0;
                 msgHdr->GetFlags(&flags);
                 if (flags & nsMsgMessageFlags::Partial)
-                  messages->AppendElement(msgHdr, PR_FALSE);
+                  messages->AppendElement(msgHdr, false);
               }
             }
             PRUint32 msgsToFetch;
             messages->GetLength(&msgsToFetch);
             if (msgsToFetch > 0)
               m_curFolder->DownloadMessagesForOffline(messages, m_msgWindow);
           }
         }
         break;
 
       case nsMsgFilterAction::StopExecution:
       {
         // don't apply any more filters
-        *aApplyMore = PR_FALSE;
+        *aApplyMore = false;
       }
       break;
 
       case nsMsgFilterAction::Custom:
       {
         nsMsgFilterTypeType filterType;
         m_curFilter->GetFilterType(&filterType);
         nsCOMPtr<nsIMsgFilterCustomAction> customAction;
@@ -815,17 +815,17 @@ nsresult nsMsgFilterAfterTheFact::ApplyF
 NS_IMETHODIMP nsMsgFilterService::GetTempFilterList(nsIMsgFolder *aFolder, nsIMsgFilterList **aFilterList)
 {
   NS_ENSURE_ARG_POINTER(aFilterList);
 
   nsMsgFilterList *filterList = new nsMsgFilterList;
   NS_ENSURE_TRUE(filterList, NS_ERROR_OUT_OF_MEMORY);
   NS_ADDREF(*aFilterList = filterList);
   (*aFilterList)->SetFolder(aFolder);
-  filterList->m_temporaryList = PR_TRUE;
+  filterList->m_temporaryList = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgFilterService::ApplyFiltersToFolders(nsIMsgFilterList *aFilterList, nsISupportsArray *aFolders, nsIMsgWindow *aMsgWindow)
 {
   NS_ENSURE_ARG_POINTER(aFilterList);
   NS_ENSURE_ARG_POINTER(aFolders);
 
@@ -1070,37 +1070,37 @@ NS_IMETHODIMP nsMsgFilterAfterTheFact::O
   if (m_nextAction) // a non-zero m_nextAction means additional actions needed
     return ApplyFilter();
   return RunNextFilter();
 }
 
 bool nsMsgFilterAfterTheFact::ContinueExecutionPrompt()
 {
   if (!m_curFilter)
-    return PR_FALSE;
+    return false;
   nsCOMPtr<nsIStringBundle> bundle;
   nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID);
   if (!bundleService)
-    return PR_FALSE;
+    return false;
   bundleService->CreateBundle("chrome://messenger/locale/filter.properties",
                               getter_AddRefs(bundle));
   if (!bundle)
-    return PR_FALSE;
+    return false;
   nsString filterName;
   m_curFilter->GetFilterName(filterName);
   nsString formatString;
   nsString confirmText;
   const PRUnichar *formatStrings[] =
   {
     filterName.get()
   };
   nsresult rv = bundle->FormatStringFromName(NS_LITERAL_STRING("continueFilterExecution").get(),
                                              formatStrings, 1, getter_Copies(confirmText));
   if (NS_FAILED(rv))
-    return PR_FALSE;
+    return false;
   bool returnVal = false;
   (void) DisplayConfirmationPrompt(m_msgWindow, confirmText.get(), &returnVal);
   return returnVal;
 }
 
 nsresult
 nsMsgFilterAfterTheFact::DisplayConfirmationPrompt(nsIMsgWindow *msgWindow, const PRUnichar *confirmString, bool *confirmed)
 {
--- a/mailnews/base/search/src/nsMsgImapSearch.cpp
+++ b/mailnews/base/search/src/nsMsgImapSearch.cpp
@@ -112,17 +112,17 @@ nsresult nsMsgSearchOnlineMail::Encode (
                                         const PRUnichar *destCharset)
 {
   nsCString imapTerms;
   
   //check if searchTerms are ascii only
   bool asciiOnly = true;
   // ### what's this mean in the NWO?????
   
-  if (PR_TRUE) // !(srcCharset & CODESET_MASK == STATEFUL || srcCharset & CODESET_MASK == WIDECHAR) )   //assume all single/multiple bytes charset has ascii as subset
+  if (true) // !(srcCharset & CODESET_MASK == STATEFUL || srcCharset & CODESET_MASK == WIDECHAR) )   //assume all single/multiple bytes charset has ascii as subset
   {
     PRUint32 termCount;
     searchTerms->Count(&termCount);
     PRUint32 i = 0;
     
     for (i = 0; i < termCount && asciiOnly; i++)
     {
       nsCOMPtr<nsIMsgSearchTerm> pTerm;
@@ -144,27 +144,27 @@ nsresult nsMsgSearchOnlineMail::Encode (
         rv = searchValue->GetStr(pchar);
         if (NS_FAILED(rv) || pchar.IsEmpty())
           continue;
         asciiOnly = NS_IsAscii(pchar.get());
       }
     }
   }
   else
-    asciiOnly = PR_FALSE;
+    asciiOnly = false;
   
   nsAutoString usAsciiCharSet(NS_LITERAL_STRING("us-ascii"));
   // Get the optional CHARSET parameter, in case we need it.
   char *csname = GetImapCharsetParam(asciiOnly ? usAsciiCharSet.get() : destCharset);
   
   // We do not need "srcCharset" since the search term in always unicode.
   // I just pass destCharset for both src and dest charset instead of removing srcCharst from the arguemnt.
   nsresult err = nsMsgSearchAdapter::EncodeImap (getter_Copies(imapTerms), searchTerms, 
     asciiOnly ?  usAsciiCharSet.get(): destCharset, 
-    asciiOnly ?  usAsciiCharSet.get(): destCharset, PR_FALSE);
+    asciiOnly ?  usAsciiCharSet.get(): destCharset, false);
   if (NS_SUCCEEDED(err))
   {
     pEncoding.Append("SEARCH");
     if (csname)
       pEncoding.Append(csname);
     pEncoding.Append(imapTerms);
   }
   PR_FREEIF(csname);
--- a/mailnews/base/search/src/nsMsgLocalSearch.cpp
+++ b/mailnews/base/search/src/nsMsgLocalSearch.cpp
@@ -153,17 +153,17 @@ nsMsgSearchBoolExpression::leftToRightAd
          return newExpr;
       else
          delete tempExpr;    // clean up memory allocation in case of failure
     }
     return this;   // in case we failed to create a new expression, return self
 }
 
 
-// returns PR_TRUE or PR_FALSE depending on what the current expression evaluates to.
+// returns true or false depending on what the current expression evaluates to.
 bool nsMsgSearchBoolExpression::OfflineEvaluate(nsIMsgDBHdr *msgToMatch, const char *defaultCharset,
   nsIMsgSearchScopeTerm *scope, nsIMsgDatabase *db, const char *headers,
   PRUint32 headerSize, bool Filtering)
 {
     bool result = true;    // always default to false positives
     bool isAnd;
 
     if (m_term) // do we contain just a search term?
@@ -282,17 +282,17 @@ nsresult nsMsgSearchOfflineMail::Validat
 
 nsresult nsMsgSearchOfflineMail::OpenSummaryFile ()
 {
     nsCOMPtr <nsIMsgDatabase> mailDB ;
 
     nsresult err = NS_OK;
     // do password protection of local cache thing.
 #ifdef DOING_FOLDER_CACHE_PASSWORDS
-    if (m_scope->m_folder && m_scope->m_folder->UserNeedsToAuthenticateForFolder(PR_FALSE) && m_scope->m_folder->GetMaster()->PromptForHostPassword(m_scope->m_frame->GetContext(), m_scope->m_folder) != 0)
+    if (m_scope->m_folder && m_scope->m_folder->UserNeedsToAuthenticateForFolder(false) && m_scope->m_folder->GetMaster()->PromptForHostPassword(m_scope->m_frame->GetContext(), m_scope->m_folder) != 0)
     {
         m_scope->m_frame->StopRunning();
         return SearchError_ScopeDone;
     }
 #endif
     nsCOMPtr <nsIDBFolderInfo>  folderInfo;
     nsCOMPtr <nsIMsgFolder> scopeFolder;
     err = m_scope->GetFolder(getter_AddRefs(scopeFolder));
@@ -323,17 +323,17 @@ nsresult nsMsgSearchOfflineMail::OpenSum
                 searchSession->PauseSearch();
                 localFolder->ParseFolder(searchWindow, this);
               }
             }
           }
             break;
         default:
         {
-          NS_ASSERTION(PR_FALSE, "unexpected error opening db");
+          NS_ASSERTION(false, "unexpected error opening db");
         }
     }
 
     return err;
 }
 
 
 nsresult
@@ -342,31 +342,31 @@ nsMsgSearchOfflineMail::MatchTermsForFil
                                             const char *defaultCharset,
                                             nsIMsgSearchScopeTerm * scope,
                                             nsIMsgDatabase * db,
                                             const char * headers,
                                             PRUint32 headerSize,
                                             nsMsgSearchBoolExpression ** aExpressionTree,
                                             bool *pResult)
 {
-    return MatchTerms(msgToMatch, termList, defaultCharset, scope, db, headers, headerSize, PR_TRUE, aExpressionTree, pResult);
+    return MatchTerms(msgToMatch, termList, defaultCharset, scope, db, headers, headerSize, true, aExpressionTree, pResult);
 }
 
 // static method which matches a header against a list of search terms.
 nsresult
 nsMsgSearchOfflineMail::MatchTermsForSearch(nsIMsgDBHdr *msgToMatch,
                                             nsISupportsArray* termList,
                                             const char *defaultCharset,
                                             nsIMsgSearchScopeTerm *scope,
                                             nsIMsgDatabase *db,
                                             nsMsgSearchBoolExpression ** aExpressionTree,
                                             bool *pResult)
 {
 
-    return MatchTerms(msgToMatch, termList, defaultCharset, scope, db, nsnull, 0, PR_FALSE, aExpressionTree, pResult);
+    return MatchTerms(msgToMatch, termList, defaultCharset, scope, db, nsnull, 0, false, aExpressionTree, pResult);
 }
 
 nsresult nsMsgSearchOfflineMail::ConstructExpressionTree(nsISupportsArray * termList,
                                             PRUint32 termCount,
                                             PRUint32 &aStartPosInList,
                                             nsMsgSearchBoolExpression ** aExpressionTree)
 {
   nsMsgSearchBoolExpression * finalExpression = *aExpressionTree;
@@ -383,33 +383,33 @@ nsresult nsMsgSearchOfflineMail::Constru
       bool beginsGrouping;
       bool endsGrouping;
       pTerm->GetBeginsGrouping(&beginsGrouping);
       pTerm->GetEndsGrouping(&endsGrouping);
 
       if (beginsGrouping)
       {
           //temporarily turn off the grouping for our recursive call
-          pTerm->SetBeginsGrouping(PR_FALSE);
+          pTerm->SetBeginsGrouping(false);
           nsMsgSearchBoolExpression * innerExpression = new nsMsgSearchBoolExpression();
 
           // the first search term in the grouping is the one that holds the operator for how this search term
           // should be joined with the expressions to it's left.
           bool booleanAnd;
           pTerm->GetBooleanAnd(&booleanAnd);
 
           // now add this expression tree to our overall expression tree...
           finalExpression = nsMsgSearchBoolExpression::AddExpressionTree(finalExpression, innerExpression, booleanAnd);
 
           // recursively process this inner expression
           ConstructExpressionTree(termList, termCount, aStartPosInList,
             &finalExpression->m_rightChild);
 
           // undo our damage
-          pTerm->SetBeginsGrouping(PR_TRUE);
+          pTerm->SetBeginsGrouping(true);
 
       }
       else
       {
         finalExpression = nsMsgSearchBoolExpression::AddSearchTerm(finalExpression, pTerm, nsnull);    // add the term to the expression tree
 
         if (endsGrouping)
           break;
@@ -444,20 +444,20 @@ nsresult nsMsgSearchOfflineMail::Process
     bool result;
     bool matchAll;
 
     NS_ENSURE_ARG_POINTER(pResult);
 
     aTerm->GetMatchAll(&matchAll);
     if (matchAll)
     {
-      *pResult = PR_TRUE;
+      *pResult = true;
       return NS_OK;
     }
-    *pResult = PR_FALSE;
+    *pResult = false;
 
     nsMsgSearchAttribValue attrib;
     aTerm->GetAttrib(&attrib);
     msgToMatch->GetCharset(getter_Copies(msgCharset));
     charset = msgCharset.get();
     if (!charset || !*charset)
       charset = (const char*)defaultCharset;
     msgToMatch->GetFlags(&msgFlags);
@@ -465,17 +465,17 @@ nsresult nsMsgSearchOfflineMail::Process
     switch (attrib)
     {
       case nsMsgSearchAttrib::Sender:
         msgToMatch->GetAuthor(getter_Copies(matchString));
         err = aTerm->MatchRfc822String (matchString.get(), charset, charsetOverride, &result);
         break;
       case nsMsgSearchAttrib::Subject:
       {
-        msgToMatch->GetSubject(getter_Copies(matchString) /* , PR_TRUE */);
+        msgToMatch->GetSubject(getter_Copies(matchString) /* , true */);
         if (msgFlags & nsMsgMessageFlags::HasRe)
         {
           // Make sure we pass along the "Re: " part of the subject if this is a reply.
           nsCString reString;
           reString.Assign("Re: ");
           reString.Append(matchString);
           err = aTerm->MatchRfc2047String(reString.get(), charset, charsetOverride, &result);
         }
@@ -712,34 +712,34 @@ nsresult nsMsgSearchOfflineMail::MatchTe
     if (NS_FAILED(err))
       return err;
   }
 
   // evaluate the expression tree and return the result
   *pResult = (*aExpressionTree)
     ?  (*aExpressionTree)->OfflineEvaluate(msgToMatch,
                  defaultCharset, scope, db, headers, headerSize, Filtering)
-    :PR_TRUE;  // vacuously true...
+    :true;  // vacuously true...
 
   return NS_OK;
 }
 
 
 nsresult nsMsgSearchOfflineMail::Search (bool *aDone)
 {
   nsresult err = NS_OK;
 
   NS_ENSURE_ARG(aDone);
   nsresult dbErr = NS_OK;
   nsCOMPtr<nsIMsgDBHdr> msgDBHdr;
   nsMsgSearchBoolExpression *expressionTree = nsnull;
 
   const PRUint32 kTimeSliceInMS = 200;
 
-  *aDone = PR_FALSE;
+  *aDone = false;
   // Try to open the DB lazily. This will set up a parser if one is required
   if (!m_db)
     err = OpenSummaryFile ();
   if (!m_db)  // must be reparsing.
     return err;
 
   // Reparsing is unnecessary or completed
   if (NS_SUCCEEDED(err))
@@ -754,17 +754,17 @@ nsresult nsMsgSearchOfflineMail::Search 
         nsCOMPtr<nsISupports> currentItem;
 
         dbErr = m_listContext->GetNext(getter_AddRefs(currentItem));
         if(NS_SUCCEEDED(dbErr))
         {
           msgDBHdr = do_QueryInterface(currentItem, &dbErr);
         }
         if (NS_FAILED(dbErr))
-          *aDone = PR_TRUE; //###phil dbErr is dropped on the floor. just note that we did have an error so we'll clean up later
+          *aDone = true; //###phil dbErr is dropped on the floor. just note that we did have an error so we'll clean up later
         else
         {
           bool match = false;
           nsAutoString nullCharset, folderCharset;
           GetSearchCharsets(nullCharset, folderCharset);
           NS_ConvertUTF16toUTF8 charset(folderCharset);
           // Is this message a hit?
           err = MatchTermsForSearch (msgDBHdr, m_searchTerms, charset.get(), m_scope, m_db, &expressionTree, &match);
@@ -778,17 +778,17 @@ nsresult nsMsgSearchOfflineMail::Search 
           // check if more than kTimeSliceInMS milliseconds have elapsed in this time slice started
           if (PR_IntervalToMilliseconds(elapsedTime) > kTimeSliceInMS)
             break;
         }
       }
     }
   }
   else
-    *aDone = PR_TRUE; // we couldn't open up the DB. This is an unrecoverable error so mark the scope as done.
+    *aDone = true; // we couldn't open up the DB. This is an unrecoverable error so mark the scope as done.
 
   delete expressionTree;
 
   // in the past an error here would cause an "infinite" search because the url would continue to run...
   // i.e. if we couldn't open the database, it returns an error code but the caller of this function says, oh,
   // we did not finish so continue...what we really want is to treat this current scope as done
   if (*aDone)
     CleanUpScope(); // Do clean up for end-of-scope processing
@@ -796,17 +796,17 @@ nsresult nsMsgSearchOfflineMail::Search 
 }
 
 void nsMsgSearchOfflineMail::CleanUpScope()
 {
   // Let go of the DB when we're done with it so we don't kill the db cache
   if (m_db)
   {
     m_listContext = nsnull;
-    m_db->Close(PR_FALSE);
+    m_db->Close(false);
   }
   m_db = nsnull;
 
   if (m_scope)
     m_scope->CloseInputStream();
 }
 
 NS_IMETHODIMP nsMsgSearchOfflineMail::AddResultElement (nsIMsgDBHdr *pHeaders)
@@ -824,17 +824,17 @@ NS_IMETHODIMP nsMsgSearchOfflineMail::Ad
     return err;
 }
 
 NS_IMETHODIMP
 nsMsgSearchOfflineMail::Abort ()
 {
     // Let go of the DB when we're done with it so we don't kill the db cache
     if (m_db)
-        m_db->Close(PR_TRUE /* commit in case we downloaded new headers */);
+        m_db->Close(true /* commit in case we downloaded new headers */);
     m_db = nsnull;
     return nsMsgSearchAdapter::Abort ();
 }
 
 /* void OnStartRunningUrl (in nsIURI url); */
 NS_IMETHODIMP nsMsgSearchOfflineMail::OnStartRunningUrl(nsIURI *url)
 {
     return NS_OK;
--- a/mailnews/base/search/src/nsMsgSearchAdapter.cpp
+++ b/mailnews/base/search/src/nsMsgSearchAdapter.cpp
@@ -163,24 +163,24 @@ NS_IMETHODIMP nsMsgSearchAdapter::Curren
 
 NS_IMETHODIMP nsMsgSearchAdapter::GetEncoding (char **encoding)
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgSearchAdapter::AddResultElement (nsIMsgDBHdr *pHeaders)
 {
-    NS_ASSERTION(PR_FALSE, "shouldn't call this base class impl");
+    NS_ASSERTION(false, "shouldn't call this base class impl");
     return NS_ERROR_FAILURE;
 }
 
 
 NS_IMETHODIMP nsMsgSearchAdapter::AddHit(nsMsgKey key)
 {
-  NS_ASSERTION(PR_FALSE, "shouldn't call this base class impl");
+  NS_ASSERTION(false, "shouldn't call this base class impl");
   return NS_ERROR_FAILURE;
 }
 
 
 char *
 nsMsgSearchAdapter::GetImapCharsetParam(const PRUnichar *destCharset)
 {
   char *result = nsnull;
@@ -259,17 +259,17 @@ char *nsMsgSearchAdapter::UnEscapeSearch
 
 nsresult
 nsMsgSearchAdapter::GetSearchCharsets(nsAString &srcCharset, nsAString &dstCharset)
 {
   nsresult rv;
 
   if (m_defaultCharset.IsEmpty())
   {
-    m_forceAsciiSearch = PR_FALSE;  // set the default value in case of error
+    m_forceAsciiSearch = false;  // set the default value in case of error
     nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
     if (NS_SUCCEEDED(rv))
     {
       nsCOMPtr<nsIPrefLocalizedString> localizedstr;
       rv = prefs->GetComplexValue("mailnews.view_default_charset", NS_GET_IID(nsIPrefLocalizedString),
                                   getter_AddRefs(localizedstr));
       if (NS_SUCCEEDED(rv))
         localizedstr->GetData(getter_Copies(m_defaultCharset));
@@ -342,17 +342,17 @@ nsresult nsMsgSearchAdapter::EncodeImapT
   nsresult rv = term->GetValue(getter_AddRefs(searchValue));
 
   NS_ENSURE_SUCCESS(rv,rv);
 
   nsMsgSearchOpValue op;
   term->GetOp(&op);
 
   if (op == nsMsgSearchOp::DoesntContain || op == nsMsgSearchOp::Isnt)
-    useNot = PR_TRUE;
+    useNot = true;
 
   nsMsgSearchAttribValue attrib;
   term->GetAttrib(&attrib);
 
   switch (attrib)
   {
   case nsMsgSearchAttrib::ToOrCC:
     orHeaderMnemonic = m_kImapCC;
@@ -389,32 +389,32 @@ nsresult nsMsgSearchAdapter::EncodeImapT
         break;
       case nsMsgSearchOp::IsLessThan:
         whichMnemonic = (!dateInFuture) ? m_kImapSince : m_kImapBefore;
         break;
       case nsMsgSearchOp::Is:
         whichMnemonic = m_kImapSentOn;
         break;
       default:
-        NS_ASSERTION(PR_FALSE, "invalid search operator");
+        NS_ASSERTION(false, "invalid search operator");
         return NS_ERROR_INVALID_ARG;
       }
     }
     break;
   case nsMsgSearchAttrib::Size:
     switch (op)
     {
     case nsMsgSearchOp::IsGreaterThan:
       whichMnemonic = m_kImapSizeLarger;
       break;
     case nsMsgSearchOp::IsLessThan:
       whichMnemonic = m_kImapSizeSmaller;
       break;
     default:
-      NS_ASSERTION(PR_FALSE, "invalid search operator");
+      NS_ASSERTION(false, "invalid search operator");
       return NS_ERROR_INVALID_ARG;
     }
     break;
     case nsMsgSearchAttrib::Date:
       switch (op)
       {
       case nsMsgSearchOp::IsBefore:
         whichMnemonic = m_kImapBefore;
@@ -422,29 +422,29 @@ nsresult nsMsgSearchAdapter::EncodeImapT
       case nsMsgSearchOp::IsAfter:
         whichMnemonic = m_kImapSince;
         break;
       case nsMsgSearchOp::Isnt:  /* we've already added the "Not" so just process it like it was a date is search */
       case nsMsgSearchOp::Is:
         whichMnemonic = m_kImapSentOn;
         break;
       default:
-        NS_ASSERTION(PR_FALSE, "invalid search operator");
+        NS_ASSERTION(false, "invalid search operator");
         return NS_ERROR_INVALID_ARG;
       }
       break;
     case nsMsgSearchAttrib::AnyText:
       whichMnemonic = m_kImapAnyText;
       break;
     case nsMsgSearchAttrib::Keywords:
       whichMnemonic = m_kImapKeyword;
       break;
     case nsMsgSearchAttrib::MsgStatus:
-      useNot = PR_FALSE; // bizarrely, NOT SEEN is wrong, but UNSEEN is right.
-      ignoreValue = PR_TRUE; // the mnemonic is all we need
+      useNot = false; // bizarrely, NOT SEEN is wrong, but UNSEEN is right.
+      ignoreValue = true; // the mnemonic is all we need
       PRUint32 status;
       searchValue->GetStatus(&status);
 
       switch (status)
       {
       case nsMsgMessageFlags::Read:
         whichMnemonic = op == nsMsgSearchOp::Is ? m_kImapSeen : m_kImapNotSeen;
         break;
@@ -453,17 +453,17 @@ nsresult nsMsgSearchAdapter::EncodeImapT
         break;
       case nsMsgMessageFlags::New:
         whichMnemonic = op == nsMsgSearchOp::Is ? m_kImapNew : m_kImapNotNew;
         break;
       case nsMsgMessageFlags::Marked:
         whichMnemonic = op == nsMsgSearchOp::Is ? m_kImapFlagged : m_kImapNotFlagged;
         break;
       default:
-        NS_ASSERTION(PR_FALSE, "invalid search operator");
+        NS_ASSERTION(false, "invalid search operator");
         return NS_ERROR_INVALID_ARG;
       }
       break;
     default:
       if ( attrib > nsMsgSearchAttrib::OtherHeader && attrib < nsMsgSearchAttrib::kNumMsgSearchAttributes)
       {
         nsCString arbitraryHeaderTerm;
         term->GetArbitraryHeader(arbitraryHeaderTerm);
@@ -474,17 +474,17 @@ nsresult nsMsgSearchAdapter::EncodeImapT
           arbitraryHeader.AppendLiteral("\" ");
           whichMnemonic = arbitraryHeader.get();
         }
         else
           return NS_ERROR_FAILURE;
       }
       else
       {
-        NS_ASSERTION(PR_FALSE, "invalid search operator");
+        NS_ASSERTION(false, "invalid search operator");
         return NS_ERROR_INVALID_ARG;
       }
     }
 
     char *value = nsnull;
     char dateBuf[100];
     dateBuf[0] = '\0';
 
@@ -558,17 +558,17 @@ nsresult nsMsgSearchAdapter::EncodeImapT
         // Ensure that greater than is really greater than
         // in kb resolution.
         if (op == nsMsgSearchOp::IsGreaterThan)
           sizeValue += 1024;
 
         searchTermValue.AppendInt(sizeValue);
 
         value = ToNewCString(searchTermValue);
-        valueWasAllocated = PR_TRUE;
+        valueWasAllocated = true;
       }
       else
 
       if (IS_STRING_ATTRIBUTE(attrib))
       {
         PRUnichar *convertedValue; // = reallyDredd ? MSG_EscapeSearchUrl (term->m_value.u.string) : msg_EscapeImapSearchProtocol(term->m_value.u.string);
         nsString searchTermValue;
         searchValue->GetStr(searchTermValue);
@@ -611,17 +611,17 @@ nsresult nsMsgSearchAdapter::EncodeImapT
             }
             *p = '\0';
             value = strdup(newValue); // realloc down to smaller size
           }
         }
         else
           value = strdup("");
         NS_Free(convertedValue);
-        valueWasAllocated = PR_TRUE;
+        valueWasAllocated = true;
 
       }
     }
 
     // this should be rewritten to use nsCString
     int subLen =
       (value ? strlen(value) : 0) +
       (useNot ? strlen(m_kImapNot) : 0) +
@@ -821,19 +821,19 @@ char *nsMsgSearchAdapter::TransformSpace
 //-----------------------------------------------------------------------------
 
 nsMsgSearchValidityTable::nsMsgSearchValidityTable ()
 {
   // Set everything to be unavailable and disabled
   for (int i = 0; i < nsMsgSearchAttrib::kNumMsgSearchAttributes; i++)
     for (int j = 0; j < nsMsgSearchOp::kNumMsgSearchOperators; j++)
     {
-      SetAvailable (i, j, PR_FALSE);
-      SetEnabled (i, j, PR_FALSE);
-      SetValidButNotShown (i,j, PR_FALSE);
+      SetAvailable (i, j, false);
+      SetEnabled (i, j, false);
+      SetValidButNotShown (i,j, false);
     }
   m_numAvailAttribs = 0;   // # of attributes marked with at least one available operator
   // assume default is Subject, which it is for mail and news search
   // it's not for LDAP, so we'll call SetDefaultAttrib()
   m_defaultAttrib = nsMsgSearchAttrib::Subject;
 }
 
 NS_IMPL_ISUPPORTS1(nsMsgSearchValidityTable, nsIMsgSearchValidityTable)
@@ -1104,17 +1104,17 @@ NS_IMETHODIMP nsMsgSearchValidityManager
     *ppOutTable = m_localABTable;
     break;
   case nsMsgSearchScope::LocalABAnd:
     if (!m_localABAndTable)
       rv = InitLocalABAndTable ();
     *ppOutTable = m_localABAndTable;
     break;
   default:
-    NS_ASSERTION(PR_FALSE, "invalid table type");
+    NS_ASSERTION(false, "invalid table type");
     rv = NS_MSG_ERROR_INVALID_SEARCH_TERM;
   }
 
   NS_IF_ADDREF(*ppOutTable);
   return rv;
 }
 
 // mapping between ordered attribute values, and property strings
@@ -1258,53 +1258,53 @@ nsresult nsMsgSearchValidityManager::Ena
 
 nsresult nsMsgSearchValidityManager::InitLdapTable()
 {
   NS_ASSERTION(!m_ldapTable,"don't call this twice!");
 
   nsresult rv = NewTable(getter_AddRefs(m_ldapTable));
   NS_ENSURE_SUCCESS(rv,rv);
 
-  rv = SetUpABTable(m_ldapTable, PR_TRUE);
+  rv = SetUpABTable(m_ldapTable, true);
   NS_ENSURE_SUCCESS(rv,rv);
   return rv;
 }
 
 nsresult nsMsgSearchValidityManager::InitLdapAndTable()
 {
   NS_ASSERTION(!m_ldapAndTable,"don't call this twice!");
 
   nsresult rv = NewTable(getter_AddRefs(m_ldapAndTable));
   NS_ENSURE_SUCCESS(rv,rv);
 
-  rv = SetUpABTable(m_ldapAndTable, PR_FALSE);
+  rv = SetUpABTable(m_ldapAndTable, false);
   NS_ENSURE_SUCCESS(rv,rv);
   return rv;
 }
 
 nsresult nsMsgSearchValidityManager::InitLocalABTable()
 {
   NS_ASSERTION(!m_localABTable,"don't call this twice!");
 
   nsresult rv = NewTable(getter_AddRefs(m_localABTable));
   NS_ENSURE_SUCCESS(rv,rv);
 
-  rv = SetUpABTable(m_localABTable, PR_TRUE);
+  rv = SetUpABTable(m_localABTable, true);
   NS_ENSURE_SUCCESS(rv,rv);
   return rv;
 }
 
 nsresult nsMsgSearchValidityManager::InitLocalABAndTable()
 {
   NS_ASSERTION(!m_localABAndTable,"don't call this twice!");
 
   nsresult rv = NewTable(getter_AddRefs(m_localABAndTable));
   NS_ENSURE_SUCCESS(rv,rv);
 
-  rv = SetUpABTable(m_localABAndTable, PR_FALSE);
+  rv = SetUpABTable(m_localABAndTable, false);
   NS_ENSURE_SUCCESS(rv,rv);
   return rv;
 }
 
 nsresult
 nsMsgSearchValidityManager::SetUpABTable(nsIMsgSearchValidityTable *aTable, bool isOrTable)
 {
   nsresult rv = aTable->SetDefaultAttrib(isOrTable ? nsMsgSearchAttrib::Name : nsMsgSearchAttrib::DisplayName);
--- a/mailnews/base/search/src/nsMsgSearchNews.cpp
+++ b/mailnews/base/search/src/nsMsgSearchNews.cpp
@@ -145,48 +145,48 @@ char *nsMsgSearchNews::EncodeTerm (nsIMs
   case nsMsgSearchAttrib::Subject:
     attribEncoding = m_kNntpSubject;
     break;
   default:
     nsCString header;
     term->GetArbitraryHeader(header);
     if (header.IsEmpty())
     {
-      NS_ASSERTION(PR_FALSE,"malformed search"); // malformed search term?
+      NS_ASSERTION(false,"malformed search"); // malformed search term?
       return nsnull;
     }
     attribEncoding = header.get();
   }
 
   // Build a string to represent the string pattern
   bool leadingStar = false;
   bool trailingStar = false;
   int overhead = 1; // null terminator
   nsMsgSearchOpValue op;
   term->GetOp(&op);
 
   switch (op)
   {
   case nsMsgSearchOp::Contains:
-    leadingStar = PR_TRUE;
-    trailingStar = PR_TRUE;
+    leadingStar = true;
+    trailingStar = true;
     overhead += 2;
     break;
   case nsMsgSearchOp::Is:
     break;
   case nsMsgSearchOp::BeginsWith:
-    trailingStar = PR_TRUE;
+    trailingStar = true;
     overhead++;
     break;
   case nsMsgSearchOp::EndsWith:
-    leadingStar = PR_TRUE;
+    leadingStar = true;
     overhead++;
     break;
   default:
-    NS_ASSERTION(PR_FALSE,"malformed search"); // malformed search term?
+    NS_ASSERTION(false,"malformed search"); // malformed search term?
     return nsnull;
   }
 
     // ### i18N problem Get the csid from FE, which is the correct csid for term
 //  int16 wincsid = INTL_GetCharSetID(INTL_DefaultTextWidgetCsidSel);
 
   // Do INTL_FormatNNTPXPATInRFC1522Format trick for non-ASCII string
 //  unsigned char *intlNonRFC1522Value = INTL_FormatNNTPXPATInNonRFC1522Format (wincsid, (unsigned char*)term->m_value.u.string);
--- a/mailnews/base/search/src/nsMsgSearchSession.cpp
+++ b/mailnews/base/search/src/nsMsgSearchSession.cpp
@@ -57,19 +57,19 @@
 
 NS_IMPL_ISUPPORTS3(nsMsgSearchSession, nsIMsgSearchSession, nsIUrlListener, nsISupportsWeakReference)
 
 nsMsgSearchSession::nsMsgSearchSession()
 {
   m_sortAttribute = nsMsgSearchAttrib::Sender;
   m_idxRunningScope = 0;
   m_urlQueueIndex = 0;
-  m_handlingError = PR_FALSE;
+  m_handlingError = false;
   m_expressionTree = nsnull;
-  m_searchPaused = PR_FALSE;
+  m_searchPaused = false;
   NS_NewISupportsArray(getter_AddRefs(m_termList));
 }
 
 nsMsgSearchSession::~nsMsgSearchSession()
 {
   InterruptSearch();
   delete m_expressionTree;
   DestroyScopeList ();
@@ -290,17 +290,17 @@ NS_IMETHODIMP nsMsgSearchSession::Search
 }
 
 /* void InterruptSearch (); */
 NS_IMETHODIMP nsMsgSearchSession::InterruptSearch()
 {
   nsCOMPtr<nsIMsgWindow> msgWindow(do_QueryReferent(m_msgWindowWeak));
   if (msgWindow)
   {
-    EnableFolderNotifications(PR_TRUE);
+    EnableFolderNotifications(true);
     if (m_idxRunningScope < m_scopeList.Length())
       msgWindow->StopUrls();
 
     while (m_idxRunningScope < m_scopeList.Length())
     {
       ReleaseFolderDBRef();
       m_idxRunningScope++;
     }
@@ -316,28 +316,28 @@ NS_IMETHODIMP nsMsgSearchSession::Interr
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgSearchSession::PauseSearch()
 {
   if (m_backgroundTimer)
   {
     m_backgroundTimer->Cancel();
-    m_searchPaused = PR_TRUE;
+    m_searchPaused = true;
     return NS_OK;
   }
   else
     return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP nsMsgSearchSession::ResumeSearch()
 {
   if (m_searchPaused)
   {
-    m_searchPaused = PR_FALSE;
+    m_searchPaused = false;
     return StartTimer();
   }
   else
     return NS_ERROR_FAILURE;
 }
 
 /* [noscript] readonly attribute voidStar searchParam; */
 NS_IMETHODIMP nsMsgSearchSession::GetSearchParam(void * *aSearchParam)
@@ -389,17 +389,17 @@ NS_IMETHODIMP nsMsgSearchSession::OnStop
 {
   nsCOMPtr <nsIMsgSearchAdapter> runningAdapter;
 
   nsresult rv = GetRunningAdapter (getter_AddRefs(runningAdapter));
   // tell the current adapter that the current url has run.
   if (NS_SUCCEEDED(rv) && runningAdapter)
   {
     runningAdapter->CurrentUrlDone(aExitCode);
-    EnableFolderNotifications(PR_TRUE);
+    EnableFolderNotifications(true);
     ReleaseFolderDBRef();
   }
   m_idxRunningScope++;
   if (++m_urlQueueIndex < m_urlQueue.Length())
     GetNextUrl();
   else if (m_idxRunningScope < m_scopeList.Length())
     DoNextSearch();
   else
@@ -452,17 +452,17 @@ nsresult nsMsgSearchSession::Initialize(
 nsresult nsMsgSearchSession::BeginSearching()
 {
   // Here's a sloppy way to start the URL, but I don't really have time to
   // unify the scheduling mechanisms. If the first scope is a newsgroup, and
   // it's not Dredd-capable, we build the URL queue. All other searches can be
   // done with one URL
   nsCOMPtr<nsIMsgWindow> msgWindow(do_QueryReferent(m_msgWindowWeak));
   if (msgWindow)
-    msgWindow->SetStopped(PR_FALSE);
+    msgWindow->SetStopped(false);
   return DoNextSearch();
 }
 
 nsresult nsMsgSearchSession::DoNextSearch()
 {
   nsMsgSearchScopeTerm *scope = m_scopeList.ElementAt(m_idxRunningScope);
   if (scope->m_attribute == nsMsgSearchScope::onlineMail ||
     (scope->m_attribute == nsMsgSearchScope::news && scope->m_searchServer))
@@ -507,17 +507,17 @@ nsresult nsMsgSearchSession::GetNextUrl(
   if (msgWindow)
     msgWindow->GetStopped(&stopped);
   if (stopped)
     return NS_OK;
 
   nextUrl = m_urlQueue[m_urlQueueIndex];
   nsMsgSearchScopeTerm *currentTerm = GetRunningScope();
   NS_ENSURE_TRUE(currentTerm, NS_ERROR_NULL_POINTER);
-  EnableFolderNotifications(PR_FALSE);
+  EnableFolderNotifications(false);
   nsCOMPtr <nsIMsgFolder> folder = currentTerm->m_folder;
   if (folder)
   {
     nsCString folderUri;
     folder->GetURI(folderUri);
     nsresult rv = GetMessageServiceFromURI(folderUri, getter_AddRefs(msgService));
 
     if (NS_SUCCEEDED(rv) && msgService && currentTerm)
@@ -559,17 +559,17 @@ nsresult nsMsgSearchSession::StartTimer(
   m_backgroundTimer->InitWithFuncCallback(TimerCallback, (void *) this, 0,
                                           nsITimer::TYPE_REPEATING_SLACK);
   TimerCallback(m_backgroundTimer, this);
   return NS_OK;
 }
 
 nsresult nsMsgSearchSession::SearchWOUrls ()
 {
-  EnableFolderNotifications(PR_FALSE);
+  EnableFolderNotifications(false);
   return StartTimer();
 }
 
 NS_IMETHODIMP nsMsgSearchSession::GetRunningAdapter (nsIMsgSearchAdapter **aSearchAdapter)
 {
   NS_ENSURE_ARG(aSearchAdapter);
   nsMsgSearchScopeTerm *scope = GetRunningScope();
   if (scope)
@@ -678,55 +678,55 @@ nsresult nsMsgSearchSession::TimeSliceSe
 
   NS_ENSURE_ARG(aDone);
   nsresult rv = NS_OK;
   nsMsgSearchScopeTerm *scope = GetRunningScope();
   if (scope)
   {
     rv = scope->TimeSlice (aDone);
     if (NS_FAILED(rv))
-      *aDone = PR_TRUE;
+      *aDone = true;
     if (*aDone || NS_FAILED(rv))
     {
-      EnableFolderNotifications(PR_TRUE);
+      EnableFolderNotifications(true);
       ReleaseFolderDBRef();
       m_idxRunningScope++;
-      EnableFolderNotifications(PR_FALSE);
+      EnableFolderNotifications(false);
       // check if the next scope is an online search; if so,
       // set *aDone to true so that we'll try to run the next
       // search in TimerCallback.
       scope = GetRunningScope();
       if (scope && (scope->m_attribute == nsMsgSearchScope::onlineMail ||
         (scope->m_attribute == nsMsgSearchScope::news && scope->m_searchServer)))
       {
-        *aDone = PR_TRUE;
+        *aDone = true;
         return rv;
       }
 
     }
-    *aDone = PR_FALSE;
+    *aDone = false;
     return rv;
   }
   else
   {
-    *aDone = PR_TRUE;
+    *aDone = true;
     return NS_OK;
   }
 }
 
 void
 nsMsgSearchSession::EnableFolderNotifications(bool aEnable)
 {
   nsMsgSearchScopeTerm *scope = GetRunningScope();
   if (scope)
   {
     nsCOMPtr<nsIMsgFolder> folder;
     scope->GetFolder(getter_AddRefs(folder));
     if (folder)  //enable msg count notifications
-      folder->EnableNotifications(nsIMsgFolder::allMessageCountNotifications, aEnable, PR_FALSE);
+      folder->EnableNotifications(nsIMsgFolder::allMessageCountNotifications, aEnable, false);
   }
 }
 
 //this method is used for adding new hdrs to quick search view
 NS_IMETHODIMP
 nsMsgSearchSession::MatchHdr(nsIMsgDBHdr *aMsgHdr, nsIMsgDatabase *aDatabase, bool *aResult)
 {
   nsMsgSearchScopeTerm *scope = m_scopeList.SafeElementAt(0, nsnull);
--- a/mailnews/base/search/src/nsMsgSearchTerm.cpp
+++ b/mailnews/base/search/src/nsMsgSearchTerm.cpp
@@ -139,26 +139,26 @@ nsresult NS_MsgGetAttributeFromString(co
   bool isArbitraryHeader = false;
   // arbitrary headers have a leading quote
   if (*string != '"')
   {
     for (unsigned int idxAttrib = 0; idxAttrib < sNumSearchAttribEntryTable; idxAttrib++)
     {
       if (!PL_strcasecmp(string, SearchAttribEntryTable[idxAttrib].attribName))
       {
-        found = PR_TRUE;
+        found = true;
         *attrib = SearchAttribEntryTable[idxAttrib].attrib;
         break;
       }
     }
   }
   else // remove the leading quote
   {
     string++;
-    isArbitraryHeader = PR_TRUE;
+    isArbitraryHeader = true;
   }
 
   if (!found && !isArbitraryHeader)
   {
     // must be a custom attribute
     *attrib = nsMsgSearchAttrib::Custom;
     aCustomId.Assign(string);
     return NS_OK;
@@ -192,17 +192,17 @@ nsresult NS_MsgGetAttributeFromString(co
       char *newStr= hdrStr.BeginWriting();
       char *token = NS_strtok(":", &newStr);
       PRUint32 i=0;
       while (token)
       {
         if (PL_strcasecmp(token, string) == 0)
         {
           *attrib += i; //we found custom header in the pref
-          found = PR_TRUE;
+          found = true;
           break;
         }
         token = NS_strtok(":", &newStr);
         i++;
       }
     }
   }
   // If we didn't find the header in MAILNEWS_CUSTOM_HEADERS, we're
@@ -222,17 +222,17 @@ nsresult NS_MsgGetStringForAttribute(PRI
   bool found = false;
   for (unsigned int idxAttrib = 0; idxAttrib < sNumSearchAttribEntryTable; idxAttrib++)
   {
     // I'm using the idx's as aliases into MSG_SearchAttribute and
     // MSG_SearchOperator enums which is legal because of the way the
     // enums are defined (starts at 0, numItems at end)
     if (attrib == SearchAttribEntryTable[idxAttrib].attrib)
     {
-      found = PR_TRUE;
+      found = true;
       *string = SearchAttribEntryTable[idxAttrib].attribName;
       break;
     }
   }
   if (!found)
     *string = '\0'; // don't leave the string uninitialized
 
   // we no longer return invalid attribute. If we cannot find the string in the table,
@@ -279,17 +279,17 @@ nsresult NS_MsgGetOperatorFromString(con
   bool found = false;
   for (unsigned int idxOp = 0; idxOp < sNumSearchOperatorEntryTable; idxOp++)
   {
     // I'm using the idx's as aliases into MSG_SearchAttribute and
     // MSG_SearchOperator enums which is legal because of the way the
     // enums are defined (starts at 0, numItems at end)
     if (!PL_strcasecmp(string, SearchOperatorEntryTable[idxOp].opName))
     {
-      found = PR_TRUE;
+      found = true;
       *op = SearchOperatorEntryTable[idxOp].op;
       break;
     }
   }
   return (found) ? NS_OK : NS_ERROR_INVALID_ARG;
 }
 
 nsresult NS_MsgGetStringForOperator(PRInt16 op, const char **string)
@@ -299,17 +299,17 @@ nsresult NS_MsgGetStringForOperator(PRIn
   bool found = false;
   for (unsigned int idxOp = 0; idxOp < sNumSearchOperatorEntryTable; idxOp++)
   {
     // I'm using the idx's as aliases into MSG_SearchAttribute and
     // MSG_SearchOperator enums which is legal because of the way the
     // enums are defined (starts at 0, numItems at end)
     if (op == SearchOperatorEntryTable[idxOp].op)
     {
-      found = PR_TRUE;
+      found = true;
       *string = SearchOperatorEntryTable[idxOp].opName;
       break;
     }
   }
 
   return (found) ? NS_OK : NS_ERROR_INVALID_ARG;
 }
 
@@ -384,19 +384,19 @@ PRInt32 NS_MsgGetStatusValueFromName(cha
 nsMsgSearchTerm::nsMsgSearchTerm()
 {
     // initialize this to zero
     m_value.string=nsnull;
     m_value.attribute=0;
     m_value.u.priority=0;
     m_attribute = nsMsgSearchAttrib::Default;
     m_operator = nsMsgSearchOp::Contains;
-    mBeginsGrouping = PR_FALSE;
-    mEndsGrouping = PR_FALSE;
-    m_matchAll = PR_FALSE;
+    mBeginsGrouping = false;
+    mEndsGrouping = false;
+    m_matchAll = false;
 }
 
 nsMsgSearchTerm::nsMsgSearchTerm (
                                   nsMsgSearchAttribValue attrib,
                                   nsMsgSearchOpValue op,
                                   nsIMsgSearchValue *val,
                                   nsMsgSearchBooleanOperator boolOp,
                                   const char * aCustomString)
@@ -410,17 +410,17 @@ nsMsgSearchTerm::nsMsgSearchTerm (
     ToLowerCaseExceptSpecials(m_arbitraryHeader);
   }
   else if (attrib == nsMsgSearchAttrib::Custom)
   {
     m_customId = aCustomString;
   }
 
   nsMsgResultElement::AssignValues (val, &m_value);
-  m_matchAll = PR_FALSE;
+  m_matchAll = false;
 }
 
 
 
 nsMsgSearchTerm::~nsMsgSearchTerm ()
 {
   if (IS_STRING_ATTRIBUTE (m_attribute) && m_value.string)
     NS_Free(m_value.string);
@@ -460,17 +460,17 @@ nsresult nsMsgSearchTerm::OutputValue(ns
   {
     bool    quoteVal = false;
     // need to quote strings with ')' and strings starting with '"' or ' '
     // filter code will escape quotes
     if (PL_strchr(m_value.string, ')') ||
       (m_value.string[0] == ' ') ||
       (m_value.string[0] == '"'))
     {
-      quoteVal = PR_TRUE;
+      quoteVal = true;
       outputStr += "\"";
     }
     if (PL_strchr(m_value.string, '"'))
     {
       char *escapedString = nsMsgSearchTerm::EscapeQuotesInStr(m_value.string);
       if (escapedString)
       {
         outputStr += escapedString;
@@ -545,17 +545,17 @@ nsresult nsMsgSearchTerm::OutputValue(ns
         break;
       }
     case nsMsgSearchAttrib::Uint32HdrProperty:
       {
         outputStr.AppendInt(m_value.u.msgStatus);
         break;
       }
     default:
-      NS_ASSERTION(PR_FALSE, "trying to output invalid attribute");
+      NS_ASSERTION(false, "trying to output invalid attribute");
       break;
     }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgSearchTerm::GetTermAsString (nsACString &outStream)
 {
@@ -615,33 +615,33 @@ nsresult nsMsgSearchTerm::ParseValue(cha
   if (IS_STRING_ATTRIBUTE(m_attribute))
   {
     bool quoteVal = false;
     while (isspace(*inStream))
       inStream++;
     // need to remove pair of '"', if present
     if (*inStream == '"')
     {
-      quoteVal = PR_TRUE;
+      quoteVal = true;
       inStream++;
     }
     int valueLen = PL_strlen(inStream);
     if (quoteVal && inStream[valueLen - 1] == '"')
       valueLen--;
 
     m_value.string = (char *) PR_Malloc(valueLen + 1);
     PL_strncpy(m_value.string, inStream, valueLen + 1);
     m_value.string[valueLen] = '\0';
   }
   else
   {
     switch (m_attribute)
     {
     case nsMsgSearchAttrib::Date:
-      PR_ParseTimeString (inStream, PR_FALSE, &m_value.u.date);
+      PR_ParseTimeString (inStream, false, &m_value.u.date);
       break;
     case nsMsgSearchAttrib::MsgStatus:
       m_value.u.msgStatus = NS_MsgGetStatusValueFromName(inStream);
       break;
     case nsMsgSearchAttrib::Priority:
       NS_MsgGetPriorityFromString(inStream, m_value.u.priority);
       break;
     case nsMsgSearchAttrib::AgeInDays:
@@ -658,17 +658,17 @@ nsresult nsMsgSearchTerm::ParseValue(cha
       break;
     case nsMsgSearchAttrib::HasAttachmentStatus:
       m_value.u.msgStatus = nsMsgMessageFlags::Attachment;
       break; // this should always be true.
     case nsMsgSearchAttrib::Size:
       m_value.u.size = atoi(inStream);
       break;
     default:
-      NS_ASSERTION(PR_FALSE, "invalid attribute parsing search term value");
+      NS_ASSERTION(false, "invalid attribute parsing search term value");
       break;
     }
   }
   m_value.attribute = m_attribute;
   return NS_OK;
 }
 
 // find the operator code for this operator string.
@@ -699,17 +699,17 @@ nsMsgSearchTerm::ParseAttribute(char *in
 
     // if we are dealing with an arbitrary header, it will be quoted....
     // it seems like a kludge, but to distinguish arbitrary headers from
     // standard headers with the same name, like "Date", we'll use the
     // presence of the quote to recognize arbitrary headers. We leave the
     // leading quote as a flag, but remove the trailing quote.
     bool quoteVal = false;
     if (*inStream == '"')
-        quoteVal = PR_TRUE;
+        quoteVal = true;
 
     // arbitrary headers are quoted. Skip first character, which will be the
     // first quote for arbitrary headers
     char *separator = strchr(inStream + 1, quoteVal ? '"' : ',');
 
     if (separator)
         *separator = '\0';
 
@@ -733,17 +733,17 @@ nsMsgSearchTerm::ParseAttribute(char *in
 // This routine should get called twice, the first time
 // with "to or cc, contains, r-thompson", the second time with
 // "body, doesn't contain, fred"
 
 nsresult nsMsgSearchTerm::DeStreamNew (char *inStream, PRInt16 /*length*/)
 {
   if (!strcmp(inStream, "ALL"))
   {
-    m_matchAll = PR_TRUE;
+    m_matchAll = true;
     return NS_OK;
   }
   char *commaSep = PL_strchr(inStream, ',');
   nsresult rv = ParseAttribute(inStream, &m_attribute);  // will allocate space for arbitrary header if necessary
   NS_ENSURE_SUCCESS(rv, rv);
   if (!commaSep)
     return NS_ERROR_INVALID_ARG;
   char *secondCommaSep = PL_strchr(commaSep + 1, ',');
@@ -773,17 +773,17 @@ nsresult nsMsgSearchTerm::MatchArbitrary
                                                 nsIMsgDBHdr *msg,
                                                 nsIMsgDatabase* db,
                                                 const char * headers,
                                                 PRUint32 headersSize,
                                                 bool ForFiltering,
                                                 bool *pResult)
 {
   NS_ENSURE_ARG_POINTER(pResult);
-  *pResult = PR_FALSE;
+  *pResult = false;
   nsresult err = NS_OK;
   bool matchExpected = m_operator == nsMsgSearchOp::Contains ||
                          m_operator == nsMsgSearchOp::Is ||
                          m_operator == nsMsgSearchOp::BeginsWith ||
                          m_operator == nsMsgSearchOp::EndsWith;
   // init result to what we want if we don't find the header at all
   bool result = !matchExpected;
 
@@ -794,49 +794,49 @@ nsresult nsMsgSearchTerm::MatchArbitrary
     return MatchRfc2047String(dbHdrValue.get(), charset, charsetOverride, pResult);
 
   nsMsgBodyHandler * bodyHandler =
     new nsMsgBodyHandler (scope, length, msg, db, headers, headersSize,
                           ForFiltering);
   if (!bodyHandler)
     return NS_ERROR_OUT_OF_MEMORY;
 
-  bodyHandler->SetStripHeaders (PR_FALSE);
+  bodyHandler->SetStripHeaders (false);
 
   nsCString headerFullValue; // contains matched header value accumulated over multiple lines.
   nsCAutoString buf;
   nsCAutoString curMsgHeader;
   bool searchingHeaders = true;
 
   // We will allow accumulation of received headers;
   bool isReceivedHeader = m_arbitraryHeader.EqualsLiteral("received");
   
   while (searchingHeaders)
   {
     if (bodyHandler->GetNextLine(buf) < 0 || EMPTY_MESSAGE_LINE(buf))
-      searchingHeaders = PR_FALSE;
+      searchingHeaders = false;
     bool isContinuationHeader = searchingHeaders ? NS_IsAsciiWhitespace(buf.CharAt(0))
-                                                   : PR_FALSE;
+                                                   : false;
 
     // We try to match the header from the last time through the loop, which should now
     //  have accumulated over possible multiple lines. For all headers except received,
     //  we process a single accumulation, but process accumulated received at the end.
     if (!searchingHeaders || (!isContinuationHeader &&
          (!headerFullValue.IsEmpty() && !isReceivedHeader)))
     {
       // Make sure buf has info besides just the header.
       // Otherwise, it's either an empty header, or header not found.
       if (!headerFullValue.IsEmpty())
       {
         bool stringMatches;
         // match value with the other info.
         err = MatchRfc2047String(headerFullValue.get(), charset, charsetOverride, &stringMatches);
         if (matchExpected == stringMatches) // if we found a match
         {
-          searchingHeaders = PR_FALSE;   // then stop examining the headers
+          searchingHeaders = false;   // then stop examining the headers
           result = stringMatches;
         }
       }
       break;
     }
 
     char * buf_end = (char *) (buf.get() + buf.Length());
     int headerLength = m_arbitraryHeader.Length();
@@ -912,45 +912,45 @@ NS_IMETHODIMP nsMsgSearchTerm::MatchUint
   PRUint32 dbHdrValue;
   aHdr->GetUint32Property(m_hdrProperty.get(), &dbHdrValue);
 
   bool result = false;
   switch (m_operator)
   {
   case nsMsgSearchOp::IsGreaterThan:
     if (dbHdrValue > m_value.u.msgStatus)
-      result = PR_TRUE;
+      result = true;
     break;
   case nsMsgSearchOp::IsLessThan:
     if (dbHdrValue < m_value.u.msgStatus)
-      result = PR_TRUE;
+      result = true;
     break;
   case nsMsgSearchOp::Is:
     if (dbHdrValue == m_value.u.msgStatus)
-      result = PR_TRUE;
+      result = true;
     break;
   case nsMsgSearchOp::Isnt:
     if (dbHdrValue != m_value.u.msgStatus)
-      result = PR_TRUE;
+      result = true;
     break;
   default:
     break;
   }
   *aResult = result;
   return NS_OK;
 }
 
 nsresult nsMsgSearchTerm::MatchBody (nsIMsgSearchScopeTerm *scope, PRUint64 offset, PRUint32 length /*in lines*/, const char *folderCharset,
                                       nsIMsgDBHdr *msg, nsIMsgDatabase* db, bool *pResult)
 {
   NS_ENSURE_ARG_POINTER(pResult);
   nsresult err = NS_OK;
 
   bool result = false;
-  *pResult = PR_FALSE;
+  *pResult = false;
 
   // Small hack so we don't look all through a message when someone has
   // specified "BODY IS foo". ### Since length is in lines, this is not quite right.
   if ((length > 0) && (m_operator == nsMsgSearchOp::Is || m_operator == nsMsgSearchOp::Isnt))
     length = PL_strlen (m_value.string);
 
   nsMsgBodyHandler * bodyHan  = new nsMsgBodyHandler (scope, length, msg, db);
   if (!bodyHan)
@@ -1006,17 +1006,17 @@ nsresult nsMsgSearchTerm::MatchBody (nsI
         {
           err = MatchString (compare.get(), folderCharset, &result);
           lines++;
         }
         compare.Truncate();
       }
     }
     else
-      endOfFile = PR_TRUE;
+      endOfFile = true;
   }
 #ifdef DO_I18N
   if(conv)
     INTL_DestroyCharCodeConverter(conv);
 #endif
   delete bodyHan;
   *pResult = result;
   return err;
@@ -1048,66 +1048,66 @@ nsresult nsMsgSearchTerm::InitializeAddr
   }
 
   return NS_OK;
 }
 
 nsresult nsMsgSearchTerm::MatchInAddressBook(const char * aAddress, bool *pResult)
 {
   nsresult rv = InitializeAddressBook();
-  *pResult = PR_FALSE;
+  *pResult = false;
 
   // Some junkmails have empty From: fields.
   if (aAddress == NULL || strlen(aAddress) == 0)
     return rv;
 
   if (mDirectory)
   {
     nsIAbCard* cardForAddress = nsnull;
     rv = mDirectory->CardForEmailAddress(nsDependentCString(aAddress),
                                          &cardForAddress);
     if (NS_FAILED(rv) && rv != NS_ERROR_NOT_IMPLEMENTED)
       return rv;
     if ((m_operator == nsMsgSearchOp::IsInAB && cardForAddress) || (m_operator == nsMsgSearchOp::IsntInAB && !cardForAddress))
-      *pResult = PR_TRUE;
+      *pResult = true;
     NS_IF_RELEASE(cardForAddress);
   }
 
   return rv;
 }
 
-// *pResult is PR_FALSE when strings don't match, PR_TRUE if they do.
+// *pResult is false when strings don't match, true if they do.
 nsresult nsMsgSearchTerm::MatchRfc2047String (const char * rfc2047string,
                                        const char *charset,
                                        bool charsetOverride,
                                        bool *pResult)
 {
   NS_ENSURE_ARG_POINTER(pResult);
   NS_ENSURE_ARG_POINTER(rfc2047string);
 
     nsCOMPtr<nsIMimeConverter> mimeConverter = do_GetService(NS_MIME_CONVERTER_CONTRACTID);
   char *stringToMatch = 0;
     nsresult res = mimeConverter->DecodeMimeHeaderToCharPtr(
-        rfc2047string, charset, charsetOverride, PR_FALSE, &stringToMatch);
+        rfc2047string, charset, charsetOverride, false, &stringToMatch);
 
     if ( m_operator == nsMsgSearchOp::IsInAB ||
          m_operator == nsMsgSearchOp::IsntInAB)
     {
       res = MatchInAddressBook(stringToMatch ? stringToMatch : rfc2047string, pResult);
     }
     else
     res = MatchString(stringToMatch ? stringToMatch : rfc2047string,
                       nsnull, pResult);
 
     PR_Free(stringToMatch);
 
   return res;
 }
 
-// *pResult is PR_FALSE when strings don't match, PR_TRUE if they do.
+// *pResult is false when strings don't match, true if they do.
 nsresult nsMsgSearchTerm::MatchString (const char *stringToMatch,
                                        const char *charset,
                                        bool *pResult)
 {
   NS_ENSURE_ARG_POINTER(pResult);
   bool result = false;
 
   nsresult err = NS_OK;
@@ -1132,68 +1132,68 @@ nsresult nsMsgSearchTerm::MatchString (c
       CopyUTF8toUTF16(nsDependentCString(stringToMatch), utf16StrToMatch);
     }
   }
 
   switch (m_operator)
   {
   case nsMsgSearchOp::Contains:
     if (CaseInsensitiveFindInReadable(needle, utf16StrToMatch))
-      result = PR_TRUE;
+      result = true;
     break;
   case nsMsgSearchOp::DoesntContain:
     if (!CaseInsensitiveFindInReadable(needle, utf16StrToMatch))
-      result = PR_TRUE;
+      result = true;
     break;
   case nsMsgSearchOp::Is:
     if(needle.Equals(utf16StrToMatch, nsCaseInsensitiveStringComparator()))
-      result = PR_TRUE;
+      result = true;
     break;
   case nsMsgSearchOp::Isnt:
     if(!needle.Equals(utf16StrToMatch, nsCaseInsensitiveStringComparator()))
-      result = PR_TRUE;
+      result = true;
     break;
   case nsMsgSearchOp::IsEmpty:
     // For IsEmpty, we didn't copy stringToMatch to utf16StrToMatch.
     if (!PL_strlen(stringToMatch))
-      result = PR_TRUE;
+      result = true;
     break;
   case nsMsgSearchOp::IsntEmpty:
     // For IsntEmpty, we didn't copy stringToMatch to utf16StrToMatch.
     if (PL_strlen(stringToMatch))
-      result = PR_TRUE;
+      result = true;
     break;
   case nsMsgSearchOp::BeginsWith:
     if (StringBeginsWith(utf16StrToMatch, needle,
                          nsCaseInsensitiveStringComparator()))
-      result = PR_TRUE;
+      result = true;
     break;
   case nsMsgSearchOp::EndsWith:
     if (StringEndsWith(utf16StrToMatch, needle,
                        nsCaseInsensitiveStringComparator()))
-      result = PR_TRUE;
+      result = true;
     break;
   default:
-    NS_ASSERTION(PR_FALSE, "invalid operator matching search results");
+    NS_ASSERTION(false, "invalid operator matching search results");
   }
 
   *pResult = result;
   return err;
 }
 
 NS_IMETHODIMP nsMsgSearchTerm::GetMatchAllBeforeDeciding (bool *aResult)
 {
  *aResult = (m_operator == nsMsgSearchOp::DoesntContain || m_operator == nsMsgSearchOp::Isnt);
  return NS_OK;
 }
 
  nsresult nsMsgSearchTerm::MatchRfc822String (const char *string, const char *charset, bool charsetOverride, bool *pResult)
  {
    NS_ENSURE_ARG_POINTER(pResult);
-   *pResult = PR_FALSE;
+   *pResult = false;
    bool result;
    nsresult err = InitHeaderAddressParser();
    if (NS_FAILED(err))
      return err;
    // Isolate the RFC 822 parsing weirdnesses here. MSG_ParseRFC822Addresses
    // returns a catenated string of null-terminated strings, which we walk
    // across, tring to match the target string to either the name OR the address
 
@@ -1264,52 +1264,52 @@ nsresult nsMsgSearchTerm::MatchDate (PRT
 
   nsresult err = NS_OK;
   bool result = false;
 
   switch (m_operator)
   {
   case nsMsgSearchOp::IsBefore:
     if (dateToMatch < m_value.u.date)
-      result = PR_TRUE;
+      result = true;
     break;
   case nsMsgSearchOp::IsAfter:
     {
       PRTime adjustedDate = m_value.u.date;
       adjustedDate += 60*60*24; // we want to be greater than the next day....
       if (dateToMatch > adjustedDate)
-        result = PR_TRUE;
+        result = true;
     }
     break;
   case nsMsgSearchOp::Is:
     {
       PRExplodedTime tmToMatch, tmThis;
       if (NS_OK == GetLocalTimes (dateToMatch, m_value.u.date, tmToMatch, tmThis))
       {
         if (tmThis.tm_year == tmToMatch.tm_year &&
           tmThis.tm_month == tmToMatch.tm_month &&
           tmThis.tm_mday == tmToMatch.tm_mday)
-          result = PR_TRUE;
+          result = true;
       }
     }
     break;
   case nsMsgSearchOp::Isnt:
     {
       PRExplodedTime tmToMatch, tmThis;
       if (NS_OK == GetLocalTimes (dateToMatch, m_value.u.date, tmToMatch, tmThis))
       {
         if (tmThis.tm_year != tmToMatch.tm_year ||
           tmThis.tm_month != tmToMatch.tm_month ||
           tmThis.tm_mday != tmToMatch.tm_mday)
-          result = PR_TRUE;
+          result = true;
       }
     }
     break;
   default:
-    NS_ASSERTION(PR_FALSE, "invalid compare op for dates");
+    NS_ASSERTION(false, "invalid compare op for dates");
   }
   *pResult = result;
   return err;
 }
 
 
 nsresult nsMsgSearchTerm::MatchAge (PRTime msgDate, bool *pResult)
 {
@@ -1333,36 +1333,36 @@ nsresult nsMsgSearchTerm::MatchAge (PRTi
   // So now cutOffDay is the PRTime cut-off point.
   // Any msg with a time less than that will be past the age.
 
   switch (m_operator)
   {
     case nsMsgSearchOp::IsGreaterThan: // is older than, or more in the future
       if ((!cutOffDayInTheFuture && LL_CMP(msgDate, <, cutOffDay)) ||
           (cutOffDayInTheFuture && LL_CMP(msgDate, >, cutOffDay)))
-        result = PR_TRUE;
+        result = true;
       break;
     case nsMsgSearchOp::IsLessThan: // is younger than, or less in the future
       if ((!cutOffDayInTheFuture && LL_CMP(msgDate, >, cutOffDay)) ||
           (cutOffDayInTheFuture && LL_CMP(msgDate, <, cutOffDay)))
-        result = PR_TRUE;
+        result = true;
       break;
     case nsMsgSearchOp::Is:
       PRExplodedTime msgDateExploded;
       PRExplodedTime cutOffDayExploded;
       if (NS_SUCCEEDED(GetLocalTimes(msgDate, cutOffDay, msgDateExploded, cutOffDayExploded)))
       {
         if ((msgDateExploded.tm_mday == cutOffDayExploded.tm_mday) &&
             (msgDateExploded.tm_month == cutOffDayExploded.tm_month) &&
             (msgDateExploded.tm_year == cutOffDayExploded.tm_year))
-          result = PR_TRUE;
+          result = true;
       }
       break;
     default:
-      NS_ASSERTION(PR_FALSE, "invalid compare op for msg age");
+      NS_ASSERTION(false, "invalid compare op for msg age");
   }
   *pResult = result;
   return err;
 }
 
 
 nsresult nsMsgSearchTerm::MatchSize (PRUint32 sizeToMatch, bool *pResult)
 {
@@ -1378,25 +1378,25 @@ nsresult nsMsgSearchTerm::MatchSize (PRU
     sizeToMatchKB = 1024;
 
   sizeToMatchKB /= 1024;
 
   switch (m_operator)
   {
   case nsMsgSearchOp::IsGreaterThan:
     if (sizeToMatchKB > m_value.u.size)
-      result = PR_TRUE;
+      result = true;
     break;
   case nsMsgSearchOp::IsLessThan:
     if (sizeToMatchKB < m_value.u.size)
-      result = PR_TRUE;
+      result = true;
     break;
   case nsMsgSearchOp::Is:
     if (sizeToMatchKB == m_value.u.size)
-      result = PR_TRUE;
+      result = true;
     break;
   default:
     break;
   }
   *pResult = result;
   return NS_OK;
 }
 
@@ -1436,17 +1436,17 @@ nsresult nsMsgSearchTerm::MatchJunkStatu
   {
     case nsMsgSearchOp::Is:
       break;
     case nsMsgSearchOp::Isnt:
       matches = !matches;
       break;
     default:
       rv = NS_ERROR_FAILURE;
-      NS_ASSERTION(PR_FALSE, "invalid compare op for junk status");
+      NS_ASSERTION(false, "invalid compare op for junk status");
   }
 
   *pResult = matches;
   return rv;
 }
 
 nsresult nsMsgSearchTerm::MatchJunkScoreOrigin(const char *aJunkScoreOrigin, bool *pResult)
 {
@@ -1459,40 +1459,40 @@ nsresult nsMsgSearchTerm::MatchJunkScore
   case nsMsgSearchOp::Is:
     matches = aJunkScoreOrigin && !strcmp(aJunkScoreOrigin, m_value.string);
     break;
   case nsMsgSearchOp::Isnt:
     matches = !aJunkScoreOrigin || strcmp(aJunkScoreOrigin, m_value.string);
     break;
   default:
     rv = NS_ERROR_FAILURE;
-    NS_ASSERTION(PR_FALSE, "invalid compare op for junk score origin");
+    NS_ASSERTION(false, "invalid compare op for junk score origin");
   }
 
   *pResult = matches;
   return rv;
 }
 
 nsresult nsMsgSearchTerm::MatchJunkPercent(PRUint32 aJunkPercent, bool *pResult)
 {
   NS_ENSURE_ARG_POINTER(pResult);
   bool result = false;
   switch (m_operator)
   {
   case nsMsgSearchOp::IsGreaterThan:
     if (aJunkPercent > m_value.u.junkPercent)
-      result = PR_TRUE;
+      result = true;
     break;
   case nsMsgSearchOp::IsLessThan:
     if (aJunkPercent < m_value.u.junkPercent)
-      result = PR_TRUE;
+      result = true;
     break;
   case nsMsgSearchOp::Is:
     if (aJunkPercent == m_value.u.junkPercent)
-      result = PR_TRUE;
+      result = true;
     break;
   default:
     break;
   }
   *pResult = result;
   return NS_OK;
 }
   
@@ -1500,21 +1500,21 @@ nsresult nsMsgSearchTerm::MatchJunkPerce
 nsresult nsMsgSearchTerm::MatchLabel(nsMsgLabelValue aLabelValue, bool *pResult)
 {
   NS_ENSURE_ARG_POINTER(pResult);
   bool result = false;
   switch (m_operator)
   {
   case nsMsgSearchOp::Is:
     if (m_value.u.label == aLabelValue)
-      result = PR_TRUE;
+      result = true;
     break;
   default:
     if (m_value.u.label != aLabelValue)
-      result = PR_TRUE;
+      result = true;
     break;
   }
 
   *pResult = result;
   return NS_OK;
 }
 
 nsresult nsMsgSearchTerm::MatchStatus(PRUint32 statusToMatch, bool *pResult)
@@ -1607,41 +1607,41 @@ nsresult nsMsgSearchTerm::MatchKeyword(c
     rv = tagService->IsValidKey(keywordArray[i], &isValid);
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (isValid)
     {
       // IsEmpty fails on any valid token
       if (m_operator == nsMsgSearchOp::IsEmpty)
       {
-        *pResult = PR_FALSE;
+        *pResult = false;
         return rv;
       }
 
       // IsntEmpty succeeds on any valid token
       if (m_operator == nsMsgSearchOp::IsntEmpty)
       {
-        *pResult = PR_TRUE;
+        *pResult = true;
         return rv;
       }
 
       // Does this valid tag key match our search term?
       matches = keywordArray[i].Equals(m_value.string);
 
       // Is or Isn't partly determined on a single unmatched token
       if (!matches)
       {
         if (m_operator == nsMsgSearchOp::Is)
         {
-          *pResult = PR_FALSE;
+          *pResult = false;
           return rv;
         }
         if (m_operator == nsMsgSearchOp::Isnt)
         {
-          *pResult = PR_TRUE;
+          *pResult = true;
           return rv;
         }
       }
     }
   }
 
   if (m_operator == nsMsgSearchOp::Is)
   {
@@ -1652,23 +1652,23 @@ nsresult nsMsgSearchTerm::MatchKeyword(c
   if (m_operator == nsMsgSearchOp::Isnt)
   {
     *pResult = !matches;
     return NS_OK;
   }
 
   if (m_operator == nsMsgSearchOp::IsEmpty)
   {
-    *pResult = PR_TRUE;
+    *pResult = true;
     return NS_OK;
   }
 
   if (m_operator == nsMsgSearchOp::IsntEmpty)
   {
-    *pResult = PR_FALSE;
+    *pResult = false;
     return NS_OK;
   }
 
 
   // no valid match operator found
   NS_ERROR("invalid compare op for msg status");
   return NS_ERROR_FAILURE;
 }
@@ -1686,30 +1686,30 @@ nsMsgSearchTerm::MatchPriority (nsMsgPri
   // integer compare operators
   int p1 = (priorityToMatch == nsMsgPriority::none) ? (int) nsMsgPriority::normal : (int) priorityToMatch;
   int p2 = (int) m_value.u.priority;
 
   switch (m_operator)
   {
   case nsMsgSearchOp::IsHigherThan:
     if (p1 > p2)
-      result = PR_TRUE;
+      result = true;
     break;
   case nsMsgSearchOp::IsLowerThan:
     if (p1 < p2)
-      result = PR_TRUE;
+      result = true;
     break;
   case nsMsgSearchOp::Is:
     if (p1 == p2)
-      result = PR_TRUE;
+      result = true;
     break;
   default:
-    result = PR_FALSE;
+    result = false;
     err = NS_ERROR_FAILURE;
-    NS_ASSERTION(PR_FALSE, "invalid match operator");
+    NS_ASSERTION(false, "invalid match operator");
   }
   *pResult = result;
   return err;
 }
 
 // match a custom search term
 NS_IMETHODIMP nsMsgSearchTerm::MatchCustom(nsIMsgDBHdr* aHdr, bool *pResult)
 {
@@ -1721,17 +1721,17 @@ NS_IMETHODIMP nsMsgSearchTerm::MatchCust
 
   nsCOMPtr<nsIMsgSearchCustomTerm> customTerm;
   rv = filterService->GetCustomTerm(m_customId, getter_AddRefs(customTerm));
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (customTerm)
     return customTerm->Match(aHdr, nsDependentCString(m_value.string),
                              m_operator, pResult);
-  *pResult = PR_FALSE;     // default to no match if term is missing
+  *pResult = false;     // default to no match if term is missing
   return NS_ERROR_FAILURE; // missing custom term
 }
 
 // set the id of a custom search term
 NS_IMETHODIMP nsMsgSearchTerm::SetCustomId(const nsACString &aId)
 {
   m_customId = aId;
   return NS_OK;
@@ -1852,23 +1852,23 @@ void nsMsgSearchTerm::ToLowerCaseExceptS
 // nsMsgSearchScopeTerm implementation
 //-----------------------------------------------------------------------------
 nsMsgSearchScopeTerm::nsMsgSearchScopeTerm (nsIMsgSearchSession *session,
                                             nsMsgSearchScopeValue attribute,
                                             nsIMsgFolder *folder)
 {
   m_attribute = attribute;
   m_folder = folder;
-  m_searchServer = PR_TRUE;
+  m_searchServer = true;
   m_searchSession = do_GetWeakReference(session);
 }
 
 nsMsgSearchScopeTerm::nsMsgSearchScopeTerm ()
 {
-  m_searchServer = PR_TRUE;
+  m_searchServer = true;
 }
 
 nsMsgSearchScopeTerm::~nsMsgSearchScopeTerm ()
 {
   if (m_inputStream)
     m_inputStream->Close();
   m_inputStream = nsnull;
 }
@@ -1933,35 +1933,35 @@ nsresult nsMsgSearchScopeTerm::Initializ
     case nsMsgSearchScope::onlineMail:
         m_adapter = new nsMsgSearchOnlineMail (this, termList);
       break;
     case nsMsgSearchScope::offlineMail:
     case nsMsgSearchScope::onlineManual:
         m_adapter = new nsMsgSearchOfflineMail (this, termList);
       break;
     case nsMsgSearchScope::newsEx:
-      NS_ASSERTION(PR_FALSE, "not supporting newsEx yet");
+      NS_ASSERTION(false, "not supporting newsEx yet");
       break;
     case nsMsgSearchScope::news:
           m_adapter = new nsMsgSearchNews (this, termList);
         break;
     case nsMsgSearchScope::allSearchableGroups:
-      NS_ASSERTION(PR_FALSE, "not supporting allSearchableGroups yet");
+      NS_ASSERTION(false, "not supporting allSearchableGroups yet");
       break;
     case nsMsgSearchScope::LDAP:
-      NS_ASSERTION(PR_FALSE, "not supporting LDAP yet");
+      NS_ASSERTION(false, "not supporting LDAP yet");
       break;
     case nsMsgSearchScope::localNews:
     case nsMsgSearchScope::localNewsJunk:
     case nsMsgSearchScope::localNewsBody:
     case nsMsgSearchScope::localNewsJunkBody:
       m_adapter = new nsMsgSearchOfflineNews (this, termList);
       break;
     default:
-      NS_ASSERTION(PR_FALSE, "invalid scope");
+      NS_ASSERTION(false, "invalid scope");
       err = NS_ERROR_FAILURE;
   }
 
   if (m_adapter)
     err = m_adapter->ValidateTerms ();
 
   return err;
 }
--- a/mailnews/base/src/nsMailDirProvider.cpp
+++ b/mailnews/base/src/nsMailDirProvider.cpp
@@ -83,17 +83,17 @@ nsMailDirProvider::GetFile(const char *a
 
   if (!strcmp(aKey, NS_APP_MAIL_50_DIR))
     leafName = MAIL_DIR_50_NAME;
   else if (!strcmp(aKey, NS_APP_IMAP_MAIL_50_DIR))
     leafName = IMAP_MAIL_DIR_50_NAME;
   else if (!strcmp(aKey, NS_APP_NEWS_50_DIR))
     leafName = NEWS_DIR_50_NAME;
   else if (!strcmp(aKey, NS_APP_MESSENGER_FOLDER_CACHE_50_FILE)) {
-    isDirectory = PR_FALSE;
+    isDirectory = false;
     leafName = MSG_FOLDER_CACHE_DIR_50_NAME;
   }
   else
     return NS_ERROR_FAILURE;
 
   nsCOMPtr<nsIFile> parentDir;
   nsresult rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR,
                                        getter_AddRefs(parentDir));
@@ -109,17 +109,17 @@ nsMailDirProvider::GetFile(const char *a
   rv = file->AppendNative(leafStr);
   if (NS_FAILED(rv))
     return rv;
 
   bool exists;
   if (isDirectory && NS_SUCCEEDED(file->Exists(&exists)) && !exists)
     rv = EnsureDirectory(file);
 
-  *aPersist = PR_TRUE;
+  *aPersist = true;
   file.swap(*aResult);
 
   return rv;
 }
 
 NS_IMETHODIMP
 nsMailDirProvider::GetFiles(const char *aKey,
                             nsISimpleEnumerator **aResult)
@@ -162,17 +162,17 @@ nsMailDirProvider::GetFiles(const char *
 }
 
 NS_IMPL_ISUPPORTS1(nsMailDirProvider::AppendingEnumerator,
                    nsISimpleEnumerator)
 
 NS_IMETHODIMP
 nsMailDirProvider::AppendingEnumerator::HasMoreElements(bool *aResult)
 {
-  *aResult = mNext || mNextWithLocale ? PR_TRUE : PR_FALSE;
+  *aResult = mNext || mNextWithLocale ? true : false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMailDirProvider::AppendingEnumerator::GetNext(nsISupports* *aResult)
 {
   // Set the return value to the next directory we want to enumerate over
   if (aResult)
--- a/mailnews/base/src/nsMessenger.cpp
+++ b/mailnews/base/src/nsMessenger.cpp
@@ -176,17 +176,17 @@ ConvertBufToPlainText(nsString &aConBuf)
     nsCOMPtr<nsIHTMLToTextSink> textSink(do_QueryInterface(sink));
     NS_ENSURE_TRUE(textSink, NS_ERROR_FAILURE);
 
     nsAutoString convertedText;
     textSink->Initialize(&convertedText, 0, 72);
 
     parser->SetContentSink(sink);
 
-    parser->Parse(aConBuf, 0, NS_LITERAL_CSTRING("text/html"), PR_TRUE);
+    parser->Parse(aConBuf, 0, NS_LITERAL_CSTRING("text/html"), true);
 
     //
     // Now if we get here, we need to get from ASCII text to
     // UTF-8 format or there is a problem downstream...
     //
     if (NS_SUCCEEDED(rv))
     {
       aConBuf = convertedText;
@@ -334,17 +334,17 @@ NS_IMETHODIMP nsMessenger::SetWindow(nsI
     nsCOMPtr<nsIDocShellTreeItem> rootDocShellAsItem;
     docShellAsItem->GetSameTypeRootTreeItem(getter_AddRefs(rootDocShellAsItem));
 
     nsCOMPtr<nsIDocShellTreeNode> rootDocShellAsNode(do_QueryInterface(rootDocShellAsItem));
     if (rootDocShellAsNode)
     {
       nsCOMPtr<nsIDocShellTreeItem> childAsItem;
       rv = rootDocShellAsNode->FindChildWithName(NS_LITERAL_STRING("messagepane").get(),
-                                                 PR_TRUE, PR_FALSE, nsnull, nsnull, getter_AddRefs(childAsItem));
+                                                 true, false, nsnull, nsnull, getter_AddRefs(childAsItem));
 
       mDocShell = do_QueryInterface(childAsItem);
       if (NS_SUCCEEDED(rv) && mDocShell) {
         mCurrentDisplayCharset = ""; // Important! Clear out mCurrentDisplayCharset so we reset a default charset on mDocshell the next time we try to load something into it.
 
         if (aMsgWindow)
           aMsgWindow->GetTransactionManager(getter_AddRefs(mTxnMgr));
       }
@@ -581,18 +581,18 @@ nsMessenger::LoadURL(nsIDOMWindow *aWin,
     nsCOMPtr <nsIFileURL> fileUrl = do_QueryInterface(fileUri, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     nsCOMPtr <nsIFile> file;
     rv = fileUrl->GetFile(getter_AddRefs(file));
     NS_ENSURE_SUCCESS(rv, rv);
     file->GetFileSize(&fileSize);
     uriString.Replace(0, 5, NS_LITERAL_STRING("mailbox:"));
     uriString.Append(NS_LITERAL_STRING("&number=0"));
-    loadingFromFile = PR_TRUE;
-    getDummyMsgHdr = PR_TRUE;
+    loadingFromFile = true;
+    getDummyMsgHdr = true;
   }
   else if (StringBeginsWith(uriString, NS_LITERAL_STRING("mailbox:")) &&
            (CaseInsensitiveFindInReadable(NS_LITERAL_STRING(".eml?"), uriString)))
   {
     // if we have a mailbox:// url that points to an .eml file, we have to read
     // the file size as well
     uriString.Replace(0, 8, NS_LITERAL_STRING("file:"));
     nsCOMPtr<nsIURI> fileUri;
@@ -600,21 +600,21 @@ nsMessenger::LoadURL(nsIDOMWindow *aWin,
     NS_ENSURE_SUCCESS(rv, rv);
     nsCOMPtr <nsIFileURL> fileUrl = do_QueryInterface(fileUri, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     nsCOMPtr <nsIFile> file;
     rv = fileUrl->GetFile(getter_AddRefs(file));
     NS_ENSURE_SUCCESS(rv, rv);
     file->GetFileSize(&fileSize);
     uriString.Replace(0, 5, NS_LITERAL_STRING("mailbox:"));
-    loadingFromFile = PR_TRUE;
-    getDummyMsgHdr = PR_TRUE;
+    loadingFromFile = true;
+    getDummyMsgHdr = true;
   }
   else if (uriString.Find("type=application/x-message-display") >= 0)
-    getDummyMsgHdr = PR_TRUE;
+    getDummyMsgHdr = true;
 
   nsCOMPtr<nsIURI> uri;
   rv = NS_NewURI(getter_AddRefs(uri), uriString);
   NS_ENSURE_SUCCESS(rv, rv);
 
   NS_ENSURE_TRUE(mDocShell, NS_ERROR_FAILURE);
   nsCOMPtr<nsIMsgMailNewsUrl> msgurl = do_QueryInterface(uri);
   if (msgurl)
@@ -645,17 +645,17 @@ nsMessenger::LoadURL(nsIDOMWindow *aWin,
   }
 
   nsCOMPtr<nsIDocShellLoadInfo> loadInfo;
   rv = mDocShell->CreateLoadInfo(getter_AddRefs(loadInfo));
   NS_ENSURE_SUCCESS(rv, rv);
   loadInfo->SetLoadType(nsIDocShellLoadInfo::loadNormal);
   AddMsgUrlToNavigateHistory(aURL);
   mNavigatingToUri.Truncate();
-  return mDocShell->LoadURI(uri, loadInfo, 0, PR_TRUE);
+  return mDocShell->LoadURI(uri, loadInfo, 0, true);
 }
 
 NS_IMETHODIMP nsMessenger::SaveAttachmentToFile(nsIFile *aFile,
                                                 const nsACString &aURL,
                                                 const nsACString &aMessageUri,
                                                 const nsACString &aContentType,
                                                 nsIUrlListener *aListener)
 {
@@ -698,20 +698,20 @@ nsMessenger::DetachAttachmentsWOPrompts(
   NS_ENSURE_SUCCESS(rv, rv);
 
   saveState = new nsSaveAllAttachmentsState(aCount,
                                             aContentTypeArray,
                                             aUrlArray,
                                             aDisplayNameArray,
                                             aMessageUriArray,
                                             path.get(),
-                                            PR_TRUE);
+                                            true);
 
   // This method is used in filters, where we don't want to warn
-  saveState->m_withoutWarning = PR_TRUE;
+  saveState->m_withoutWarning = true;
   rv = SaveAttachment(attachmentDestination,
                       nsDependentCString(aUrlArray[0]),
                       nsDependentCString(aMessageUriArray[0]),
                       nsDependentCString(aContentTypeArray[0]),
                       (void *)saveState,
                       aListener);
   return rv;
 }
@@ -872,17 +872,17 @@ nsMessenger::SaveAttachment(const nsACSt
   // open external attachments inside our message pane which in turn should trigger the
   // helper app dialog...
   if (aIsExternalAttachment)
     return OpenURL(aURL);
   return SaveOneAttachment(PromiseFlatCString(aContentType).get(),
                            PromiseFlatCString(aURL).get(),
                            PromiseFlatCString(aDisplayName).get(),
                            PromiseFlatCString(aMessageUri).get(),
-                           PR_FALSE);
+                           false);
 }
 
 nsresult
 nsMessenger::SaveOneAttachment(const char * aContentType, const char * aURL,
                                const char * aDisplayName, const char * aMessageUri,
                                bool detaching)
 {
   nsresult rv = NS_ERROR_OUT_OF_MEMORY;
@@ -939,17 +939,17 @@ NS_IMETHODIMP
 nsMessenger::SaveAllAttachments(PRUint32 count,
                                 const char **contentTypeArray,
                                 const char **urlArray,
                                 const char **displayNameArray,
                                 const char **messageUriArray)
 {
   if (!count)
     return NS_ERROR_INVALID_ARG;
-  return SaveAllAttachments(count, contentTypeArray, urlArray, displayNameArray, messageUriArray, PR_FALSE);
+  return SaveAllAttachments(count, contentTypeArray, urlArray, displayNameArray, messageUriArray, false);
 }
 
 nsresult
 nsMessenger::SaveAllAttachments(PRUint32 count,
                                 const char **contentTypeArray,
                                 const char **urlArray,
                                 const char **displayNameArray,
                                 const char **messageUriArray,
@@ -1072,41 +1072,41 @@ nsMessenger::SaveAs(const nsACString& aU
       goto done;
     }
     rv = saveListener->QueryInterface(NS_GET_IID(nsIUrlListener), getter_AddRefs(urlListener));
     if (NS_FAILED(rv))
       goto done;
 
     if (saveAsFileType == EML_FILE_TYPE)
     {
-      rv = messageService->SaveMessageToDisk(PromiseFlatCString(aURI).get(), saveAsFile, PR_FALSE,
+      rv = messageService->SaveMessageToDisk(PromiseFlatCString(aURI).get(), saveAsFile, false,
         urlListener, nsnull,
-        PR_TRUE, mMsgWindow);
+        true, mMsgWindow);
     }
     else
     {
       nsCAutoString urlString(aURI);
 
       // we can't go RFC822 to TXT until bug #1775 is fixed
       // so until then, do the HTML to TXT conversion in
       // nsSaveMsgListener::OnStopRequest(), see ConvertBufToPlainText()
       //
       // Setup the URL for a "Save As..." Operation...
       // For now, if this is a save as TEXT operation, then do
       // a "printing" operation
       if (saveAsFileType == TEXT_FILE_TYPE)
       {
         saveListener->m_outputFormat = nsSaveMsgListener::ePlainText;
-        saveListener->m_doCharsetConversion = PR_TRUE;
+        saveListener->m_doCharsetConversion = true;
         urlString.AppendLiteral("?header=print");
       }
       else
       {
         saveListener->m_outputFormat = nsSaveMsgListener::eHTML;
-        saveListener->m_doCharsetConversion = PR_FALSE;
+        saveListener->m_doCharsetConversion = false;
         urlString.AppendLiteral("?header=saveas");
       }
 
       rv = CreateStartupUrl(urlString.get(), getter_AddRefs(url));
       NS_ASSERTION(NS_SUCCEEDED(rv), "CreateStartupUrl failed");
       if (NS_FAILED(rv))
         goto done;
 
@@ -1286,17 +1286,17 @@ nsMessenger::GetSaveAsFile(const nsAStri
 
   if (dialogResult == nsIFilePicker::returnReplace)
   {
     // be extra safe and only delete when the file is really a file
     bool isFile;
     rv = localFile->IsFile(&isFile);
     if (NS_SUCCEEDED(rv) && isFile)
     {
-      rv = localFile->Remove(PR_FALSE /* recursive delete */);
+      rv = localFile->Remove(false /* recursive delete */);
       NS_ENSURE_SUCCESS(rv, rv);
     }
     else
     {
       // We failed, or this isn't a file. We can't do anything about it.
       return NS_ERROR_FAILURE;
     }
   }
@@ -1405,19 +1405,19 @@ nsMessenger::SaveMessages(PRUint32 aCoun
     if (NS_FAILED(rv)) {
       NS_IF_RELEASE(saveListener);
       Alert("saveMessageFailed");
       return rv;
     }
 
     // Ok, now save the message.
     rv = messageService->SaveMessageToDisk(aMessageUriArray[i],
-                                           saveToFile, PR_FALSE,
+                                           saveToFile, false,
                                            urlListener, nsnull,
-                                           PR_TRUE, mMsgWindow);
+                                           true, mMsgWindow);
   }
   return rv;
 }
 
 nsresult
 nsMessenger::Alert(const char *stringName)
 {
   nsresult rv = NS_OK;
@@ -1489,21 +1489,21 @@ NS_IMETHODIMP nsMessenger::GetUndoTransa
   return rv;
 }
 
 NS_IMETHODIMP nsMessenger::CanUndo(bool *bValue)
 {
   NS_ENSURE_TRUE(bValue && mTxnMgr, NS_ERROR_NULL_POINTER);
 
   nsresult rv;
-  *bValue = PR_FALSE;
+  *bValue = false;
   PRInt32 count = 0;
   rv = mTxnMgr->GetNumberOfUndoItems(&count);
   if (NS_SUCCEEDED(rv) && count > 0)
-    *bValue = PR_TRUE;
+    *bValue = true;
   return rv;
 }
 
 NS_IMETHODIMP nsMessenger::GetRedoTransactionType(PRUint32 *txnType)
 {
   NS_ENSURE_TRUE(txnType && mTxnMgr, NS_ERROR_NULL_POINTER);
 
   nsresult rv;
@@ -1519,21 +1519,21 @@ NS_IMETHODIMP nsMessenger::GetRedoTransa
   return rv;
 }
 
 NS_IMETHODIMP nsMessenger::CanRedo(bool *bValue)
 {
   NS_ENSURE_TRUE(bValue && mTxnMgr, NS_ERROR_NULL_POINTER);
 
   nsresult rv;
-  *bValue = PR_FALSE;
+  *bValue = false;
   PRInt32 count = 0;
   rv = mTxnMgr->GetNumberOfRedoItems(&count);
   if (NS_SUCCEEDED(rv) && count > 0)
-    *bValue = PR_TRUE;
+    *bValue = true;
   return rv;
 }
 
 NS_IMETHODIMP
 nsMessenger::Undo(nsIMsgWindow *msgWindow)
 {
   nsresult rv = NS_OK;
   if (mTxnMgr)
@@ -1615,27 +1615,27 @@ nsMessenger::GetLastDisplayedMessageUri(
   return NS_OK;
 }
 
 nsSaveMsgListener::nsSaveMsgListener(nsIFile* aFile, nsMessenger *aMessenger, nsIUrlListener *aListener)
 {
   m_file = do_QueryInterface(aFile);
   m_messenger = aMessenger;
   mListener = aListener;
-  mUrlHasStopped = PR_FALSE;
-  mRequestHasStopped = PR_FALSE;
+  mUrlHasStopped = false;
+  mRequestHasStopped = false;
   
     // rhp: for charset handling
-  m_doCharsetConversion = PR_FALSE;
+  m_doCharsetConversion = false;
   m_saveAllAttachmentsState = nsnull;
   mProgress = 0;
   mMaxProgress = -1;
-  mCanceled = PR_FALSE;
+  mCanceled = false;
   m_outputFormat = eUnknown;
-  mInitialized = PR_FALSE;
+  mInitialized = false;
   m_dataBuffer = new char[FOUR_K];
 }
 
 nsSaveMsgListener::~nsSaveMsgListener()
 {
 }
 
 //
@@ -1646,17 +1646,17 @@ NS_IMPL_ISUPPORTS5(nsSaveMsgListener,
                    nsIMsgCopyServiceListener,
                    nsIStreamListener,
                    nsIRequestObserver,
                    nsICancelable)
 
 NS_IMETHODIMP
 nsSaveMsgListener::Cancel(nsresult status)
 {
-  mCanceled = PR_TRUE;
+  mCanceled = true;
   return NS_OK;
 }
 
 //
 // nsIUrlListener
 //
 NS_IMETHODIMP
 nsSaveMsgListener::OnStartRunningUrl(nsIURI* url)
@@ -1665,17 +1665,17 @@ nsSaveMsgListener::OnStartRunningUrl(nsI
     mListener->OnStartRunningUrl(url);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsSaveMsgListener::OnStopRunningUrl(nsIURI *url, nsresult exitCode)
 {
   nsresult rv = exitCode;
-  mUrlHasStopped = PR_TRUE;
+  mUrlHasStopped = true;
 
   // ** save as template goes here
   if (!m_templateUri.IsEmpty()) 
   {
     nsCOMPtr<nsIRDFService> rdf(do_GetService(kRDFServiceCID, &rv));
     if (NS_FAILED(rv)) goto done;
     nsCOMPtr<nsIRDFResource> res;
     rv = rdf->GetResource(m_templateUri, getter_AddRefs(res));
@@ -1684,34 +1684,34 @@ nsSaveMsgListener::OnStopRunningUrl(nsIU
     templateFolder = do_QueryInterface(res, &rv);
     if (NS_FAILED(rv)) goto done;
     nsCOMPtr<nsIMsgCopyService> copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID);
     if (copyService)
     {
       nsCOMPtr<nsIFile> clone;
       m_file->Clone(getter_AddRefs(clone));
       rv = copyService->CopyFileMessage(clone, templateFolder, nsnull,
-                                        PR_TRUE, nsMsgMessageFlags::Read,
+                                        true, nsMsgMessageFlags::Read,
                                         EmptyCString(), this, nsnull);
       // Clear this so we don't end up in a loop if OnStopRunningUrl gets
       // called again.
       m_templateUri.Truncate();
     }
   }
   else if (m_outputStream && mRequestHasStopped)
   {
     m_outputStream->Close();
     m_outputStream = nsnull;
   }
 
 done:
   if (NS_FAILED(rv))
   {
     if (m_file)
-      m_file->Remove(PR_FALSE);
+      m_file->Remove(false);
     if (m_messenger)
         m_messenger->Alert("saveMessageFailed");
   }
   
   if (mRequestHasStopped && mListener)
     mListener->OnStopRunningUrl(url, exitCode);
   else
     mListenerUri = url;
@@ -1742,27 +1742,27 @@ nsSaveMsgListener::GetMessageId(nsACStri
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 nsSaveMsgListener::OnStopCopy(nsresult aStatus)
 {
   if (m_file)
-    m_file->Remove(PR_FALSE);
+    m_file->Remove(false);
   return aStatus;
 }
 
 // initializes the progress window if we are going to show one
 // and for OSX, sets creator flags on the output file
 nsresult nsSaveMsgListener::InitializeDownload(nsIRequest * aRequest, PRUint32 aBytesDownloaded)
 {
   nsresult rv = NS_OK;
   
-  mInitialized = PR_TRUE;
+  mInitialized = true;
   nsCOMPtr<nsIChannel> channel (do_QueryInterface(aRequest));
   
   if (!channel)
     return rv;
   
   // Get the max progress from the URL if we haven't already got it.
   if (mMaxProgress == -1)
   {
@@ -1835,29 +1835,29 @@ nsresult nsSaveMsgListener::InitializeDo
 
 NS_IMETHODIMP
 nsSaveMsgListener::OnStartRequest(nsIRequest* request, nsISupports* aSupport)
 {
   if (m_file)
     MsgNewBufferedFileOutputStream(getter_AddRefs(m_outputStream), m_file, -1, ATTACHMENT_PERMISSION);
   if (!m_outputStream)
   {
-    mCanceled = PR_TRUE;
+    mCanceled = true;
     if (m_messenger)
       m_messenger->Alert("saveAttachmentFailed");
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsSaveMsgListener::OnStopRequest(nsIRequest* request, nsISupports* aSupport,
                                  nsresult status)
 {
   nsresult rv = NS_OK;
-  mRequestHasStopped = PR_TRUE;
+  mRequestHasStopped = true;
   
   // rhp: If we are doing the charset conversion magic, this is different
   // processing, otherwise, its just business as usual.
   //
   if ( (m_doCharsetConversion) && (m_outputStream) )
   {
     char        *conBuf = nsnull;
     PRUint32    conLength = 0;
@@ -2058,17 +2058,17 @@ nsMessenger::GetString(const nsString& a
 
 nsSaveAllAttachmentsState::nsSaveAllAttachmentsState(PRUint32 count,
                                                      const char **contentTypeArray,
                                                      const char **urlArray,
                                                      const char **nameArray,
                                                      const char **uriArray,
                                                      const char *dirName,
                                                      bool detachingAttachments)
-    : m_withoutWarning(PR_FALSE)
+    : m_withoutWarning(false)
 {
     PRUint32 i;
     NS_ASSERTION(count && urlArray && nameArray && uriArray && dirName,
                  "fatal - invalid parameters\n");
 
     m_count = count;
     m_curIndex = 0;
     m_contentTypeArray = new char*[count];
@@ -2359,17 +2359,17 @@ static int CompareAttachmentPartId(const
       return 0;
 
     NS_ABORT_IF_FALSE(*partIdLeft == '.', "Invalid character in part id string");
     NS_ABORT_IF_FALSE(*partIdRight == '.', "Invalid character in part id string");
 
     ++partIdLeft;
     ++partIdRight;
   }
-  while (PR_TRUE);
+  while (true);
   return 0;
 }
 
 // ------------------------------------
 
 // struct on purpose -> show that we don't ever want a vtable
 struct msgAttachment
 {
@@ -2642,17 +2642,17 @@ nsDelAttachListener::OnStopRequest(nsIRe
   m_state = eCopyingNewMsg;
   // clone file because nsIFile on Windows caches the wrong file size.
   nsCOMPtr <nsIFile> clone;
   mMsgFile->Clone(getter_AddRefs(clone));
   if (copyService)
   {
     nsCString originalKeys;
     mOriginalMessage->GetStringProperty("keywords", getter_Copies(originalKeys));
-    rv = copyService->CopyFileMessage(clone, mMessageFolder, mOriginalMessage, PR_FALSE,
+    rv = copyService->CopyFileMessage(clone, mMessageFolder, mOriginalMessage, false,
                                       mOrigMsgFlags, originalKeys, listenerCopyService, mMsgWindow);
   }
   return rv;
 }
 
 //
 // nsIStreamListener
 //
@@ -2680,31 +2680,31 @@ nsDelAttachListener::OnStartRunningUrl(n
 }
 
 nsresult nsDelAttachListener::DeleteOriginalMessage()
 {
   nsresult rv;
   nsCOMPtr<nsIMutableArray> messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = messageArray->AppendElement(mOriginalMessage, PR_FALSE);
+  rv = messageArray->AppendElement(mOriginalMessage, false);
   NS_ENSURE_SUCCESS(rv,rv);
   nsCOMPtr<nsIMsgCopyServiceListener> listenerCopyService;
 
   QueryInterface( NS_GET_IID(nsIMsgCopyServiceListener), getter_AddRefs(listenerCopyService) );
 
   mOriginalMessage = nsnull;
   m_state = eDeletingOldMessage;
   return mMessageFolder->DeleteMessages(
     messageArray,         // messages
     mMsgWindow,           // msgWindow
-    PR_TRUE,              // deleteStorage
-    PR_FALSE,              // isMove
+    true,              // deleteStorage
+    false,              // isMove
     listenerCopyService,  // listener
-    PR_FALSE);            // allowUndo
+    false);            // allowUndo
 }
 
 void nsDelAttachListener::SelectNewMessage()
 {
   nsCString displayUri;
   // all attachments refer to the same message
   const char * messageUri = mAttach->mAttachmentArray[0].mMessageUri;
   mMessenger->GetLastDisplayedMessageUri(displayUri);
@@ -2804,18 +2804,18 @@ nsDelAttachListener::OnStopCopy(nsresult
 
 //
 // local methods
 //
 
 nsDelAttachListener::nsDelAttachListener()
 {
   mAttach = nsnull;
-  mSaveFirst = PR_FALSE;
-  mWrittenExtra = PR_FALSE;
+  mSaveFirst = false;
+  mWrittenExtra = false;
   mNewMessageKey = PR_UINT32_MAX;
   m_state = eStarting;
 }
 
 nsDelAttachListener::~nsDelAttachListener()
 {
   if (mAttach)
   {
@@ -2823,17 +2823,17 @@ nsDelAttachListener::~nsDelAttachListene
   }
   if (mMsgFileStream)
   {
     mMsgFileStream->Close();
     mMsgFileStream = nsnull;
   }
   if (mMsgFile)
   {
-    mMsgFile->Remove(PR_FALSE);
+    mMsgFile->Remove(false);
   }
 }
 
 nsresult
 nsDelAttachListener::StartProcessing(nsMessenger * aMessenger, nsIMsgWindow * aMsgWindow,
                                      nsAttachmentState * aAttach, bool detaching)
 {
   aMessenger->QueryInterface(NS_GET_IID(nsIMessenger), getter_AddRefs(mMessenger));
@@ -2905,18 +2905,18 @@ nsDelAttachListener::StartProcessing(nsM
   // converter. The listener will just write the converted message straight to disk.
   nsCOMPtr<nsISupports> listenerSupports;
   rv = this->QueryInterface(NS_GET_IID(nsISupports), getter_AddRefs(listenerSupports));
   NS_ENSURE_SUCCESS(rv,rv);
   nsCOMPtr<nsIUrlListener> listenerUrlListener = do_QueryInterface(listenerSupports, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
 
   rv = mMessageService->StreamMessage(messageUri, listenerSupports, mMsgWindow,
-                                      listenerUrlListener, PR_TRUE, sHeader,
-                                      PR_FALSE, nsnull);
+                                      listenerUrlListener, true, sHeader,
+                                      false, nsnull);
   NS_ENSURE_SUCCESS(rv,rv);
 
   return NS_OK;
 }
 
 // ------------------------------------
 
 NS_IMETHODIMP
@@ -2925,17 +2925,17 @@ nsMessenger::DetachAttachment(const char
                               bool aSaveFirst, bool withoutWarning = false)
 {
   NS_ENSURE_ARG_POINTER(aContentType);
   NS_ENSURE_ARG_POINTER(aUrl);
   NS_ENSURE_ARG_POINTER(aDisplayName);
   NS_ENSURE_ARG_POINTER(aMessageUri);
 
   if (aSaveFirst)
-    return SaveOneAttachment(aContentType, aUrl, aDisplayName, aMessageUri, PR_TRUE);
+    return SaveOneAttachment(aContentType, aUrl, aDisplayName, aMessageUri, true);
   return DetachAttachments(1, &aContentType, &aUrl, &aDisplayName, &aMessageUri, nsnull, withoutWarning);
 }
 
 NS_IMETHODIMP
 nsMessenger::DetachAllAttachments(PRUint32 aCount,
                                   const char ** aContentTypeArray,
                                   const char ** aUrlArray,
                                   const char ** aDisplayNameArray,
@@ -2945,17 +2945,17 @@ nsMessenger::DetachAllAttachments(PRUint
 {
   NS_ENSURE_ARG_MIN(aCount, 1);
   NS_ENSURE_ARG_POINTER(aContentTypeArray);
   NS_ENSURE_ARG_POINTER(aUrlArray);
   NS_ENSURE_ARG_POINTER(aDisplayNameArray);
   NS_ENSURE_ARG_POINTER(aMessageUriArray);
 
   if (aSaveFirst)
-    return SaveAllAttachments(aCount, aContentTypeArray, aUrlArray, aDisplayNameArray, aMessageUriArray, PR_TRUE);
+    return SaveAllAttachments(aCount, aContentTypeArray, aUrlArray, aDisplayNameArray, aMessageUriArray, true);
   else
     return DetachAttachments(aCount, aContentTypeArray, aUrlArray, aDisplayNameArray, aMessageUriArray, nsnull, withoutWarning);
 }
 
 nsresult
 nsMessenger::DetachAttachments(PRUint32 aCount,
                                const char ** aContentTypeArray,
                                const char ** aUrlArray,
--- a/mailnews/base/src/nsMessengerBootstrap.cpp
+++ b/mailnews/base/src/nsMessengerBootstrap.cpp
@@ -69,17 +69,17 @@ nsMessengerBootstrap::~nsMessengerBootst
 
 NS_IMETHODIMP nsMessengerBootstrap::OpenMessengerWindowWithUri(const char *windowType, const char * aFolderURI, nsMsgKey aMessageKey)
 {
   bool standAloneMsgWindow = false;
   nsCAutoString chromeUrl("chrome://messenger/content/");
   if (windowType && !strcmp(windowType, "mail:messageWindow"))
   {
     chromeUrl.Append("messageWindow.xul");
-    standAloneMsgWindow = PR_TRUE;
+    standAloneMsgWindow = true;
   }
   nsCOMPtr<nsISupportsArray> argsArray;
   nsresult rv = NS_NewISupportsArray(getter_AddRefs(argsArray));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // create scriptable versions of our strings that we can store in our nsISupportsArray....
   if (aFolderURI)
   {
--- a/mailnews/base/src/nsMessengerOSXIntegration.mm
+++ b/mailnews/base/src/nsMessengerOSXIntegration.mm
@@ -195,18 +195,18 @@ static void openMailWindow(const nsCStri
 
 nsMessengerOSXIntegration::nsMessengerOSXIntegration()
 {
   mBiffStateAtom = MsgGetAtom("BiffState");
   mNewMailReceivedAtom = MsgGetAtom("NewMailReceived");
   mTotalUnreadMessagesAtom = MsgGetAtom("TotalUnreadMessages");
   mUnreadTotal = 0;
   mNewTotal = 0;
-  mOnlyCountInboxes = PR_TRUE;
-  mDoneInitialCount = PR_FALSE;
+  mOnlyCountInboxes = true;
+  mDoneInitialCount = false;
 }
 
 nsMessengerOSXIntegration::~nsMessengerOSXIntegration()
 {
   RestoreDockIcon();
 }
 
 NS_IMPL_ADDREF(nsMessengerOSXIntegration)
@@ -223,18 +223,18 @@ NS_INTERFACE_MAP_END
 nsresult
 nsMessengerOSXIntegration::Init()
 {
   // need to register a named Growl notification
   nsresult rv;
   nsCOMPtr<nsIObserverService> observerService = do_GetService("@mozilla.org/observer-service;1", &rv);
   if (NS_SUCCEEDED(rv))
   {
-    observerService->AddObserver(this, "before-growl-registration", PR_FALSE);
-    observerService->AddObserver(this, "mail-startup-done", PR_FALSE);
+    observerService->AddObserver(this, "before-growl-registration", false);
+    observerService->AddObserver(this, "mail-startup-done", false);
   }
 
   nsCOMPtr<nsIMsgMailSession> mailSession = do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // because we care if the unread total count changes
   return mailSession->AddFolderListener(this, nsIFolderListener::boolPropertyChanged | nsIFolderListener::intPropertyChanged);
 }
@@ -289,17 +289,17 @@ nsMessengerOSXIntegration::Observe(nsISu
     if (NS_SUCCEEDED(rv))
     {
       nsCOMPtr<nsIStringBundle> bundle;
       GetStringBundle(getter_AddRefs(bundle));
       if (bundle)
       {
         nsString growlNotification;
         bundle->GetStringFromName(NS_LITERAL_STRING("growlNotification").get(), getter_Copies(growlNotification));
-        notifications->AddNotification(growlNotification, PR_TRUE);
+        notifications->AddNotification(growlNotification, true);
       }
     }
   }
   return NS_OK;
 }
 
 nsresult
 nsMessengerOSXIntegration::GetStringBundle(nsIStringBundle **aBundle)
@@ -420,17 +420,17 @@ nsMessengerOSXIntegration::ShowAlertMess
       if (bundle)
       {
         nsString growlNotification;
         bundle->GetStringFromName(NS_LITERAL_STRING("growlNotification").get(),
                                   getter_Copies(growlNotification));
         rv = alertsService->ShowAlertNotification(NS_LITERAL_STRING(kNewMailAlertIcon),
                                                   aAlertTitle,
                                                   aAlertText,
-                                                  PR_TRUE,
+                                                  true,
                                                   NS_ConvertASCIItoUTF16(aFolderURI),
                                                   this,
                                                   growlNotification);
       }
     }
 
     bool bounceDockIcon = false;
     prefBranch->GetBoolPref("mail.biff.animate_dock_icon", &bounceDockIcon);
@@ -465,23 +465,23 @@ nsMessengerOSXIntegration::OnItemIntProp
         server->GetPerformingBiff(&performingBiff);
       if (!performingBiff)
         return NS_OK; // kick out right now...
 
       // Biff happens for the root folder, but we want info for the child with new mail
       nsCString folderUri;
       GetFirstFolderWithNewMail(aFolder, folderUri);
       nsCOMPtr<nsIMsgFolder> childFolder;
-      nsresult rv = aFolder->GetChildWithURI(folderUri, PR_TRUE, PR_TRUE,
+      nsresult rv = aFolder->GetChildWithURI(folderUri, true, true,
                                              getter_AddRefs(childFolder));
       if (NS_FAILED(rv) || !childFolder)
         return NS_ERROR_FAILURE;
 
       PRInt32 numNewMessages = 0;
-      childFolder->GetNumNewMessages(PR_TRUE, &numNewMessages);
+      childFolder->GetNumNewMessages(true, &numNewMessages);
       FillToolTipInfo(childFolder, numNewMessages);
 
       mNewTotal += numNewMessages;
       BadgeDockIcon();
     }
     else if (aNewValue == nsIMsgFolder::nsMsgBiffState_NoMail)
     {
       // reset new message total
@@ -732,26 +732,26 @@ nsMessengerOSXIntegration::GetNewMailAut
                                                 name);
           if (NS_FAILED(rv))
             continue;
 
           // Give extensions a chance to suppress notifications for this author
           nsCOMPtr<nsISupportsPRBool> notify =
             do_CreateInstance(NS_SUPPORTS_PRBOOL_CONTRACTID);
 
-          notify->SetData(PR_TRUE);
+          notify->SetData(true);
           os->NotifyObservers(notify, "newmail-notification-requested",
                               PromiseFlatString(author).get());
 
           bool includeSender;
           notify->GetData(&includeSender);
 
           // Don't add unwanted or duplicate names
           if (includeSender &&
-              aAuthors.Find(name.get(), PR_TRUE) == -1)
+              aAuthors.Find(name.get(), true) == -1)
           {
             if (displayed > 0)
               aAuthors.Append(listSeparator);
             aAuthors.Append(NS_ConvertUTF8toUTF16(name));
             displayed++;
           }
         }
       }
@@ -786,17 +786,17 @@ nsMessengerOSXIntegration::GetFirstFolde
       {
         rv = enumerator->CurrentItem(getter_AddRefs(supports));
         if (supports)
         {
           msgFolder = do_QueryInterface(supports, &rv);
           if (msgFolder)
           {
             numNewMessages = 0;
-            msgFolder->GetNumNewMessages(PR_FALSE, &numNewMessages);
+            msgFolder->GetNumNewMessages(false, &numNewMessages);
             if (numNewMessages)
               break; // kick out of the while loop
             more = enumerator->Next();
           }
         } // if we have a folder
       }  // if we have more potential folders to enumerate
     }  // if enumerator
 
@@ -808,17 +808,17 @@ nsMessengerOSXIntegration::GetFirstFolde
 }
 
 void
 nsMessengerOSXIntegration::InitUnreadCount()
 {
   // If we were forced to do a count early with an update, don't do it again on mail startup.
   if (mDoneInitialCount)
     return;
-  mDoneInitialCount = PR_TRUE;
+  mDoneInitialCount = true;
   if (!MsgDockCountsLogModule)
     MsgDockCountsLogModule = PR_NewLogModule("DockCounts");
   // We either count just inboxes, or all folders
   nsresult rv;
   nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
   NS_ENSURE_SUCCESS(rv, );
 
   rv = prefBranch->GetBoolPref(kCountInboxesPref, &mOnlyCountInboxes);
@@ -853,26 +853,26 @@ nsMessengerOSXIntegration::InitUnreadCou
     // Get a combined unread count for all desired folders
     PRInt32 numUnread = 0;
     if (mOnlyCountInboxes)
     {
       nsCOMPtr<nsIMsgFolder> inboxFolder;
       rootFolder->GetFolderWithFlags(nsMsgFolderFlags::Inbox, getter_AddRefs(inboxFolder));
       if (inboxFolder)
       {
-        GetTotalUnread(inboxFolder, PR_FALSE, &numUnread);
+        GetTotalUnread(inboxFolder, false, &numUnread);
         nsCString folderURI;
         inboxFolder->GetURI(folderURI);
         PR_LOG(MsgDockCountsLogModule, PR_LOG_ALWAYS,
                ("adding %d unread from %s", numUnread, folderURI.get()));
       }
     }
     else
     {
-      GetTotalUnread(rootFolder, PR_TRUE, &numUnread);
+      GetTotalUnread(rootFolder, true, &numUnread);
       nsCString folderURI;
       rootFolder->GetURI(folderURI);
       PR_LOG(MsgDockCountsLogModule, PR_LOG_ALWAYS,
              ("adding %d unread from %s", numUnread, folderURI.get()));
       
     }
 
     mUnreadTotal += numUnread;
@@ -892,17 +892,17 @@ nsMessengerOSXIntegration::ConfirmShould
   nsresult rv = aFolder->GetServer(getter_AddRefs(server));
   NS_ENSURE_SUCCESS(rv, rv);
 
   bool defaultValue = true;
   nsCAutoString type;
   rv = server->GetType(type);
   if (NS_FAILED(rv) || (type.EqualsLiteral("rss") || type.EqualsLiteral("nntp")))
   {
-    defaultValue = PR_FALSE;
+    defaultValue = false;
     return NS_OK;
   }
 
   nsCOMPtr<nsIObserverService> os =
     do_GetService("@mozilla.org/observer-service;1", &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsISupportsPRBool> shouldCount =
@@ -911,17 +911,17 @@ nsMessengerOSXIntegration::ConfirmShould
 
   PRUint32 flags;
   aFolder->GetFlags(&flags);
   if ((flags & nsMsgFolderFlags::Trash)   ||
       (flags & nsMsgFolderFlags::Drafts)  ||
       (flags & nsMsgFolderFlags::Queue)   ||
       (flags & nsMsgFolderFlags::Virtual) ||
       (flags & nsMsgFolderFlags::Junk))
-    defaultValue = PR_FALSE;
+    defaultValue = false;
 
   rv = shouldCount->SetData(defaultValue);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCString folderUri;
   rv = aFolder->GetURI(folderUri);
   NS_ENSURE_SUCCESS(rv, rv);
 
@@ -942,17 +942,17 @@ nsMessengerOSXIntegration::GetTotalUnrea
   bool countFolder;
   nsresult rv = ConfirmShouldCount(aFolder, &countFolder);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (!countFolder)
     return NS_OK;
 
   PRInt32 total = 0;
-  rv = aFolder->GetNumUnread(PR_FALSE, &total);
+  rv = aFolder->GetNumUnread(false, &total);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Use zero instead of -1 (don't know) or other special nums.
   total = total >= 0 ? total : 0;
 
   if (deep)
   {
     bool hasChildren;
@@ -976,17 +976,17 @@ nsMessengerOSXIntegration::GetTotalUnrea
         nsCOMPtr<nsISupports> child;
         rv = children->GetNext(getter_AddRefs(child));
         if (NS_SUCCEEDED(rv) && child)
         {
           childFolder = do_QueryInterface(child, &rv);
           if (NS_SUCCEEDED(rv) && childFolder)
           {
             PRInt32 childFolderCount = 0;
-            rv = GetTotalUnread(childFolder, PR_TRUE, &childFolderCount);
+            rv = GetTotalUnread(childFolder, true, &childFolderCount);
             if (NS_FAILED(rv))
               continue;
 
             total += childFolderCount;
           }
         }
       }
     }
--- a/mailnews/base/src/nsMessengerUnixIntegration.cpp
+++ b/mailnews/base/src/nsMessengerUnixIntegration.cpp
@@ -130,17 +130,17 @@ static void openMailWindow(const nsACStr
                                 "mail:3pane", nsCString(aFolderUri).get(), nsMsgKey_None);
   }
 }
 
 nsMessengerUnixIntegration::nsMessengerUnixIntegration()
 {
   mBiffStateAtom = MsgGetAtom("BiffState");
   mNewMailReceivedAtom = MsgGetAtom("NewMailReceived");
-  mAlertInProgress = PR_FALSE;
+  mAlertInProgress = false;
   mLastMRUTimes.Init();
   NS_NewISupportsArray(getter_AddRefs(mFoldersWithNewMail));
 }
 
 NS_IMPL_ISUPPORTS4(nsMessengerUnixIntegration, nsIFolderListener, nsIObserver,
                    nsIMessengerOSIntegration, nsIUrlListener)
 
 nsresult
@@ -186,34 +186,34 @@ nsresult nsMessengerUnixIntegration::Get
 #ifdef MOZ_THUNDERBIRD
 bool
 nsMessengerUnixIntegration::BuildNotificationTitle(nsIMsgFolder *aFolder, nsIStringBundle *aBundle, nsString &aTitle)
 {
   nsString accountName;
   aFolder->GetPrettiestName(accountName);
 
   PRInt32 numNewMessages = 0;
-  aFolder->GetNumNewMessages(PR_TRUE, &numNewMessages);
+  aFolder->GetNumNewMessages(true, &numNewMessages);
 
   if (!numNewMessages)
-    return PR_FALSE;
+    return false;
 
   nsAutoString numNewMsgsText;
   numNewMsgsText.AppendInt(numNewMessages);
 
   const PRUnichar *formatStrings[] =
   {
     accountName.get(), numNewMsgsText.get()
   };
 
   aBundle->FormatStringFromName(numNewMessages == 1 ?
                                   NS_LITERAL_STRING("newMailNotification_message").get() :
                                   NS_LITERAL_STRING("newMailNotification_messages").get(),
                                 formatStrings, 2, getter_Copies(aTitle));
-  return PR_TRUE;
+  return true;
 }
 
 /* This comparator lets us sort an nsCOMArray of nsIMsgDBHdr's by
  * their dateInSeconds attributes in ascending order.
  */
 static int
 nsMsgDbHdrTimestampComparator(nsIMsgDBHdr *aElement1,
                               nsIMsgDBHdr *aElement2,
@@ -242,95 +242,95 @@ nsMessengerUnixIntegration::BuildNotific
 
   bool showPreview = true;
   bool showSubject = true;
   bool showSender = true;
   PRInt32 previewLength = SHOW_ALERT_PREVIEW_LENGTH_DEFAULT;
 
   nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
   if (!prefBranch)
-    return PR_FALSE;
+    return false;
 
   prefBranch->GetBoolPref(SHOW_ALERT_PREVIEW, &showPreview);
   prefBranch->GetBoolPref(SHOW_ALERT_SENDER, &showSender);
   prefBranch->GetBoolPref(SHOW_ALERT_SUBJECT, &showSubject);
   prefBranch->GetIntPref(SHOW_ALERT_PREVIEW_LENGTH, &previewLength);
 
   nsCOMPtr<nsIMsgHeaderParser> parser = do_GetService(NS_MAILNEWS_MIME_HEADER_PARSER_CONTRACTID);
   if (!parser)
-    return PR_FALSE;
+    return false;
 
   nsCOMPtr<nsIMsgFolder> folder;
   aHdr->GetFolder(getter_AddRefs(folder));
 
   if (!folder)
-    return PR_FALSE;
+    return false;
 
   nsCString msgURI;
   folder->GetUriForMsg(aHdr, msgURI);
 
   bool localOnly;
 
   PRUint32 msgURIIndex = mFetchingURIs.IndexOf(msgURI);
   if (msgURIIndex == -1)
   {
-    localOnly = PR_FALSE;
+    localOnly = false;
     mFetchingURIs.AppendElement(msgURI);
   } 
   else
-    localOnly = PR_TRUE;
+    localOnly = true;
 
   PRUint32 messageKey;
   if (NS_FAILED(aHdr->GetMessageKey(&messageKey)))
-    return PR_FALSE;
+    return false;
 
   bool asyncResult = false;
   nsresult rv = folder->FetchMsgPreviewText(&messageKey, 1,
                                             localOnly, this,
                                             &asyncResult);
   // If we're still waiting on getting the message previews,
   // bail early.  We'll come back later when the async operation
   // finishes.
   if (NS_FAILED(rv) || asyncResult)
-    return PR_FALSE;
+    return false;
 
   // If we got here, that means that we've retrieved the message preview,
   // so we can stop tracking it with our mFetchingURIs array.
   if (msgURIIndex != -1)
     mFetchingURIs.RemoveElementAt(msgURIIndex);
 
   nsCString utf8previewString;
   if (showPreview &&
       NS_FAILED(aHdr->GetStringProperty("preview", getter_Copies(utf8previewString))))
-    return PR_FALSE;
+    return false;
 
   // need listener that mailbox is remote such as IMAP
   // to generate preview message
   nsString previewString;
   CopyUTF8toUTF16(utf8previewString, previewString);
 
   nsString subject;
   if (showSubject && NS_FAILED(aHdr->GetMime2DecodedSubject(subject)))
-    return PR_FALSE;
+    return false;
 
   nsString author;
   if (showSender)
   {
     if (NS_FAILED(aHdr->GetMime2DecodedAuthor(author)))
-      return PR_FALSE;
+      return false;
 
     PRUnichar **emails;
     PRUnichar **names;
     PRUnichar **fullnames;
     PRUint32 num;
     if (NS_FAILED(parser->ParseHeadersWithArray(author.get(),
                   &emails,
                   &names,
                   &fullnames, &num)))
-      return PR_FALSE;
+      return false;
 
     if (num > 0)
     {
       author.Assign(names[0] ? names[0] : emails[0]);
 
       NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(num, emails);
       NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(num, names);
       NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(num, fullnames);
@@ -357,20 +357,20 @@ nsMessengerUnixIntegration::BuildNotific
   {
     alertBody.AppendLiteral("\n");
   }
 
   if (showPreview)
     alertBody.Append(StringHead(previewString, previewLength));
 
   if (alertBody.IsEmpty())
-    return PR_FALSE;
+    return false;
 
   aBody.Assign(alertBody);
-  return PR_TRUE;
+  return true;
 }
 #endif
 
 nsresult nsMessengerUnixIntegration::ShowAlertMessage(const nsAString& aAlertTitle, const nsAString& aAlertText, const nsACString& aFolderURI)
 {
   nsresult rv;
   // if we are already in the process of showing an alert, don't try to show another....
   if (mAlertInProgress)
@@ -381,39 +381,39 @@ nsresult nsMessengerUnixIntegration::Sho
   bool showAlert = true;
   prefBranch->GetBoolPref(SHOW_ALERT_PREF, &showAlert);
 
   if (showAlert)
   {
 #ifdef MOZ_THUNDERBIRD
     nsCOMPtr<nsIAlertsService> alertsService(do_GetService(NS_SYSTEMALERTSERVICE_CONTRACTID, &rv));
     if (NS_SUCCEEDED(rv)) {
-      mAlertInProgress = PR_TRUE;
+      mAlertInProgress = true;
       rv = alertsService->ShowAlertNotification(NS_LITERAL_STRING(NEW_MAIL_ALERT_ICON),
                                                 aAlertTitle,
                                                 aAlertText,
-                                                PR_FALSE,
+                                                false,
                                                 NS_ConvertASCIItoUTF16(aFolderURI),
                                                 this,
                                                 EmptyString());
       if (NS_SUCCEEDED(rv))
         return rv;
     }
     AlertFinished();
-    ShowNewAlertNotification(PR_FALSE);
+    ShowNewAlertNotification(false);
 
 #else
     nsCOMPtr<nsIAlertsService> alertsService (do_GetService(NS_ALERTSERVICE_CONTRACTID, &rv));
     if (NS_SUCCEEDED(rv))
     {
       rv = alertsService->ShowAlertNotification(NS_LITERAL_STRING(NEW_MAIL_ALERT_ICON), aAlertTitle,
-                                                aAlertText, PR_TRUE,
+                                                aAlertText, true,
                                                 NS_ConvertASCIItoUTF16(aFolderURI), this,
                                                 EmptyString());
-      mAlertInProgress = PR_TRUE;
+      mAlertInProgress = true;
     }
 #endif
   }
 
   if (!showAlert || NS_FAILED(rv)) // go straight to showing the system tray icon.
     AlertFinished();
 
   return rv;
@@ -444,54 +444,54 @@ nsresult nsMessengerUnixIntegration::Sho
     if (!argsArray)
       return NS_ERROR_FAILURE;
 
     // pass in the array of folders with unread messages
     nsCOMPtr<nsISupportsInterfacePointer> ifptr = do_CreateInstance(NS_SUPPORTS_INTERFACE_POINTER_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     ifptr->SetData(mFoldersWithNewMail);
     ifptr->SetDataIID(&NS_GET_IID(nsISupportsArray));
-    argsArray->AppendElement(ifptr, PR_FALSE);
+    argsArray->AppendElement(ifptr, false);
 
     // pass in the observer
     ifptr = do_CreateInstance(NS_SUPPORTS_INTERFACE_POINTER_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     nsCOMPtr <nsISupports> supports = do_QueryInterface(static_cast<nsIMessengerOSIntegration*>(this));
     ifptr->SetData(supports);
     ifptr->SetDataIID(&NS_GET_IID(nsIObserver));
-    argsArray->AppendElement(ifptr, PR_FALSE);
+    argsArray->AppendElement(ifptr, false);
 
     // pass in the animation flag
     nsCOMPtr<nsISupportsPRBool> scriptableUserInitiated (do_CreateInstance(NS_SUPPORTS_PRBOOL_CONTRACTID, &rv));
     NS_ENSURE_SUCCESS(rv, rv);
     scriptableUserInitiated->SetData(aUserInitiated);
-    argsArray->AppendElement(scriptableUserInitiated, PR_FALSE);
+    argsArray->AppendElement(scriptableUserInitiated, false);
 
     nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID));
     nsCOMPtr<nsIDOMWindow> newWindow;
 
     rv = wwatch->OpenWindow(0, ALERT_CHROME_URL, "_blank",
                             "chrome,dialog=yes,titlebar=no,popup=yes", argsArray,
                             getter_AddRefs(newWindow));
 
-    mAlertInProgress = PR_TRUE;
+    mAlertInProgress = true;
   }
 
   // if the user has turned off the mail alert, or openWindow generated an error,
   // then go straight to the system tray.
   if (!showAlert || NS_FAILED(rv))
     AlertFinished();
 
   return rv;
 }
 #endif
 
 nsresult nsMessengerUnixIntegration::AlertFinished()
 {
-  mAlertInProgress = PR_FALSE;
+  mAlertInProgress = false;
   return NS_OK;
 }
 
 nsresult nsMessengerUnixIntegration::AlertClicked()
 {
   nsCString folderURI;
   GetFirstFolderWithNewMail(folderURI);
   openMailWindow(folderURI);
@@ -523,17 +523,17 @@ void nsMessengerUnixIntegration::FillToo
   nsCOMPtr<nsIMsgFolder> folder = nsnull;
   nsCOMPtr<nsIMsgFolder> folderWithNewMail = nsnull;
 
   PRUint32 i;
   for (i = 0; i < count && !folderWithNewMail; i++)
   {
     weakReference = do_QueryElementAt(mFoldersWithNewMail, i);
     folder = do_QueryReferent(weakReference);
-    folder->GetChildWithURI(folderUri, PR_TRUE, PR_TRUE,
+    folder->GetChildWithURI(folderUri, true, true,
                             getter_AddRefs(folderWithNewMail));
   }
 
   if (folder && folderWithNewMail)
   {
 #ifdef MOZ_THUNDERBIRD
     nsCOMPtr<nsIStringBundle> bundle;
     GetStringBundle(getter_AddRefs(bundle));
@@ -620,17 +620,17 @@ void nsMessengerUnixIntegration::FillToo
     nsString accountName;
     folder->GetPrettiestName(accountName);
 
     nsCOMPtr<nsIStringBundle> bundle;
     GetStringBundle(getter_AddRefs(bundle));
     if (bundle)
     {
       PRInt32 numNewMessages = 0;
-      folder->GetNumNewMessages(PR_TRUE, &numNewMessages);
+      folder->GetNumNewMessages(true, &numNewMessages);
       nsAutoString numNewMsgsText;
       numNewMsgsText.AppendInt(numNewMessages);
 
       const PRUnichar *formatStrings[] =
       {
         numNewMsgsText.get(),
       };
 
--- a/mailnews/base/src/nsMessengerWinIntegration.cpp
+++ b/mailnews/base/src/nsMessengerWinIntegration.cpp
@@ -208,17 +208,17 @@ static void CALLBACK delayedSingleClick(
   nsresult rv = NS_OK;
   nsCOMPtr<nsIMessengerOSIntegration> integrationService =
     do_GetService(NS_MESSENGEROSINTEGRATION_CONTRACTID, &rv);
   if (NS_SUCCEEDED(rv))
   {
     // we know we are dealing with the windows integration object
     nsMessengerWinIntegration * winIntegrationService = static_cast<nsMessengerWinIntegration*>
                                                                    (static_cast<nsIMessengerOSIntegration*>(integrationService.get()));
-    winIntegrationService->ShowNewAlertNotification(PR_TRUE, EmptyString(), EmptyString());
+    winIntegrationService->ShowNewAlertNotification(true, EmptyString(), EmptyString());
   }
 #endif
 }
 
 // Window proc.
 static LRESULT CALLBACK MessageWindowProc( HWND msgWindow, UINT msg, WPARAM wp, LPARAM lp )
 {
   if (msg == WM_USER)
@@ -275,24 +275,24 @@ static nsresult Create()
 }
 
 
 nsMessengerWinIntegration::nsMessengerWinIntegration()
 {
   mDefaultServerAtom = MsgGetAtom("DefaultServer");
   mTotalUnreadMessagesAtom = MsgGetAtom("TotalUnreadMessages");
 
-  mUnreadTimerActive = PR_FALSE;
-  mStoreUnreadCounts = PR_FALSE;
+  mUnreadTimerActive = false;
+  mStoreUnreadCounts = false;
 
   mBiffStateAtom = MsgGetAtom("BiffState");
-  mBiffIconVisible = PR_FALSE;
-  mSuppressBiffIcon = PR_FALSE;
-  mAlertInProgress = PR_FALSE;
-  mBiffIconInitialized = PR_FALSE;
+  mBiffIconVisible = false;
+  mSuppressBiffIcon = false;
+  mAlertInProgress = false;
+  mBiffIconInitialized = false;
   NS_NewISupportsArray(getter_AddRefs(mFoldersWithNewMail));
 }
 
 nsMessengerWinIntegration::~nsMessengerWinIntegration()
 {
   if (mUnreadCountUpdateTimer) {
     mUnreadCountUpdateTimer->Cancel();
     mUnreadCountUpdateTimer = nsnull;
@@ -319,17 +319,17 @@ nsresult
 nsMessengerWinIntegration::ResetCurrent()
 {
   mInboxURI.Truncate();
   mEmail.Truncate();
 
   mCurrentUnreadCount = -1;
   mLastUnreadCountWrittenToRegistry = -1;
 
-  mDefaultAccountMightHaveAnInbox = PR_TRUE;
+  mDefaultAccountMightHaveAnInbox = true;
   return NS_OK;
 }
 
 NOTIFYICONDATAW sBiffIconData = { NOTIFYICONDATAW_V2_SIZE,
                                   0,
                                   2,
                                   NIF_ICON | NIF_MESSAGE | NIF_TIP | NIF_INFO,
                                   WM_USER,
@@ -352,17 +352,17 @@ static const PRUint32 kMaxBalloonTitle =
 void nsMessengerWinIntegration::InitializeBiffStatusIcon()
 {
   // initialize our biff status bar icon
   Create();
 
   sBiffIconData.hWnd = (HWND) msgWindow;
   sBiffIconData.hIcon = ::LoadIcon( ::GetModuleHandle( NULL ), MAKEINTRESOURCE(IDI_MAILBIFF) );
 
-  mBiffIconInitialized = PR_TRUE;
+  mBiffIconInitialized = true;
 }
 
 nsresult
 nsMessengerWinIntegration::Init()
 {
   nsresult rv;
 
   // get directory service to build path for shell dll
@@ -394,17 +394,17 @@ nsMessengerWinIntegration::Init()
     mSHSetUnreadMailCount = (fnSHSetUnreadMailCount)GetProcAddress(hModule, XP_SHSetUnreadMailCounts);
     mSHEnumerateUnreadMailAccounts = (fnSHEnumerateUnreadMailAccounts)GetProcAddress(hModule, XP_SHEnumerateUnreadMailAccounts);
     mSHQueryUserNotificationState = (fnSHQueryUserNotificationState)GetProcAddress(hModule, "SHQueryUserNotificationState");
   }
 
   // if failed to get either of the process addresses, this is not XP platform
   // so we aren't storing unread counts
   if (mSHSetUnreadMailCount && mSHEnumerateUnreadMailAccounts)
-    mStoreUnreadCounts = PR_TRUE;
+    mStoreUnreadCounts = true;
 
   nsCOMPtr <nsIMsgAccountManager> accountManager =
     do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
 
   // because we care if the default server changes
   rv = accountManager->AddRootFolderListener(this);
   NS_ENSURE_SUCCESS(rv,rv);
@@ -496,20 +496,20 @@ nsresult nsMessengerWinIntegration::Show
   prefBranch->GetBoolPref(SHOW_ALERT_PREF, &showAlert);
 
   if (showAlert)
   {
     nsCOMPtr<nsIAlertsService> alertsService (do_GetService(NS_ALERTSERVICE_CONTRACTID, &rv));
     if (NS_SUCCEEDED(rv))
     {
       rv = alertsService->ShowAlertNotification(NS_LITERAL_STRING(NEW_MAIL_ALERT_ICON), aAlertTitle,
-                                                aAlertText, PR_TRUE,
+                                                aAlertText, true,
                                                 NS_ConvertASCIItoUTF16(aFolderURI), this,
                                                 EmptyString());
-      mAlertInProgress = PR_TRUE;
+      mAlertInProgress = true;
     }
   }
 
   if (!showAlert || NS_FAILED(rv)) // go straight to showing the system tray icon.
     AlertFinished();
 
   return rv;
 }
@@ -593,17 +593,17 @@ nsresult nsMessengerWinIntegration::Show
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID));
     nsCOMPtr<nsIDOMWindow> newWindow;
     rv = wwatch->OpenWindow(0, ALERT_CHROME_URL, "_blank",
                 "chrome,dialog=yes,titlebar=no,popup=yes", argsArray,
                  getter_AddRefs(newWindow));
 
-    mAlertInProgress = PR_TRUE;
+    mAlertInProgress = true;
   }
 
   // if the user has turned off the mail alert, or  openWindow generated an error,
   // then go straight to the system tray.
   if (!showAlert || NS_FAILED(rv))
     AlertFinished();
 
   return rv;
@@ -619,20 +619,20 @@ nsresult nsMessengerWinIntegration::Aler
   {
     nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
     if (prefBranch)
       prefBranch->GetBoolPref(SHOW_TRAY_ICON_PREF, &showTrayIcon);
   }
   if (showTrayIcon || sBiffIconData.szInfo[0])
   {
     GenericShellNotify(NIM_ADD);
-    mBiffIconVisible = PR_TRUE;
+    mBiffIconVisible = true;
   }
-  mSuppressBiffIcon = PR_FALSE;
-  mAlertInProgress = PR_FALSE;
+  mSuppressBiffIcon = false;
+  mAlertInProgress = false;
   return NS_OK;
 }
 
 nsresult nsMessengerWinIntegration::AlertClicked()
 {
 #ifdef MOZ_THUNDERBIRD
   nsresult rv;
   nsCOMPtr<nsIMsgMailSession> mailSession = do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv);
@@ -646,17 +646,17 @@ nsresult nsMessengerWinIntegration::Aler
     if (domWindow)
     {
       activateWindow(domWindow);
       return NS_OK;
     }
   }
 #endif
   // make sure we don't insert the icon in the system tray since the user clicked on the alert.
-  mSuppressBiffIcon = PR_TRUE;
+  mSuppressBiffIcon = true;
   nsCString folderURI;
   GetFirstFolderWithNewMail(folderURI);
   openMailWindow(folderURI);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMessengerWinIntegration::Observe(nsISupports* aSubject, const char* aTopic, const PRUnichar* aData)
@@ -688,17 +688,17 @@ void nsMessengerWinIntegration::FillTool
   {
     weakReference = do_QueryElementAt(mFoldersWithNewMail, index);
     folder = do_QueryReferent(weakReference);
     if (folder)
     {
       folder->GetPrettiestName(accountName);
 
       numNewMessages = 0;
-      folder->GetNumNewMessages(PR_TRUE, &numNewMessages);
+      folder->GetNumNewMessages(true, &numNewMessages);
       nsCOMPtr<nsIStringBundle> bundle;
       GetStringBundle(getter_AddRefs(bundle));
       if (bundle)
       {
         nsAutoString numNewMsgsText;
         numNewMsgsText.AppendInt(numNewMessages);
 
         const PRUnichar *formatStrings[] =
@@ -732,17 +732,17 @@ void nsMessengerWinIntegration::FillTool
 
   ::wcsncpy( sBiffIconData.szTip, toolTipText.get(), kMaxTooltipSize);
 
   if (!mBiffIconVisible)
   {
 #ifndef MOZ_THUNDERBIRD
     ShowAlertMessage(accountName, animatedAlertText, EmptyCString());
 #else
-    ShowNewAlertNotification(PR_FALSE, accountName, animatedAlertText);
+    ShowNewAlertNotification(false, accountName, animatedAlertText);
 #endif
   }
   else
    GenericShellNotify( NIM_MODIFY);
 }
 
 // get the first top level folder which we know has new mail, then enumerate over all the subfolders
 // looking for the first real folder with new mail. Return the folderURI for that folder.
@@ -783,17 +783,17 @@ nsresult nsMessengerWinIntegration::GetF
       {
         rv = enumerator->CurrentItem(getter_AddRefs(supports));
         if (supports)
         {
           msgFolder = do_QueryInterface(supports, &rv);
           if (msgFolder)
           {
             numNewMessages = 0;
-            msgFolder->GetNumNewMessages(PR_FALSE, &numNewMessages);
+            msgFolder->GetNumNewMessages(false, &numNewMessages);
             if (numNewMessages)
               break; // kick out of the while loop
             more = enumerator->Next();
           }
         } // if we have a folder
       }  // if we have more potential folders to enumerate
     }  // if enumerator
 
@@ -898,23 +898,23 @@ nsMessengerWinIntegration::OnItemIntProp
     {
       // we are always going to remove the icon whenever we get our first no mail
       // notification.
 
       // avoid a race condition where we are told to remove the icon before we've actually
       // added it to the system tray. This happens when the user reads a new message before
       // the animated alert has gone away.
       if (mAlertInProgress)
-        mSuppressBiffIcon = PR_TRUE;
+        mSuppressBiffIcon = true;
 
       if (indexInNewArray != -1)
         mFoldersWithNewMail->RemoveElementAt(indexInNewArray);
       if (mBiffIconVisible)
       {
-        mBiffIconVisible = PR_FALSE;
+        mBiffIconVisible = false;
         GenericShellNotify(NIM_DELETE);
       }
     }
   } // if the biff property changed
 
   if (!mStoreUnreadCounts) return NS_OK; // don't do anything here if we aren't storing unread counts...
 
   if (aProperty == mTotalUnreadMessagesAtom) {
@@ -947,17 +947,17 @@ nsMessengerWinIntegration::OnItemIntProp
   return NS_OK;
 }
 
 void
 nsMessengerWinIntegration::OnUnreadCountUpdateTimer(nsITimer *timer, void *osIntegration)
 {
   nsMessengerWinIntegration *winIntegration = (nsMessengerWinIntegration*)osIntegration;
 
-  winIntegration->mUnreadTimerActive = PR_FALSE;
+  winIntegration->mUnreadTimerActive = false;
   nsresult rv = winIntegration->UpdateUnreadCount();
   NS_ASSERTION(NS_SUCCEEDED(rv), "updating unread count failed");
 }
 
 nsresult
 nsMessengerWinIntegration::RemoveCurrentFromRegistry()
 {
   if (!mStoreUnreadCounts) return NS_OK; // don't do anything here if we aren't storing unread counts...
@@ -1066,17 +1066,17 @@ nsMessengerWinIntegration::SetupInbox()
     do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
 
   nsCOMPtr <nsIMsgAccount> account;
   rv = accountManager->GetDefaultAccount(getter_AddRefs(account));
   if (NS_FAILED(rv)) {
     // this can happen if we launch mail on a new profile
     // we don't have a default account yet
-    mDefaultAccountMightHaveAnInbox = PR_FALSE;
+    mDefaultAccountMightHaveAnInbox = false;
     return NS_OK;
   }
 
   // get incoming server
   nsCOMPtr <nsIMsgIncomingServer> server;
   rv = account->GetIncomingServer(getter_AddRefs(server));
   NS_ENSURE_SUCCESS(rv,rv);
   if (!server)
@@ -1084,17 +1084,17 @@ nsMessengerWinIntegration::SetupInbox()
 
   nsCString type;
   rv = server->GetType(type);
   NS_ENSURE_SUCCESS(rv,rv);
 
   // we only care about imap and pop3
   if (type.EqualsLiteral("imap") || type.EqualsLiteral("pop3")) {
     // imap and pop3 account should have an Inbox
-    mDefaultAccountMightHaveAnInbox = PR_TRUE;
+    mDefaultAccountMightHaveAnInbox = true;
 
     mEmailPrefix.Truncate();
 
     // Get user's email address
     nsCOMPtr<nsIMsgIdentity> identity;
     rv = account->GetDefaultIdentity(getter_AddRefs(identity));
     NS_ENSURE_SUCCESS(rv,rv);
 
@@ -1114,25 +1114,25 @@ nsMessengerWinIntegration::SetupInbox()
     nsCOMPtr <nsIMsgFolder> inboxFolder;
     rootMsgFolder->GetFolderWithFlags(nsMsgFolderFlags::Inbox,
                                       getter_AddRefs(inboxFolder));
     NS_ENSURE_TRUE(inboxFolder, NS_ERROR_FAILURE);
 
     rv = inboxFolder->GetURI(mInboxURI);
     NS_ENSURE_SUCCESS(rv,rv);
 
-    rv = inboxFolder->GetNumUnread(PR_FALSE, &mCurrentUnreadCount);
+    rv = inboxFolder->GetNumUnread(false, &mCurrentUnreadCount);
     NS_ENSURE_SUCCESS(rv,rv);
   }
   else {
     // the default account is valid, but it's not something
     // that we expect to have an inbox.  (local folders, news accounts)
     // set this flag to avoid calling SetupInbox() every time
     // the timer goes off.
-    mDefaultAccountMightHaveAnInbox = PR_FALSE;
+    mDefaultAccountMightHaveAnInbox = false;
   }
 
   return NS_OK;
 }
 
 nsresult
 nsMessengerWinIntegration::UpdateUnreadCount()
 {
@@ -1146,17 +1146,17 @@ nsMessengerWinIntegration::UpdateUnreadC
 
   return UpdateRegistryWithCurrent();
 }
 
 nsresult
 nsMessengerWinIntegration::SetupUnreadCountUpdateTimer()
 {
   if (!mStoreUnreadCounts) return NS_OK; // don't do anything here if we aren't storing unread counts...
-  mUnreadTimerActive = PR_TRUE;
+  mUnreadTimerActive = true;
   if (mUnreadCountUpdateTimer)
     mUnreadCountUpdateTimer->Cancel();
   else
     mUnreadCountUpdateTimer = do_CreateInstance("@mozilla.org/timer;1");
 
   mUnreadCountUpdateTimer->InitWithFuncCallback(OnUnreadCountUpdateTimer,
     (void *)this, UNREAD_UPDATE_INTERVAL, nsITimer::TYPE_ONE_SHOT);
 
--- a/mailnews/base/src/nsMsgAccount.cpp
+++ b/mailnews/base/src/nsMsgAccount.cpp
@@ -353,17 +353,17 @@ nsMsgAccount::AddIdentity(nsIMsgIdentity
       char *token = NS_strtok(",", &newStr);
 
       // look for the identity key that we're adding
       while (token) {
         testKey = token;
         testKey.StripWhitespace();
 
         if (testKey.Equals(key))
-          foundIdentity = PR_TRUE;
+          foundIdentity = true;
 
         token = NS_strtok(",", &newStr);
       }
     }
 
     // if it didn't already exist, append it
     if (!foundIdentity) {
       if (newIdentityList.IsEmpty())
--- a/mailnews/base/src/nsMsgAccountManager.cpp
+++ b/mailnews/base/src/nsMsgAccountManager.cpp
@@ -172,22 +172,22 @@ hashCleanupDeferral(nsCStringHashKey::Ke
 NS_IMPL_THREADSAFE_ISUPPORTS5(nsMsgAccountManager,
                               nsIMsgAccountManager,
                               nsIObserver,
                               nsISupportsWeakReference,
                               nsIUrlListener,
                               nsIFolderListener)
 
 nsMsgAccountManager::nsMsgAccountManager() :
-  m_accountsLoaded(PR_FALSE),
-  m_emptyTrashInProgress(PR_FALSE),
-  m_cleanupInboxInProgress(PR_FALSE),
-  m_userAuthenticated(PR_FALSE),
-  m_loadingVirtualFolders(PR_FALSE),
-  m_virtualFoldersLoaded(PR_FALSE)
+  m_accountsLoaded(false),
+  m_emptyTrashInProgress(false),
+  m_cleanupInboxInProgress(false),
+  m_userAuthenticated(false),
+  m_loadingVirtualFolders(false),
+  m_virtualFoldersLoaded(false)
 {
 }
 
 nsMsgAccountManager::~nsMsgAccountManager()
 {
   nsresult rv;
 
   if(!m_haveShutdown)
@@ -218,21 +218,21 @@ nsresult nsMsgAccountManager::Init()
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = NS_NewISupportsArray(getter_AddRefs(mFolderListeners));
 
   nsCOMPtr<nsIObserverService> observerService =
            do_GetService("@mozilla.org/observer-service;1", &rv);
   if (NS_SUCCEEDED(rv))
   {
-    observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_TRUE);
-    observerService->AddObserver(this, "quit-application-granted" , PR_TRUE);
-    observerService->AddObserver(this, ABOUT_TO_GO_OFFLINE_TOPIC, PR_TRUE);
-    observerService->AddObserver(this, "profile-before-change", PR_TRUE);
-    observerService->AddObserver(this, "sleep_notification", PR_TRUE);
+    observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, true);
+    observerService->AddObserver(this, "quit-application-granted" , true);
+    observerService->AddObserver(this, ABOUT_TO_GO_OFFLINE_TOPIC, true);
+    observerService->AddObserver(this, "profile-before-change", true);
+    observerService->AddObserver(this, "sleep_notification", true);
   }
 
   return NS_OK;
 }
 
 nsresult nsMsgAccountManager::Shutdown()
 {
   if (m_haveShutdown)     // do not shutdown twice
@@ -265,17 +265,17 @@ nsresult nsMsgAccountManager::Shutdown()
     biffService->Shutdown();
 
   //shutdown removes nsIIncomingServer listener from purge service, so do it after accounts have been unloaded
   nsCOMPtr<nsIMsgPurgeService> purgeService = do_GetService(NS_MSGPURGESERVICE_CONTRACTID, &rv);
   if (NS_SUCCEEDED(rv) && purgeService)
     purgeService->Shutdown();
 
   m_msgFolderCache = nsnull;
-  m_haveShutdown = PR_TRUE;
+  m_haveShutdown = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgAccountManager::GetShutdownInProgress(bool *_retval)
 {
     NS_ENSURE_ARG_POINTER(_retval);
     *_retval = m_shutdownInProgress;
@@ -559,17 +559,17 @@ nsMsgAccountManager::RemoveIncomingServe
   {
     rv = aServer->RemoveFiles();
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   // now clear out the server once and for all.
   // watch out! could be scary
   aServer->ClearAllValues();
-  rootFolder->Shutdown(PR_TRUE);
+  rootFolder->Shutdown(true);
   return rv;
 }
 
 /*
  * create a server when you know the key and the type
  */
 nsresult
 nsMsgAccountManager::createKeyedServer(const nsACString& key,
@@ -616,32 +616,32 @@ nsMsgAccountManager::createKeyedServer(c
 }
 
 bool
 nsMsgAccountManager::addListenerToFolder(nsISupports *element, void *data)
 {
   nsresult rv;
   nsIMsgFolder *rootFolder = (nsIMsgFolder *)data;
   nsCOMPtr<nsIFolderListener> listener = do_QueryInterface(element, &rv);
-  NS_ENSURE_SUCCESS(rv, PR_TRUE);
+  NS_ENSURE_SUCCESS(rv, true);
 
   rootFolder->AddFolderListener(listener);
-  return PR_TRUE;
+  return true;
 }
 
 bool
 nsMsgAccountManager::removeListenerFromFolder(nsISupports *element, void *data)
 {
   nsresult rv;
   nsIMsgFolder *rootFolder = (nsIMsgFolder *)data;
   nsCOMPtr<nsIFolderListener> listener = do_QueryInterface(element, &rv);
-  NS_ENSURE_SUCCESS(rv, PR_TRUE);
+  NS_ENSURE_SUCCESS(rv, true);
 
   rootFolder->RemoveFolderListener(listener);
-  return PR_TRUE;
+  return true;
 }
 
 NS_IMETHODIMP
 nsMsgAccountManager::RemoveAccount(nsIMsgAccount *aAccount)
 {
   NS_ENSURE_ARG_POINTER(aAccount);
   nsresult rv = LoadAccounts();
   NS_ENSURE_SUCCESS(rv, rv);
@@ -661,17 +661,17 @@ nsMsgAccountManager::RemoveAccount(nsIMs
     SetDefaultAccount(nsnull);
 
   // XXX - need to figure out if this is the last time this server is
   // being used, and only send notification then.
   // (and only remove from hashtable then too!)
   nsCOMPtr<nsIMsgIncomingServer> server;
   rv = aAccount->GetIncomingServer(getter_AddRefs(server));
   if (NS_SUCCEEDED(rv) && server)
-    RemoveIncomingServer(server, PR_FALSE);
+    RemoveIncomingServer(server, false);
 
   nsCOMPtr<nsISupportsArray> identityArray;
   rv = aAccount->GetIdentities(getter_AddRefs(identityArray));
   if (NS_SUCCEEDED(rv)) {
     PRUint32 count = 0;
     identityArray->Count(&count);
     PRUint32 i;
     for (i = 0; i < count; i++)
@@ -692,17 +692,17 @@ nsMsgAccountManager::RemoveAccount(nsIMs
                                           (void **)getter_AddRefs(existingAccount));
           if (NS_SUCCEEDED(rv))
           {
             nsCOMPtr<nsISupportsArray> existingIdentitiesArray;
 
             rv = existingAccount->GetIdentities(getter_AddRefs(existingIdentitiesArray));
             if (existingIdentitiesArray->IndexOf(identity) != kNotFound)
             {
-              identityStillUsed = PR_TRUE;
+              identityStillUsed = true;
               break;
             }
           }
         }
       }
       // clear out all identity information if no other account uses it.
       if (!identityStillUsed)
         identity->ClearAllValues();
@@ -773,17 +773,17 @@ nsMsgAccountManager::GetDefaultAccount(n
           bool canBeDefaultServer = false;
           if (server)
             server->GetCanBeDefaultServer(&canBeDefaultServer);
 
           // if this can serve as default server, set it as default and
           // break outof the loop.
           if (canBeDefaultServer) {
             SetDefaultAccount(account);
-            foundValidDefaultAccount = PR_TRUE;
+            foundValidDefaultAccount = true;
             break;
           }
         }
       }
 
       if (!foundValidDefaultAccount) {
         // get the first account and use it.
         // we need to fix this scenario.
@@ -823,28 +823,28 @@ nsMsgAccountManager::notifyDefaultServer
 
   // first tell old server it's no longer the default
   if (aOldAccount) {
     rv = aOldAccount->GetIncomingServer(getter_AddRefs(server));
     if (NS_SUCCEEDED(rv) && server) {
       rv = server->GetRootFolder(getter_AddRefs(rootFolder));
       if (NS_SUCCEEDED(rv) && rootFolder)
         rootFolder->NotifyBoolPropertyChanged(kDefaultServerAtom,
-                                              PR_TRUE, PR_FALSE);
+                                              true, false);
     }
   }
 
     // now tell new server it is.
   if (aNewAccount) {
     rv = aNewAccount->GetIncomingServer(getter_AddRefs(server));
     if (NS_SUCCEEDED(rv) && server) {
       rv = server->GetRootFolder(getter_AddRefs(rootFolder));
       if (NS_SUCCEEDED(rv) && rootFolder)
         rootFolder->NotifyBoolPropertyChanged(kDefaultServerAtom,
-                                              PR_FALSE, PR_TRUE);
+                                              false, true);
     }
   }
 
   if (aOldAccount && aNewAccount)  //only notify if the user goes and changes default account
   {
     nsCOMPtr<nsIObserverService> observerService =
       do_GetService("@mozilla.org/observer-service;1", &rv);
 
@@ -887,17 +887,17 @@ nsMsgAccountManager::hashUnloadServer(ns
 
   nsCOMPtr<nsIMsgFolder> rootFolder;
   rv = aServer->GetRootFolder(getter_AddRefs(rootFolder));
 
   accountManager->mFolderListeners->EnumerateForwards(removeListenerFromFolder,
                                       (void *)(nsIMsgFolder*)rootFolder);
 
   if(NS_SUCCEEDED(rv))
-    rootFolder->Shutdown(PR_TRUE);
+    rootFolder->Shutdown(true);
 
   return PL_DHASH_NEXT;
 }
 
 void nsMsgAccountManager::LogoutOfServer(nsIMsgIncomingServer *aServer)
 {
   nsresult rv = aServer->Shutdown();
   NS_ASSERTION(NS_SUCCEEDED(rv), "Shutdown of server failed");
@@ -944,17 +944,17 @@ hashCleanupOnExit(nsCStringHashKey::KeyT
   if (WeAreOffline())
     return PL_DHASH_STOP;
 
   aServer->GetEmptyTrashOnExit(&emptyTrashOnExit);
   nsCOMPtr <nsIImapIncomingServer> imapserver = do_QueryInterface(aServer);
   if (imapserver)
   {
     imapserver->GetCleanupInboxOnExit(&cleanupInboxOnExit);
-    imapserver->SetShuttingDown(PR_TRUE);
+    imapserver->SetShuttingDown(true);
   }
   if (emptyTrashOnExit || cleanupInboxOnExit)
   {
     nsCOMPtr<nsIMsgFolder> root;
     aServer->GetRootFolder(getter_AddRefs(root));
     nsCString type;
     aServer->GetType(type);
     if (root)
@@ -1125,67 +1125,67 @@ nsMsgAccountManager::GetAllIdentities(ns
 }
 
 bool
 nsMsgAccountManager::addIdentityIfUnique(nsISupports *element, void *aData)
 {
   nsresult rv;
   nsCOMPtr<nsIMsgIdentity> identity = do_QueryInterface(element, &rv);
   if (NS_FAILED(rv))
-    return PR_TRUE;
+    return true;
 
   nsISupportsArray *array = (nsISupportsArray*)aData;
 
   nsCString key;
   rv = identity->GetKey(key);
   if (NS_FAILED(rv))
-    return PR_TRUE;
+    return true;
 
   PRUint32 count = 0;
   rv = array->Count(&count);
   if (NS_FAILED(rv))
-    return PR_TRUE;
+    return true;
 
   bool found=false;
   PRUint32 i;
   for (i = 0; i < count; i++) {
     nsCOMPtr<nsIMsgIdentity> thisIdentity( do_QueryElementAt(array, i, &rv));
     if (NS_FAILED(rv))
       continue;
 
     nsCString thisKey;
     thisIdentity->GetKey(thisKey);
     if (key.Equals(thisKey)) {
-      found = PR_TRUE;
+      found = true;
       break;
     }
   }
 
   if (!found)
     array->AppendElement(identity);
 
-  return PR_TRUE;
+  return true;
 }
 
 bool
 nsMsgAccountManager::getIdentitiesToArray(nsISupports *element, void *aData)
 {
   nsresult rv;
   nsCOMPtr<nsIMsgAccount> account = do_QueryInterface(element, &rv);
   if (NS_FAILED(rv))
-    return PR_TRUE;
+    return true;
 
   nsCOMPtr<nsISupportsArray> identities;
   rv = account->GetIdentities(getter_AddRefs(identities));
   if (NS_FAILED(rv))
-    return PR_TRUE;
+    return true;
 
   identities->EnumerateForwards(addIdentityIfUnique, aData);
 
-  return PR_TRUE;
+  return true;
 }
 
 static PLDHashOperator
 hashGetNonHiddenServersToArray(nsCStringHashKey::KeyType aKey,
                                nsCOMPtr<nsIMsgIncomingServer>& aServer,
                                void* aClosure)
 {
   bool hidden = false;
@@ -1340,18 +1340,18 @@ nsMsgAccountManager::LoadAccounts()
         }
         // Increase the version number so that updates will happen as and when needed
         rv = prefBranch->SetIntPref(APPEND_ACCOUNTS_VERSION_PREF_NAME, appendAccountsCurrentVersion + 1);
       }
     }
   }
 
   // It is ok to return null accounts like when we create new profile.
-  m_accountsLoaded = PR_TRUE;
-  m_haveShutdown = PR_FALSE;
+  m_accountsLoaded = true;
+  m_haveShutdown = false;
 
   if (accountList.IsEmpty())
     return NS_OK;
 
   /* parse accountList and run loadAccount on each string, comma-separated */
   nsCOMPtr<nsIMsgAccount> account;
   // Tokenize the data and add each account
   // in the user's current mailnews account list
@@ -1586,17 +1586,17 @@ nsMsgAccountManager::UnloadAccounts()
   mFolderFlagAtom = nsnull;
 
   m_defaultAccount=nsnull;
   m_incomingServers.Enumerate(hashUnloadServer, this);
 
   m_accounts->Clear();          // will release all elements
   m_identities.Clear();
   m_incomingServers.Clear();
-  m_accountsLoaded = PR_FALSE;
+  m_accountsLoaded = false;
   mAccountKeyList.Truncate();
   SetLastServerFound(nsnull, EmptyCString(), EmptyCString(), 0, EmptyCString());
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgAccountManager::ShutdownServers()
 {
@@ -1613,17 +1613,17 @@ nsMsgAccountManager::CloseCachedConnecti
 
 NS_IMETHODIMP
 nsMsgAccountManager::CleanupOnExit()
 {
   // This can get called multiple times, and potentially re-entrantly.
   // So add some protection against that.
   if (m_shutdownInProgress)
     return NS_OK;
-  m_shutdownInProgress = PR_TRUE;
+  m_shutdownInProgress = true;
   m_incomingServers.Enumerate(hashCleanupOnExit, nsnull);
   // Try to do this early on in the shutdown process before
   // necko shuts itself down.
   CloseCachedConnections();
   return NS_OK;
 }
 
 NS_IMETHODIMP
@@ -1725,46 +1725,46 @@ nsMsgAccountManager::findServerIndexBySe
   findServerByKeyEntry *entry = (findServerByKeyEntry*) aData;
 
   // increment the index;
   entry->index++;
 
   nsCOMPtr<nsIMsgIncomingServer> server;
   rv = account->GetIncomingServer(getter_AddRefs(server));
   if (!server || NS_FAILED(rv))
-    return PR_TRUE;
+    return true;
 
   nsCString key;
   rv = server->GetKey(key);
   if (NS_FAILED(rv))
-    return PR_TRUE;
+    return true;
 
   // stop when found,
   // index will be set to the current index
   return !key.Equals(entry->key);
 }
 
 bool
 nsMsgAccountManager::findAccountByKey(nsISupports* element, void *aData)
 {
   nsresult rv;
   nsCOMPtr<nsIMsgAccount> account = do_QueryInterface(element, &rv);
   if (NS_FAILED(rv))
-    return PR_TRUE;
+    return true;
 
   findAccountByKeyEntry *entry = (findAccountByKeyEntry*) aData;
 
   nsCString key;
   account->GetKey(key);
   if (key.Equals(entry->key))
   {
     entry->account = account;
-    return PR_FALSE;        // stop when found
+    return false;        // stop when found
   }
-  return PR_TRUE;
+  return true;
 }
 
 NS_IMETHODIMP nsMsgAccountManager::AddIncomingServerListener(nsIIncomingServerListener *serverListener)
 {
   m_incomingServerListeners.AppendObject(serverListener);
   return NS_OK;
 }
 
@@ -1901,59 +1901,59 @@ nsMsgAccountManager::findServerInternal(
 }
 
 NS_IMETHODIMP
 nsMsgAccountManager::FindServer(const nsACString& username,
                                 const nsACString& hostname,
                                 const nsACString& type,
                                 nsIMsgIncomingServer** aResult)
 {
-  return findServerInternal(username, hostname, type, 0, PR_FALSE, aResult);
+  return findServerInternal(username, hostname, type, 0, false, aResult);
 }
 
 // Interface called by UI js only (always return true).
 NS_IMETHODIMP
 nsMsgAccountManager::FindRealServer(const nsACString& username,
                                     const nsACString& hostname,
                                     const nsACString& type,
                                     PRInt32 port,
                                     nsIMsgIncomingServer** aResult)
 {
   *aResult = nsnull;
-  findServerInternal(username, hostname, type, port, PR_TRUE, aResult);
+  findServerInternal(username, hostname, type, port, true, aResult);
   return NS_OK;
 }
 
 bool
 nsMsgAccountManager::findAccountByServerKey(nsISupports *element,
                                           void *aData)
 {
   nsresult rv;
   findAccountByKeyEntry *entry = (findAccountByKeyEntry*)aData;
   nsCOMPtr<nsIMsgAccount> account = do_QueryInterface(element, &rv);
   if (NS_FAILED(rv))
-    return PR_TRUE;
+    return true;
 
   nsCOMPtr<nsIMsgIncomingServer> server;
   rv = account->GetIncomingServer(getter_AddRefs(server));
   if (!server || NS_FAILED(rv))
-    return PR_TRUE;
+    return true;
 
   nsCString key;
   rv = server->GetKey(key);
   if (NS_FAILED(rv))
-    return PR_TRUE;
+    return true;
 
   // if the keys are equal, the servers are equal
   if (key.Equals(entry->key))
   {
     entry->account = account;
-    return PR_FALSE; // stop on first found account
+    return false; // stop on first found account
   }
-  return PR_TRUE;
+  return true;
 }
 
 NS_IMETHODIMP
 nsMsgAccountManager::FindAccountForServer(nsIMsgIncomingServer *server,
                                             nsIMsgAccount **aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
 
@@ -2090,46 +2090,46 @@ nsMsgAccountManager::GetIdentitiesForSer
 }
 
 bool
 nsMsgAccountManager::findIdentitiesForServer(nsISupports* element, void *aData)
 {
   nsresult rv;
   nsCOMPtr<nsIMsgAccount> account = do_QueryInterface(element, &rv);
   if (NS_FAILED(rv))
-    return PR_TRUE;
+    return true;
 
   findIdentitiesByServerEntry *entry = (findIdentitiesByServerEntry*)aData;
 
   nsCOMPtr<nsIMsgIncomingServer> thisServer;
   rv = account->GetIncomingServer(getter_AddRefs(thisServer));
   if (NS_FAILED(rv))
-    return PR_TRUE;
+    return true;
 
   nsCString serverKey;
 //  NS_ASSERTION(thisServer, "thisServer is null");
   NS_ASSERTION(entry, "entry is null");
   NS_ASSERTION(entry->server, "entry->server is null");
   // if this happens, bail.
   if (!thisServer || !entry || !(entry->server))
-    return PR_TRUE;
+    return true;
 
   entry->server->GetKey(serverKey);
   nsCString thisServerKey;
   thisServer->GetKey(thisServerKey);
   if (serverKey.Equals(thisServerKey))
   {
     // add all these elements to the nsISupports array
     nsCOMPtr<nsISupportsArray> theseIdentities;
     rv = account->GetIdentities(getter_AddRefs(theseIdentities));
     if (NS_SUCCEEDED(rv))
       rv = entry->identities->AppendElements(theseIdentities);
   }
 
-  return PR_TRUE;
+  return true;
 }
 
 NS_IMETHODIMP
 nsMsgAccountManager::GetServersForIdentity(nsIMsgIdentity *identity,
                                            nsISupportsArray **_retval)
 {
   NS_ENSURE_ARG_POINTER(identity);
 
@@ -2152,17 +2152,17 @@ nsMsgAccountManager::GetServersForIdenti
 }
 
 bool
 nsMsgAccountManager::findServersForIdentity(nsISupports *element, void *aData)
 {
   nsresult rv;
   nsCOMPtr<nsIMsgAccount> account = do_QueryInterface(element, &rv);
   if (NS_FAILED(rv))
-    return PR_TRUE;
+    return true;
 
   findServersByIdentityEntry *entry = (findServersByIdentityEntry*)aData;
 
   nsCOMPtr<nsISupportsArray> identities;
   account->GetIdentities(getter_AddRefs(identities));
 
   PRUint32 idCount=0;
   identities->Count(&idCount);
@@ -2185,17 +2185,17 @@ nsMsgAccountManager::findServersForIdent
         if (thisServer && NS_SUCCEEDED(rv))
         {
           entry->servers->AppendElement(thisServer);
           break;
         }
       }
     }
   }
-  return PR_TRUE;
+  return true;
 }
 
 static PLDHashOperator
 hashAddListener(nsCStringHashKey::KeyType aKey, nsCOMPtr<nsIMsgIncomingServer>& aServer, void* aClosure)
 {
   nsIFolderListener* listener = (nsIFolderListener *) aClosure;
   nsresult rv;
   nsCOMPtr<nsIMsgFolder> rootFolder;
@@ -2480,60 +2480,60 @@ nsMsgAccountManager::OnStopRunningUrl(ns
       imapUrl->GetImapAction(&imapAction);
       switch(imapAction)
       {
         case nsIImapUrl::nsImapExpungeFolder:
           if (m_folderDoingCleanupInbox)
           {
             PR_CEnterMonitor(m_folderDoingCleanupInbox);
             PR_CNotifyAll(m_folderDoingCleanupInbox);
-            m_cleanupInboxInProgress = PR_FALSE;
+            m_cleanupInboxInProgress = false;
             PR_CExitMonitor(m_folderDoingCleanupInbox);
             m_folderDoingCleanupInbox=nsnull;   //reset to nsnull
           }
           break;
         case nsIImapUrl::nsImapDeleteAllMsgs:
           if (m_folderDoingEmptyTrash)
           {
             PR_CEnterMonitor(m_folderDoingEmptyTrash);
             PR_CNotifyAll(m_folderDoingEmptyTrash);
-            m_emptyTrashInProgress = PR_FALSE;
+            m_emptyTrashInProgress = false;
             PR_CExitMonitor(m_folderDoingEmptyTrash);
             m_folderDoingEmptyTrash = nsnull;  //reset to nsnull;
           }
           break;
         default:
           break;
        }
      }
    }
    return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgAccountManager::SetFolderDoingEmptyTrash(nsIMsgFolder *folder)
 {
   m_folderDoingEmptyTrash = folder;
-  m_emptyTrashInProgress = PR_TRUE;
+  m_emptyTrashInProgress = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgAccountManager::GetEmptyTrashInProgress(bool *bVal)
 {
   NS_ENSURE_ARG_POINTER(bVal);
   *bVal = m_emptyTrashInProgress;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgAccountManager::SetFolderDoingCleanupInbox(nsIMsgFolder *folder)
 {
   m_folderDoingCleanupInbox = folder;
-  m_cleanupInboxInProgress = PR_TRUE;
+  m_cleanupInboxInProgress = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgAccountManager::GetCleanupInboxInProgress(bool *bVal)
 {
   NS_ENSURE_ARG_POINTER(bVal);
   *bVal = m_cleanupInboxInProgress;
@@ -2565,17 +2565,17 @@ nsMsgAccountManager::GetChromePackageNam
 {
   nsresult rv;
   nsCOMPtr<nsICategoryManager> catman = do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
 
   nsCOMPtr<nsISimpleEnumerator> e;
   rv = catman->EnumerateCategory(MAILNEWS_ACCOUNTMANAGER_EXTENSIONS, getter_AddRefs(e));
   if(NS_SUCCEEDED(rv) && e) {
-    while (PR_TRUE) {
+    while (true) {
       nsCOMPtr<nsISupportsCString> catEntry;
       rv = e->GetNext(getter_AddRefs(catEntry));
       if (NS_FAILED(rv) || !catEntry)
         break;
 
       nsCAutoString entryString;
       rv = catEntry->GetData(entryString);
       if (NS_FAILED(rv))
@@ -2622,17 +2622,17 @@ private:
   nsRefPtr<VirtualFolderChangeListener> mVFChangeListener;
   nsCOMPtr<nsIMsgFolder> mFolder;
   nsCOMPtr<nsIMsgDatabase> mDB;
 };
 
 NS_IMPL_ISUPPORTS1(VirtualFolderChangeListener, nsIDBChangeListener)
 
 VirtualFolderChangeListener::VirtualFolderChangeListener() :
-  m_searchOnMsgStatus(PR_FALSE), m_batchingEvents(PR_FALSE)
+  m_searchOnMsgStatus(false), m_batchingEvents(false)
 {}
 
 nsresult VirtualFolderChangeListener::Init()
 {
   nsCOMPtr <nsIMsgDatabase> msgDB;
   nsCOMPtr <nsIDBFolderInfo> dbFolderInfo;
 
   nsresult rv = m_virtualFolder->GetDBFolderInfoAndDB(getter_AddRefs(dbFolderInfo), getter_AddRefs(msgDB));
@@ -2748,17 +2748,17 @@ VirtualFolderChangeListener::OnHdrProper
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (unreadDelta)
     dbFolderInfo->ChangeNumUnreadMessages(unreadDelta);
 
   if (newDelta)
   {
     PRInt32 numNewMessages;
-    m_virtualFolder->GetNumNewMessages(PR_FALSE, &numNewMessages);
+    m_virtualFolder->GetNumNewMessages(false, &numNewMessages);
     m_virtualFolder->SetNumNewMessages(numNewMessages + newDelta);
     m_virtualFolder->SetHasNewMessages(numNewMessages + newDelta > 0);
   }
 
   if (totalDelta)
   {
     dbFolderInfo->ChangeNumMessages(totalDelta);
     nsCString searchUri;
@@ -2769,22 +2769,22 @@ VirtualFolderChangeListener::OnHdrProper
     PostUpdateEvent(m_virtualFolder, virtDatabase);
 
   return NS_OK;
 }
 
 void VirtualFolderChangeListener::DecrementNewMsgCount()
 {
   PRInt32 numNewMessages;
-  m_virtualFolder->GetNumNewMessages(PR_FALSE, &numNewMessages);
+  m_virtualFolder->GetNumNewMessages(false, &numNewMessages);
   if (numNewMessages > 0)
     numNewMessages--;
   m_virtualFolder->SetNumNewMessages(numNewMessages);
   if (!numNewMessages)
-    m_virtualFolder->SetHasNewMessages(PR_FALSE);
+    m_virtualFolder->SetHasNewMessages(false);
 }
 
 NS_IMETHODIMP VirtualFolderChangeListener::OnHdrFlagsChanged(nsIMsgDBHdr *aHdrChanged, PRUint32 aOldFlags, PRUint32 aNewFlags, nsIDBChangeListener *aInstigator)
 {
   nsCOMPtr <nsIMsgDatabase> msgDB;
 
   nsresult rv = m_folderWatching->GetMsgDatabase(getter_AddRefs(msgDB));
   bool oldMatch = false, newMatch = false;
@@ -2886,25 +2886,25 @@ NS_IMETHODIMP VirtualFolderChangeListene
     bool msgHdrIsRead;
     aHdrDeleted->GetIsRead(&msgHdrIsRead);
     if (!msgHdrIsRead)
       dbFolderInfo->ChangeNumUnreadMessages(-1);
     dbFolderInfo->ChangeNumMessages(-1);
     if (aFlags & nsMsgMessageFlags::New)
     {
       PRInt32 numNewMessages;
-      m_virtualFolder->GetNumNewMessages(PR_FALSE, &numNewMessages);
+      m_virtualFolder->GetNumNewMessages(false, &numNewMessages);
       m_virtualFolder->SetNumNewMessages(numNewMessages - 1);
       if (numNewMessages == 1)
-        m_virtualFolder->SetHasNewMessages(PR_FALSE);
+        m_virtualFolder->SetHasNewMessages(false);
     }
 
     nsCString searchUri;
     m_virtualFolder->GetURI(searchUri);
-    msgDB->UpdateHdrInCache(searchUri.get(), aHdrDeleted, PR_FALSE);
+    msgDB->UpdateHdrInCache(searchUri.get(), aHdrDeleted, false);
 
     PostUpdateEvent(m_virtualFolder, virtDatabase);
   }
   return rv;
 }
 
 NS_IMETHODIMP VirtualFolderChangeListener::OnHdrAdded(nsIMsgDBHdr *aNewHdr, nsMsgKey aParentKey, PRInt32 aFlags, nsIDBChangeListener *aInstigator)
 {
@@ -2930,23 +2930,23 @@ NS_IMETHODIMP VirtualFolderChangeListene
     PRUint32 msgFlags;
     aNewHdr->GetIsRead(&msgHdrIsRead);
     aNewHdr->GetFlags(&msgFlags);
     if (!msgHdrIsRead)
       dbFolderInfo->ChangeNumUnreadMessages(1);
     if (msgFlags & nsMsgMessageFlags::New)
     {
       PRInt32 numNewMessages;
-      m_virtualFolder->GetNumNewMessages(PR_FALSE, &numNewMessages);
-      m_virtualFolder->SetHasNewMessages(PR_TRUE);
+      m_virtualFolder->GetNumNewMessages(false, &numNewMessages);
+      m_virtualFolder->SetHasNewMessages(true);
       m_virtualFolder->SetNumNewMessages(numNewMessages + 1);
     }
     nsCString searchUri;
     m_virtualFolder->GetURI(searchUri);
-    msgDB->UpdateHdrInCache(searchUri.get(), aNewHdr, PR_TRUE);
+    msgDB->UpdateHdrInCache(searchUri.get(), aNewHdr, true);
     dbFolderInfo->ChangeNumMessages(1);
     PostUpdateEvent(m_virtualFolder, virtDatabase);
   }
   return rv;
 }
 
 NS_IMETHODIMP VirtualFolderChangeListener::OnParentChanged(nsMsgKey aKeyChanged, nsMsgKey oldParent, nsMsgKey newParent, nsIDBChangeListener *aInstigator)
 {
@@ -2978,26 +2978,26 @@ NS_IMETHODIMP VirtualFolderChangeListene
   return NS_OK;
 }
 
 nsresult VirtualFolderChangeListener::PostUpdateEvent(nsIMsgFolder *virtualFolder,
                                                   nsIMsgDatabase *virtDatabase)
 {
   if (m_batchingEvents)
     return NS_OK;
-  m_batchingEvents = PR_TRUE;
+  m_batchingEvents = true;
   nsCOMPtr<nsIRunnable> event = new VFChangeListenerEvent(this, virtualFolder,
                                                           virtDatabase);
   return NS_DispatchToCurrentThread(event);
 }
 
 void VirtualFolderChangeListener::ProcessUpdateEvent(nsIMsgFolder *virtFolder,
                                                      nsIMsgDatabase *virtDB)
 {
-  m_batchingEvents = PR_FALSE;
+  m_batchingEvents = false;
   virtFolder->UpdateSummaryTotals(true); // force update from db.
   virtDB->Commit(nsMsgDBCommitType::kLargeCommit);
 }
 
 nsresult nsMsgAccountManager::GetVirtualFoldersFile(nsCOMPtr<nsILocalFile>& file)
 {
   nsCOMPtr<nsIFile> profileDir;
   nsresult rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(profileDir));
@@ -3014,27 +3014,27 @@ NS_IMETHODIMP nsMsgAccountManager::LoadV
   nsCOMPtr <nsILocalFile> file;
   GetVirtualFoldersFile(file);
   if (!file)
     return NS_ERROR_FAILURE;
 
   if (m_virtualFoldersLoaded)
     return NS_OK;
 
-  m_loadingVirtualFolders = PR_TRUE;
+  m_loadingVirtualFolders = true;
 
   nsresult rv;
   nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
   if (msgDBService)
   {
      NS_ENSURE_SUCCESS(rv, rv);
      nsCOMPtr<nsIFileInputStream> fileStream = do_CreateInstance(NS_LOCALFILEINPUTSTREAM_CONTRACTID, &rv);
      NS_ENSURE_SUCCESS(rv, rv);
 
-     rv = fileStream->Init(file,  PR_RDONLY, 0664, PR_FALSE);
+     rv = fileStream->Init(file,  PR_RDONLY, 0664, false);
      nsCOMPtr <nsILineInputStream> lineInputStream(do_QueryInterface(fileStream));
 
     bool isMore = true;
     nsCAutoString buffer;
     PRInt32 version = -1;
     nsCOMPtr <nsIMsgFolder> virtualFolder;
     nsCOMPtr <nsIDBFolderInfo> dbFolderInfo;
     nsCOMPtr<nsIRDFResource> resource;
@@ -3146,18 +3146,18 @@ NS_IMETHODIMP nsMsgAccountManager::LoadV
         {
           buffer.Cut(0, SEARCH_FOLDER_FLAG_LEN + 1);
           dbFolderInfo->SetCharProperty(SEARCH_FOLDER_FLAG, buffer);
         }
       }
     }
   }
 
-  m_loadingVirtualFolders = PR_FALSE;
-  m_virtualFoldersLoaded = PR_TRUE;
+  m_loadingVirtualFolders = false;
+  m_virtualFoldersLoaded = true;
   return rv;
 }
 
 NS_IMETHODIMP nsMsgAccountManager::SaveVirtualFolders()
 {
   if (!m_virtualFoldersLoaded)
     return NS_OK;
   nsIOutputStream *outputStream = nsnull;
@@ -3212,17 +3212,17 @@ nsMsgAccountManager::saveVirtualFolders(
         rv = msgFolder->GetDBFolderInfoAndDB(getter_AddRefs(dbFolderInfo), getter_AddRefs(db)); // force db to get created.
         if (dbFolderInfo)
         {
           nsCString srchFolderUri;
           nsCString searchTerms;
           nsCString regexScope;
           nsCString vfFolderFlag;
           bool searchOnline = false;
-          dbFolderInfo->GetBooleanProperty("searchOnline", PR_FALSE, &searchOnline);
+          dbFolderInfo->GetBooleanProperty("searchOnline", false, &searchOnline);
           dbFolderInfo->GetCharProperty(kSearchFolderUriProp, srchFolderUri);
           dbFolderInfo->GetCharProperty("searchStr", searchTerms);
           // logically searchFolderFlag is an int, but since we want to
           // write out a string, get it as a string.
           dbFolderInfo->GetCharProperty(SEARCH_FOLDER_FLAG, vfFolderFlag);
           folderRes->GetValueConst(&uri);
           if (!srchFolderUri.IsEmpty() && !searchTerms.IsEmpty())
           {
@@ -3374,17 +3374,17 @@ NS_IMETHODIMP nsMsgAccountManager::GetAl
   rv = allDescendents->Count(&folderCount);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Create an nsIMutableArray from the nsISupportsArray
   nsCOMPtr<nsIMsgFolder> folder;
   for (i = 0; i < folderCount; i++)
   {
     folder = do_QueryElementAt(allDescendents, i);
-    folderArray->AppendElement(folder, PR_FALSE);
+    folderArray->AppendElement(folder, false);
   }
   NS_ADDREF(*aAllFolders = folderArray);
   return rv;
 }
 
 NS_IMETHODIMP nsMsgAccountManager::OnItemAdded(nsIMsgFolder *parentItem, nsISupports *item)
 {
   nsCOMPtr<nsIMsgFolder> folder = do_QueryInterface(item);
@@ -3393,41 +3393,41 @@ NS_IMETHODIMP nsMsgAccountManager::OnIte
     return NS_OK;
 
   PRUint32 folderFlags;
   folder->GetFlags(&folderFlags);
   bool addToSmartFolders = false;
   folder->IsSpecialFolder(nsMsgFolderFlags::Inbox |
                           nsMsgFolderFlags::Templates |
                           nsMsgFolderFlags::Trash |
-                          nsMsgFolderFlags::Drafts, PR_FALSE,
+                          nsMsgFolderFlags::Drafts, false,
                           &addToSmartFolders);
   // For Sent/Archives/Trash, we treat sub-folders of those folders as
   // "special", and want to add them the smart folders search scope.
   // So we check if this is a sub-folder of one of those special folders
   // and set the corresponding folderFlag if so.
   if (!addToSmartFolders)
   {
     bool isSpecial = false;
-    folder->IsSpecialFolder(nsMsgFolderFlags::SentMail, PR_TRUE, &isSpecial);
+    folder->IsSpecialFolder(nsMsgFolderFlags::SentMail, true, &isSpecial);
     if (isSpecial)
     {
-      addToSmartFolders = PR_TRUE;
+      addToSmartFolders = true;
       folderFlags |= nsMsgFolderFlags::SentMail;
     }
-    folder->IsSpecialFolder(nsMsgFolderFlags::Archive, PR_TRUE, &isSpecial);
+    folder->IsSpecialFolder(nsMsgFolderFlags::Archive, true, &isSpecial);
     if (isSpecial)
     {
-      addToSmartFolders = PR_TRUE;
+      addToSmartFolders = true;
       folderFlags |= nsMsgFolderFlags::Archive;
     }
-    folder->IsSpecialFolder(nsMsgFolderFlags::Trash, PR_TRUE, &isSpecial);
+    folder->IsSpecialFolder(nsMsgFolderFlags::Trash, true, &isSpecial);
     if (isSpecial)
     {
-      addToSmartFolders = PR_TRUE;
+      addToSmartFolders = true;
       folderFlags |= nsMsgFolderFlags::Trash;
     }
   }
   nsresult rv = NS_OK;
   // if this is a special folder, check if we have a saved search over
   // folders with this flag, and if so, add this folder to the scope.
   if (addToSmartFolders)
   {
@@ -3580,17 +3580,17 @@ NS_IMETHODIMP nsMsgAccountManager::OnIte
           dbFolderInfo = nsnull;
 
           nsCOMPtr<nsIMsgFolder> parent;
           rv = savedSearch->GetParent(getter_AddRefs(parent));
           NS_ENSURE_SUCCESS(rv, rv);
 
           if (!parent)
             continue;
-          parent->PropagateDelete(savedSearch, PR_TRUE, nsnull);
+          parent->PropagateDelete(savedSearch, true, nsnull);
         }
         else
         {
         // remove leading '|' we added (or one after |folderURI, if first URI)
           searchURI.Cut(0, 1);
           dbFolderInfo->SetCharProperty(kSearchFolderUriProp, searchURI);
         }
       }
--- a/mailnews/base/src/nsMsgAccountManagerDS.cpp
+++ b/mailnews/base/src/nsMsgAccountManagerDS.cpp
@@ -364,17 +364,17 @@ nsMsgAccountManagerDataSource::GetTarget
         const char *sourceValue;
         rv = source->GetValueConst(&sourceValue);
         NS_ENSURE_SUCCESS(rv,rv);
 
         // make sure the pointer math we're about to do is safe.
         NS_ENSURE_TRUE(sourceValue && (strlen(sourceValue) > strlen(NC_RDF_PAGETITLE_PREFIX)), NS_ERROR_UNEXPECTED);
 
         nsCOMPtr<nsIMsgAccountManager> am = do_QueryReferent(mAccountManager, &rv);
-        NS_ENSURE_SUCCESS(rv, PR_FALSE);
+        NS_ENSURE_SUCCESS(rv, false);
 
         // turn NC#PageTitlefoobar into foobar, so we can get the am-foobar.properties bundle
         nsCString chromePackageName;
         rv = am->GetChromePackageName(nsCString(sourceValue + strlen(NC_RDF_PAGETITLE_PREFIX)), chromePackageName);
         NS_ENSURE_SUCCESS(rv,rv);
 
         nsCAutoString bundleURL;
         bundleURL = "chrome://";
@@ -649,17 +649,17 @@ nsMsgAccountManagerDataSource::appendGen
   nsresult rv;
 
   nsCOMPtr<nsICategoryManager> catman = do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
 
   nsCOMPtr<nsISimpleEnumerator> e;
   rv = catman->EnumerateCategory(MAILNEWS_ACCOUNTMANAGER_EXTENSIONS, getter_AddRefs(e));
   if(NS_SUCCEEDED(rv) && e) {
-    while (PR_TRUE) {
+    while (true) {
       nsCOMPtr<nsISupportsCString> catEntry;
       rv = e->GetNext(getter_AddRefs(catEntry));
       if (NS_FAILED(rv) || !catEntry)
         break;
 
       nsCAutoString entryString;
       rv = catEntry->GetData(entryString);
       if (NS_FAILED(rv))
@@ -770,105 +770,105 @@ nsMsgAccountManagerDataSource::createSet
   return NS_OK;
 }
 
 nsresult
 nsMsgAccountManagerDataSource::serverHasIdentities(nsIMsgIncomingServer* aServer,
                                                    bool *aResult)
 {
   nsresult rv;
-  *aResult = PR_FALSE;
+  *aResult = false;
 
   nsCOMPtr<nsIMsgAccountManager> am = do_QueryReferent(mAccountManager, &rv);
 
   if (NS_FAILED(rv)) return rv;
 
   nsCOMPtr<nsISupportsArray> identities;
   rv = am->GetIdentitiesForServer(aServer, getter_AddRefs(identities));
 
   // no identities just means no arcs
   if (NS_FAILED(rv)) return NS_OK;
 
   PRUint32 count;
   rv = identities->Count(&count);
   if (NS_FAILED(rv)) return NS_OK;
 
   if (count >0)
-    *aResult = PR_TRUE;
+    *aResult = true;
   return NS_OK;
 }
 
 // enumeration function to convert each server (element)
 // to an nsIRDFResource and append it to the array (in data)
-// always return PR_TRUE to try on every element instead of aborting early
+// always return true to try on every element instead of aborting early
 bool
 nsMsgAccountManagerDataSource::createServerResources(nsISupports *element,
                                                      void *data)
 {
   nsresult rv;
   // get parameters out of the data argument
   serverCreationParams *params = (serverCreationParams*)data;
   nsCOMArray<nsIRDFResource> *servers = params->serverArray;
   nsCOMPtr<nsIRDFService> rdf = params->rdfService;
 
   // the server itself is in the element argument
   nsCOMPtr<nsIMsgIncomingServer> server = do_QueryInterface(element, &rv);
-  if (NS_FAILED(rv)) return PR_TRUE;
+  if (NS_FAILED(rv)) return true;
 
   nsCOMPtr <nsIMsgFolder> serverFolder;
   rv = server->GetRootFolder(getter_AddRefs(serverFolder));
-  if(NS_FAILED(rv)) return PR_TRUE;
+  if(NS_FAILED(rv)) return true;
 
   // add the resource to the array
   nsCOMPtr<nsIRDFResource> serverResource = do_QueryInterface(serverFolder);
   if(serverResource)
     (void) servers->AppendObject(serverResource);
-  return PR_TRUE;
+  return true;
 }
 
 nsresult
 nsMsgAccountManagerDataSource::getAccountArcs(nsIMutableArray **aResult)
 {
   nsresult rv;
   if (!mAccountArcsOut) {
     mAccountArcsOut = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    mAccountArcsOut->AppendElement(kNC_Settings, PR_FALSE);
-    mAccountArcsOut->AppendElement(kNC_Name, PR_FALSE);
-    mAccountArcsOut->AppendElement(kNC_FolderTreeName, PR_FALSE);
-    mAccountArcsOut->AppendElement(kNC_FolderTreeSimpleName, PR_FALSE);
-    mAccountArcsOut->AppendElement(kNC_NameSort, PR_FALSE);
-    mAccountArcsOut->AppendElement(kNC_FolderTreeNameSort, PR_FALSE);
-    mAccountArcsOut->AppendElement(kNC_PageTag, PR_FALSE);
+    mAccountArcsOut->AppendElement(kNC_Settings, false);
+    mAccountArcsOut->AppendElement(kNC_Name, false);
+    mAccountArcsOut->AppendElement(kNC_FolderTreeName, false);
+    mAccountArcsOut->AppendElement(kNC_FolderTreeSimpleName, false);
+    mAccountArcsOut->AppendElement(kNC_NameSort, false);
+    mAccountArcsOut->AppendElement(kNC_FolderTreeNameSort, false);
+    mAccountArcsOut->AppendElement(kNC_PageTag, false);
   }
 
   *aResult = mAccountArcsOut;
   NS_IF_ADDREF(*aResult);
   return NS_OK;
 }
 
 nsresult
 nsMsgAccountManagerDataSource::getAccountRootArcs(nsIMutableArray **aResult)
 {
   nsresult rv;
   if (!mAccountRootArcsOut) {
     mAccountRootArcsOut = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    mAccountRootArcsOut->AppendElement(kNC_Server, PR_FALSE);
-    mAccountRootArcsOut->AppendElement(kNC_Child, PR_FALSE);
+    mAccountRootArcsOut->AppendElement(kNC_Server, false);
+    mAccountRootArcsOut->AppendElement(kNC_Child, false);
 
-    mAccountRootArcsOut->AppendElement(kNC_Settings, PR_FALSE);
-    mAccountRootArcsOut->AppendElement(kNC_Name, PR_FALSE);
-    mAccountRootArcsOut->AppendElement(kNC_FolderTreeName, PR_FALSE);
-    mAccountRootArcsOut->AppendElement(kNC_FolderTreeSimpleName, PR_FALSE);
-    mAccountRootArcsOut->AppendElement(kNC_NameSort, PR_FALSE);
-    mAccountRootArcsOut->AppendElement(kNC_FolderTreeNameSort, PR_FALSE);
-    mAccountRootArcsOut->AppendElement(kNC_PageTag, PR_FALSE);
+    mAccountRootArcsOut->AppendElement(kNC_Settings, false);
+    mAccountRootArcsOut->AppendElement(kNC_Name, false);
+    mAccountRootArcsOut->AppendElement(kNC_FolderTreeName, false);
+    mAccountRootArcsOut->AppendElement(kNC_FolderTreeSimpleName, false);
+    mAccountRootArcsOut->AppendElement(kNC_NameSort, false);
+    mAccountRootArcsOut->AppendElement(kNC_FolderTreeNameSort, false);
+    mAccountRootArcsOut->AppendElement(kNC_PageTag, false);
   }
 
   *aResult = mAccountRootArcsOut;
   NS_IF_ADDREF(*aResult);
   return NS_OK;
 }
 
 NS_IMETHODIMP
@@ -880,31 +880,31 @@ nsMsgAccountManagerDataSource::HasArcOut
     // we only have settings for local folders and servers with identities
     nsCOMPtr<nsIMsgIncomingServer> server;
     rv = getServerForFolderNode(source, getter_AddRefs(server));
     if (server) {
       // Check the offline capability before adding arc
       PRInt32 offlineSupportLevel = 0;
       (void) server->GetOfflineSupportLevel(&offlineSupportLevel);
       if (offlineSupportLevel >= OFFLINE_SUPPORT_LEVEL_REGULAR) {
-        *result = PR_TRUE;
+        *result = true;
         return NS_OK;
       }
 
       bool supportsDiskSpace;
       (void) server->GetSupportsDiskSpace(&supportsDiskSpace);
       if (supportsDiskSpace) {
-        *result = PR_TRUE;
+        *result = true;
         return NS_OK;
       }
       return serverHasIdentities(server, result);
     }
   }
 
-  *result = PR_FALSE;
+  *result = false;
   return NS_OK;
 }
 
 /* nsISimpleEnumerator ArcLabelsOut (in nsIRDFResource aSource); */
 NS_IMETHODIMP
 nsMsgAccountManagerDataSource::ArcLabelsOut(nsIRDFResource *source,
                                             nsISimpleEnumerator **_retval)
 {
@@ -978,90 +978,90 @@ nsMsgAccountManagerDataSource::HasAssert
     *_retval = (aTarget == kTrueLiteral) ? isDefaultServer(aServer) : !isDefaultServer(aServer);
   else if (aProperty == kNC_SupportsFilters)
     *_retval = (aTarget == kTrueLiteral) ? supportsFilters(aServer) : !supportsFilters(aServer);
   else if (aProperty == kNC_CanGetMessages)
    *_retval = (aTarget == kTrueLiteral) ? canGetMessages(aServer) : !canGetMessages(aServer);
   else if (aProperty == kNC_CanGetIncomingMessages)
     *_retval = (aTarget == kTrueLiteral) ? canGetIncomingMessages(aServer) : !canGetIncomingMessages(aServer);
   else
-    *_retval = PR_FALSE;
+    *_retval = false;
   return NS_OK;
 }
 
 bool
 nsMsgAccountManagerDataSource::isDefaultServer(nsIMsgIncomingServer *aServer)
 {
   nsresult rv;
-  if (!aServer) return PR_FALSE;
+  if (!aServer) return false;
 
   nsCOMPtr<nsIMsgAccountManager> am = do_QueryReferent(mAccountManager, &rv);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   nsCOMPtr<nsIMsgAccount> defaultAccount;
   rv = am->GetDefaultAccount(getter_AddRefs(defaultAccount));
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
-  if (!defaultAccount) return PR_FALSE;
+  NS_ENSURE_SUCCESS(rv, false);
+  if (!defaultAccount) return false;
 
   // in some weird case that there is no default and they asked
   // for the default
   nsCOMPtr<nsIMsgIncomingServer> defaultServer;
   rv = defaultAccount->GetIncomingServer(getter_AddRefs(defaultServer));
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
-  if (!defaultServer) return PR_FALSE;
+  NS_ENSURE_SUCCESS(rv, false);
+  if (!defaultServer) return false;
 
   bool isEqual;
   rv = defaultServer->Equals(aServer, &isEqual);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   return isEqual;
 }
 
 
 bool
 nsMsgAccountManagerDataSource::supportsFilters(nsIMsgIncomingServer *aServer)
 {
   bool supportsFilters;
   nsresult rv = aServer->GetCanHaveFilters(&supportsFilters);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   return supportsFilters;
 }
 
 bool
 nsMsgAccountManagerDataSource::canGetMessages(nsIMsgIncomingServer *aServer)
 {
   nsCString type;
   nsresult rv = aServer->GetType(type);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   nsCAutoString contractid(NS_MSGPROTOCOLINFO_CONTRACTID_PREFIX);
   contractid.Append(type);
 
   nsCOMPtr<nsIMsgProtocolInfo> protocolInfo = do_GetService(contractid.get(), &rv);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   bool canGetMessages = false;
   protocolInfo->GetCanGetMessages(&canGetMessages);
 
   return canGetMessages;
 }
 
 bool
 nsMsgAccountManagerDataSource::canGetIncomingMessages(nsIMsgIncomingServer *aServer)
 {
   nsCString type;
   nsresult rv = aServer->GetType(type);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   nsCAutoString contractid(NS_MSGPROTOCOLINFO_CONTRACTID_PREFIX);
   contractid.Append(type);
 
   nsCOMPtr<nsIMsgProtocolInfo> protocolInfo = do_GetService(contractid.get(), &rv);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   bool canGetIncomingMessages = false;
   protocolInfo->GetCanGetIncomingMessages(&canGetIncomingMessages);
 
   return canGetIncomingMessages;
 }
 
 nsresult
@@ -1069,17 +1069,17 @@ nsMsgAccountManagerDataSource::HasAssert
                                                        nsIRDFNode *aTarget,
                                                        bool aTruthValue,
                                                        bool *_retval)
 {
 
   nsresult rv;
 
   // set up default
-  *_retval = PR_FALSE;
+  *_retval = false;
 
   // for child and settings arcs, just make sure it's a valid server:
   if (isContainment(aProperty)) {
 
     nsCOMPtr<nsIMsgIncomingServer> server;
     rv = getServerForFolderNode(aTarget, getter_AddRefs(server));
     if (NS_FAILED(rv) || !server) return rv;
 
@@ -1090,33 +1090,33 @@ nsMsgAccountManagerDataSource::HasAssert
     if (NS_FAILED(rv)) return rv;
 
     nsCOMPtr<nsISupportsArray> serverArray;
     rv = am->GetAllServers(getter_AddRefs(serverArray));
     if (NS_FAILED(rv)) return rv;
 
     findServerByKeyEntry entry;
     entry.serverKey = serverKey;
-    entry.found = PR_FALSE;
+    entry.found = false;
 
     serverArray->EnumerateForwards(findServerByKey, &entry);
     (*_retval) = entry.found;
   }
 
   return NS_OK;
 }
 
 bool
 nsMsgAccountManagerDataSource::isContainment(nsIRDFResource *aProperty)
 {
 
   if (aProperty == kNC_Child ||
       aProperty == kNC_Settings)
-    return PR_TRUE;
-  return PR_FALSE;
+    return true;
+  return false;
 }
 
 // returns failure if the object is not a root server
 nsresult
 nsMsgAccountManagerDataSource::getServerForFolderNode(nsIRDFNode *aResource,
                                                       nsIMsgIncomingServer **aResult)
 {
   nsresult rv;
@@ -1134,27 +1134,27 @@ nsMsgAccountManagerDataSource::getServer
 bool
 nsMsgAccountManagerDataSource::findServerByKey(nsISupports *aElement,
                                                void *aData)
 {
   nsresult rv;
   findServerByKeyEntry *entry = (findServerByKeyEntry*)aData;
 
   nsCOMPtr<nsIMsgIncomingServer> server = do_QueryInterface(aElement, &rv);
-  if (NS_FAILED(rv)) return PR_TRUE;
+  if (NS_FAILED(rv)) return true;
 
   nsCString key;
   server->GetKey(key);
   if (key.Equals(entry->serverKey))
   {
-    entry->found = PR_TRUE;
-    return PR_FALSE;        // stop when found
+    entry->found = true;
+    return false;        // stop when found
   }
 
-  return PR_TRUE;
+  return true;
 }
 
 nsresult
 nsMsgAccountManagerDataSource::getStringBundle()
 {
   if (mStringBundle) return NS_OK;
 
   nsresult rv;
@@ -1172,35 +1172,35 @@ nsMsgAccountManagerDataSource::OnServerL
 {
   nsCOMPtr<nsIMsgFolder> serverFolder;
   nsresult rv = aServer->GetRootFolder(getter_AddRefs(serverFolder));
   if (NS_FAILED(rv)) return rv;
 
   nsCOMPtr<nsIRDFResource> serverResource = do_QueryInterface(serverFolder,&rv);
   if (NS_FAILED(rv)) return rv;
 
-  NotifyObservers(kNC_AccountRoot, kNC_Child, serverResource, nsnull, PR_TRUE, PR_FALSE);
-  NotifyObservers(kNC_AccountRoot, kNC_Settings, serverResource, nsnull, PR_TRUE, PR_FALSE);
+  NotifyObservers(kNC_AccountRoot, kNC_Child, serverResource, nsnull, true, false);
+  NotifyObservers(kNC_AccountRoot, kNC_Settings, serverResource, nsnull, true, false);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgAccountManagerDataSource::OnServerUnloaded(nsIMsgIncomingServer* aServer)
 {
   nsCOMPtr<nsIMsgFolder> serverFolder;
   nsresult rv = aServer->GetRootFolder(getter_AddRefs(serverFolder));
   if (NS_FAILED(rv)) return rv;
 
   nsCOMPtr<nsIRDFResource> serverResource = do_QueryInterface(serverFolder,&rv);
   if (NS_FAILED(rv)) return rv;
 
 
-  NotifyObservers(kNC_AccountRoot, kNC_Child, serverResource, nsnull, PR_FALSE, PR_FALSE);
-  NotifyObservers(kNC_AccountRoot, kNC_Settings, serverResource, nsnull, PR_FALSE, PR_FALSE);
+  NotifyObservers(kNC_AccountRoot, kNC_Child, serverResource, nsnull, false, false);
+  NotifyObservers(kNC_AccountRoot, kNC_Settings, serverResource, nsnull, false, false);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgAccountManagerDataSource::OnServerChanged(nsIMsgIncomingServer *server)
 {
   return NS_OK;
@@ -1240,17 +1240,17 @@ nsMsgAccountManagerDataSource::OnItemAdd
 nsresult
 nsMsgAccountManagerDataSource::OnItemBoolPropertyChanged(nsIMsgFolder *aItem,
                                                          nsIAtom *aProperty,
                                                          bool aOldValue,
                                                          bool aNewValue)
 {
   if (aProperty == kDefaultServerAtom) {
     nsCOMPtr<nsIRDFResource> resource(do_QueryInterface(aItem));
-    NotifyObservers(resource, kNC_IsDefaultServer, kTrueLiteral, nsnull, aNewValue, PR_FALSE);
+    NotifyObservers(resource, kNC_IsDefaultServer, kTrueLiteral, nsnull, aNewValue, false);
   }
   return NS_OK;
 }
 
 nsresult
 nsMsgAccountManagerDataSource::OnItemEvent(nsIMsgFolder *, nsIAtom *)
 {
   return NS_OK;
--- a/mailnews/base/src/nsMsgBiffManager.cpp
+++ b/mailnews/base/src/nsMsgBiffManager.cpp
@@ -66,18 +66,18 @@ NS_IMPL_ISUPPORTS4(nsMsgBiffManager, nsI
 void OnBiffTimer(nsITimer *timer, void *aBiffManager)
 {
   nsMsgBiffManager *biffManager = (nsMsgBiffManager*)aBiffManager;
   biffManager->PerformBiff();
 }
 
 nsMsgBiffManager::nsMsgBiffManager()
 {
-  mHaveShutdown = PR_FALSE;
-  mInited = PR_FALSE;
+  mHaveShutdown = false;
+  mInited = false;
 }
 
 nsMsgBiffManager::~nsMsgBiffManager()
 {
   if (mBiffTimer)
     mBiffTimer->Cancel();
 
   if (!mHaveShutdown)
@@ -93,44 +93,44 @@ nsMsgBiffManager::~nsMsgBiffManager()
   }
 }
 
 NS_IMETHODIMP nsMsgBiffManager::Init()
 {
   if (mInited)
     return NS_OK;
 
-  mInited = PR_TRUE;
+  mInited = true;
   nsresult rv;
 
   nsCOMPtr<nsIMsgAccountManager> accountManager = 
   do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
   if (NS_SUCCEEDED(rv))
     accountManager->AddIncomingServerListener(this);
 
   // in turbo mode on profile change we don't need to do anything below this
   if (mHaveShutdown)
   {
-    mHaveShutdown = PR_FALSE;
+    mHaveShutdown = false;
     return NS_OK;
   }
 
   // Ensure status bar biff service has started
   nsCOMPtr<nsIFolderListener> statusBarBiffService = 
     do_GetService(kStatusBarBiffManagerCID, &rv);
 
   if (!MsgBiffLogModule)
     MsgBiffLogModule = PR_NewLogModule("MsgBiff");
 
   nsCOMPtr<nsIObserverService> observerService =
            do_GetService("@mozilla.org/observer-service;1", &rv);
   if (NS_SUCCEEDED(rv))
   {
-    observerService->AddObserver(this, "sleep_notification", PR_TRUE);
-    observerService->AddObserver(this, "wake_notification", PR_TRUE);
+    observerService->AddObserver(this, "sleep_notification", true);
+    observerService->AddObserver(this, "wake_notification", true);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgBiffManager::Shutdown()
 {
   if (mBiffTimer) 
   {
@@ -139,18 +139,18 @@ NS_IMETHODIMP nsMsgBiffManager::Shutdown
   }
 
   nsresult rv;
   nsCOMPtr<nsIMsgAccountManager> accountManager =
     do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
   if (NS_SUCCEEDED(rv))
     accountManager->RemoveIncomingServerListener(this);
 
-  mHaveShutdown = PR_TRUE;
-  mInited = PR_FALSE;
+  mHaveShutdown = true;
+  mInited = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgBiffManager::Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *someData)
 {
   if (!strcmp(aTopic, "sleep_notification") && mBiffTimer)
   {
     mBiffTimer->Cancel();
--- a/mailnews/base/src/nsMsgContentPolicy.cpp
+++ b/mailnews/base/src/nsMsgContentPolicy.cpp
@@ -74,18 +74,18 @@ static const char kTrustedDomains[] =  "
 NS_IMPL_ISUPPORTS4(nsMsgContentPolicy, 
                    nsIContentPolicy,
                    nsIWebProgressListener,
                    nsIObserver,
                    nsISupportsWeakReference)
 
 nsMsgContentPolicy::nsMsgContentPolicy()
 {
-  mAllowPlugins = PR_FALSE;
-  mBlockRemoteImages = PR_TRUE;
+  mAllowPlugins = false;
+  mBlockRemoteImages = true;
 }
 
 nsMsgContentPolicy::~nsMsgContentPolicy()
 {
   // hey, we are going away...clean up after ourself....unregister our observer
   nsresult rv;
   nsCOMPtr<nsIPrefBranch2> prefInternal = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
   if (NS_SUCCEEDED(rv))
@@ -98,80 +98,80 @@ nsMsgContentPolicy::~nsMsgContentPolicy(
 nsresult nsMsgContentPolicy::Init()
 {
   nsresult rv;
 
   // register ourself as an observer on the mail preference to block remote images
   nsCOMPtr<nsIPrefBranch2> prefInternal = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  prefInternal->AddObserver(kBlockRemoteImages, this, PR_TRUE);
-  prefInternal->AddObserver(kAllowPlugins, this, PR_TRUE);
+  prefInternal->AddObserver(kBlockRemoteImages, this, true);
+  prefInternal->AddObserver(kAllowPlugins, this, true);
 
   prefInternal->GetBoolPref(kAllowPlugins, &mAllowPlugins);
   prefInternal->GetCharPref(kTrustedDomains, getter_Copies(mTrustedMailDomains));
   prefInternal->GetBoolPref(kBlockRemoteImages, &mBlockRemoteImages);
 
   return NS_OK;
 }
 
 /** 
  * returns true if the sender referenced by aMsgHdr is in one one of our local
  * address books and the user has explicitly allowed remote content for the sender
  */
 bool
 nsMsgContentPolicy::ShouldAcceptRemoteContentForSender(nsIMsgDBHdr *aMsgHdr)
 {
   if (!aMsgHdr)
-    return PR_FALSE;
+    return false;
 
   // extract the e-mail address from the msg hdr
   nsCString author;
   nsresult rv = aMsgHdr->GetAuthor(getter_Copies(author));
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   nsCOMPtr<nsIMsgHeaderParser> headerParser =
     do_GetService("@mozilla.org/messenger/headerparser;1", &rv);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   nsCString emailAddress; 
   rv = headerParser->ExtractHeaderAddressMailboxes(author, emailAddress);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   nsCOMPtr<nsIAbManager> abManager = do_GetService("@mozilla.org/abmanager;1",
                                                    &rv);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   nsCOMPtr<nsISimpleEnumerator> enumerator;
   rv = abManager->GetDirectories(getter_AddRefs(enumerator));
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   nsCOMPtr<nsISupports> supports;
   nsCOMPtr<nsIAbDirectory> directory;
   nsCOMPtr<nsIAbCard> cardForAddress;
   bool hasMore;
 
   while (NS_SUCCEEDED(enumerator->HasMoreElements(&hasMore)) && hasMore &&
          !cardForAddress)
   {
     rv = enumerator->GetNext(getter_AddRefs(supports));
-    NS_ENSURE_SUCCESS(rv, PR_FALSE);
+    NS_ENSURE_SUCCESS(rv, false);
     directory = do_QueryInterface(supports);
     if (directory)
     {
       rv = directory->CardForEmailAddress(emailAddress, getter_AddRefs(cardForAddress));
       if (NS_FAILED(rv) && rv != NS_ERROR_NOT_IMPLEMENTED)
-        return PR_FALSE;
+        return false;
     }
   }
   
   // If we found a card from the sender, check if the remote content property
   // is set to allow.
   if (!cardForAddress)
-    return PR_FALSE;
+    return false;
 
   bool allowForSender;
   cardForAddress->GetPropertyAsBool(kAllowRemoteContentProperty,
                                     &allowForSender);
   return allowForSender;
 }
 
 /**
@@ -348,82 +348,82 @@ nsMsgContentPolicy::ShouldLoad(PRUint32 
 /**
  * Determines if the requesting location is a safe one, i.e. its under the
  * app/user's control - so file, about, chrome etc.
  */
 bool
 nsMsgContentPolicy::IsSafeRequestingLocation(nsIURI *aRequestingLocation)
 {
   if (!aRequestingLocation)
-    return PR_FALSE;
+    return false;
 
   // if aRequestingLocation is chrome, resource about or file, allow
   // aContentLocation to load
   bool isChrome;
   bool isRes;
   bool isAbout;
   bool isFile;
 
   nsresult rv = aRequestingLocation->SchemeIs("chrome", &isChrome);
   rv |= aRequestingLocation->SchemeIs("resource", &isRes);
   rv |= aRequestingLocation->SchemeIs("file", &isFile);
 
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   if (isChrome || isRes || isFile)
-    return PR_TRUE;
+    return true;
 
   // Only allow about: to load anything if the requesting location is not the
   // special about:blank one.
   rv = aRequestingLocation->SchemeIs("about", &isAbout);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   if (!isAbout)
-    return PR_FALSE;
+    return false;
 
 
   nsCString fullSpec;
   rv = aRequestingLocation->GetSpec(fullSpec);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   return !fullSpec.EqualsLiteral("about:blank");
 }
 
 /**
  * Determines if the content location is a scheme that we're willing to expose
  * for unlimited loading of content.
  */
 bool
 nsMsgContentPolicy::IsExposedProtocol(nsIURI *aContentLocation)
 {
   nsCAutoString contentScheme;
   nsresult rv = aContentLocation->GetScheme(contentScheme);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   // If you are changing this list, you may need to also consider changing the
   // list of network.protocol-handler.expose.* prefs in all-thunderbird.js.
   if (MsgLowerCaseEqualsLiteral(contentScheme, "mailto") ||
       MsgLowerCaseEqualsLiteral(contentScheme, "news") ||
       MsgLowerCaseEqualsLiteral(contentScheme, "snews") ||
       MsgLowerCaseEqualsLiteral(contentScheme, "nntp") ||
       MsgLowerCaseEqualsLiteral(contentScheme, "imap") ||
       MsgLowerCaseEqualsLiteral(contentScheme, "addbook") ||
       MsgLowerCaseEqualsLiteral(contentScheme, "pop") ||
       MsgLowerCaseEqualsLiteral(contentScheme, "mailbox") ||
       MsgLowerCaseEqualsLiteral(contentScheme, "about"))
-    return PR_TRUE;
+    return true;
 
   bool isData;
   bool isChrome;
   bool isRes;
   rv = aContentLocation->SchemeIs("chrome", &isChrome);
   rv |= aContentLocation->SchemeIs("resource", &isRes);
   rv |= aContentLocation->SchemeIs("data", &isData);
 
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   return isChrome || isRes || isData;
 }
 
 /**
  * We block most unexposed protocols - apart from http(s) and file.
  */
 bool
@@ -432,17 +432,17 @@ nsMsgContentPolicy::ShouldBlockUnexposed
   bool isHttp;
   bool isHttps;
   bool isFile;
   nsresult rv = aContentLocation->SchemeIs("http", &isHttp);
   rv |= aContentLocation->SchemeIs("https", &isHttps);
   rv |= aContentLocation->SchemeIs("file", &isFile);
 
   // Error condition - we must return true so that we block.
-  NS_ENSURE_SUCCESS(rv, PR_TRUE);
+  NS_ENSURE_SUCCESS(rv, true);
 
   return !isHttp && !isHttps && !isFile;
 }
 
 /**
  * The default for this function will be to reject the content request.
  * When determining if to allow the request for a given msg hdr, the function
  * will go through the list of remote content blocking criteria:
@@ -708,17 +708,17 @@ nsresult nsMsgContentPolicy::SetDisableI
   NS_ENSURE_SUCCESS(rv, rv);
 
   // we're only worried about policy settings in content docshells
   if (itemType != nsIDocShellTreeItem::typeContent) {
     return NS_OK;
   }
 
   // For messages, we must always disable javascript...
-  rv = docShell->SetAllowJavascript(PR_FALSE);
+  rv = docShell->SetAllowJavascript(false);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // ...and we allow plugins according to the mail specific preference.
   rv = docShell->SetAllowPlugins(mAllowPlugins);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
 }
@@ -861,30 +861,30 @@ nsMsgContentPolicy::OnLocationChange(nsI
                                         " do not point to the same docshell");
   }
 #endif
   
   nsCOMPtr<nsIMsgMessageUrl> messageUrl = do_QueryInterface(aLocation, &rv);
 
   if (NS_SUCCEEDED(rv)) {
     // Disable javascript on message URLs.
-    rv = docShell->SetAllowJavascript(PR_FALSE);
+    rv = docShell->SetAllowJavascript(false);
     NS_ASSERTION(NS_SUCCEEDED(rv),
                  "Failed to set javascript disabled on docShell");
     // Also disable plugins if the preference requires it.
     rv = docShell->SetAllowPlugins(mAllowPlugins);
     NS_ASSERTION(NS_SUCCEEDED(rv),
                  "Failed to set plugins disabled on docShell");
   }
   else {
     // Disable javascript and plugins are allowed on non-message URLs.
-    rv = docShell->SetAllowJavascript(PR_TRUE);
+    rv = docShell->SetAllowJavascript(true);
     NS_ASSERTION(NS_SUCCEEDED(rv),
                  "Failed to set javascript allowed on docShell");
-    rv = docShell->SetAllowPlugins(PR_TRUE);
+    rv = docShell->SetAllowPlugins(true);
     NS_ASSERTION(NS_SUCCEEDED(rv),
                  "Failed to set plugins allowed on docShell");
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
--- a/mailnews/base/src/nsMsgCopyService.cpp
+++ b/mailnews/base/src/nsMsgCopyService.cpp
@@ -51,47 +51,47 @@
 #include "nsServiceManagerUtils.h"
 #include "nsMsgUtils.h"
 
 static PRLogModuleInfo *gCopyServiceLog;
 
 // ******************** nsCopySource ******************
 //
 
-nsCopySource::nsCopySource() : m_processed(PR_FALSE)
+nsCopySource::nsCopySource() : m_processed(false)
 {
   MOZ_COUNT_CTOR(nsCopySource);
   m_messageArray = do_CreateInstance(NS_ARRAY_CONTRACTID);
 }
 
 nsCopySource::nsCopySource(nsIMsgFolder* srcFolder) :
-    m_processed(PR_FALSE)
+    m_processed(false)
 {
   MOZ_COUNT_CTOR(nsCopySource);
   m_messageArray = do_CreateInstance(NS_ARRAY_CONTRACTID);
   m_msgFolder = srcFolder;
 }
 
 nsCopySource::~nsCopySource()
 {
   MOZ_COUNT_DTOR(nsCopySource);
 }
 
 void nsCopySource::AddMessage(nsIMsgDBHdr* aMsg)
 {
-  m_messageArray->AppendElement(aMsg, PR_FALSE);
+  m_messageArray->AppendElement(aMsg, false);
 }
 
 // ************ nsCopyRequest *****************
 //
 
 nsCopyRequest::nsCopyRequest() :
     m_requestType(nsCopyMessagesType),
-    m_isMoveOrDraftOrTemplate(PR_FALSE),
-    m_processed(PR_FALSE),
+    m_isMoveOrDraftOrTemplate(false),
+    m_processed(false),
     m_newMsgFlags(0)
 {
   MOZ_COUNT_CTOR(nsCopyRequest);
 }
 
 nsCopyRequest::~nsCopyRequest()
 {
   MOZ_COUNT_DTOR(nsCopyRequest);
@@ -145,17 +145,17 @@ nsCopyRequest::Init(nsCopyRequestType ty
 nsCopySource*
 nsCopyRequest::AddNewCopySource(nsIMsgFolder* srcFolder)
 {
   nsCopySource* newSrc = new nsCopySource(srcFolder);
   if (newSrc)
   {
       m_copySourceArray.AppendElement(newSrc);
       if (srcFolder == m_dstFolder)
-        newSrc->m_processed = PR_TRUE;
+        newSrc->m_processed = true;
   }
   return newSrc;
 }
 
 // ************* nsMsgCopyService ****************
 //
 
 
@@ -249,37 +249,37 @@ nsMsgCopyService::ClearRequest(nsCopyReq
   return rv;
 }
 
 nsresult
 nsMsgCopyService::QueueRequest(nsCopyRequest* aRequest, bool *aCopyImmediately)
 {
   NS_ENSURE_ARG_POINTER(aRequest);
   NS_ENSURE_ARG_POINTER(aCopyImmediately);
-  *aCopyImmediately = PR_TRUE;
+  *aCopyImmediately = true;
   nsCopyRequest* copyRequest;
 
   PRUint32 cnt = m_copyRequests.Length();
   for (PRUint32 i = 0; i < cnt; i++)
   {
     copyRequest = m_copyRequests.ElementAt(i);
     if (aRequest->m_requestType == nsCopyFoldersType)
     {
       // For copy folder, see if both destination folder (root)
       // (ie, Local Folder) and folder name (ie, abc) are the same.
       if (copyRequest->m_dstFolderName == aRequest->m_dstFolderName &&
           copyRequest->m_dstFolder.get() == aRequest->m_dstFolder.get())
       {
-        *aCopyImmediately = PR_FALSE;
+        *aCopyImmediately = false;
         break;
       }
     }
     else if (copyRequest->m_dstFolder.get() == aRequest->m_dstFolder.get())  //if dst are same and we already have a request, we cannot copy immediately
     {
-      *aCopyImmediately = PR_FALSE;
+      *aCopyImmediately = false;
       break;
     }
   }
   return NS_OK;
 }
 
 nsresult
 nsMsgCopyService::DoCopy(nsCopyRequest* aRequest)
@@ -330,39 +330,39 @@ nsMsgCopyService::DoNextCopy()
             goto found; // must be CopyFileMessage
         for (j = 0; j < scnt; j++)
         {
           copySource = copyRequest->m_copySourceArray.ElementAt(j);
           if (!copySource->m_processed)
             goto found;
         }
         if (j >= scnt) // all processed set the value
-          copyRequest->m_processed = PR_TRUE;
+          copyRequest->m_processed = true;
       }
       if (copyRequest->m_processed) // keep track of folders actively getting copied to.
         activeTargets.AppendObject(copyRequest->m_dstFolder);
     }
     found:
       if (copyRequest && !copyRequest->m_processed)
       {
           if (copyRequest->m_listener)
               copyRequest->m_listener->OnStartCopy();
           if (copyRequest->m_requestType == nsCopyMessagesType &&
               copySource)
           {
-              copySource->m_processed = PR_TRUE;
+              copySource->m_processed = true;
               rv = copyRequest->m_dstFolder->CopyMessages
                   (copySource->m_msgFolder, copySource->m_messageArray,
                    copyRequest->m_isMoveOrDraftOrTemplate,
-                   copyRequest->m_msgWindow, copyRequest->m_listener, PR_FALSE, copyRequest->m_allowUndo);   //isFolder operation PR_FALSE
+                   copyRequest->m_msgWindow, copyRequest->m_listener, false, copyRequest->m_allowUndo);   //isFolder operation false
 
           }
           else if (copyRequest->m_requestType == nsCopyFoldersType )
           {
-              copySource->m_processed = PR_TRUE;
+              copySource->m_processed = true;
               rv = copyRequest->m_dstFolder->CopyFolder
                   (copySource->m_msgFolder,
                    copyRequest->m_isMoveOrDraftOrTemplate,
                    copyRequest->m_msgWindow, copyRequest->m_listener);
               // If it's a copy folder operation and the destination
               // folder already exists, CopyFolder() returns an error w/o sending
               // a completion notification, so clear it here.
               if (NS_FAILED(rv))
@@ -377,19 +377,19 @@ nsMsgCopyService::DoNextCopy()
                 // ** in case of saving draft/template; the very first
                 // time we may not have the original message to replace
                 // with; if we do we shall have an instance of copySource
                 nsCOMPtr<nsIMsgDBHdr> aMessage;
                 if (copySource)
                 {
                     aMessage = do_QueryElementAt(copySource->m_messageArray,
                                                  0, &rv);
-                    copySource->m_processed = PR_TRUE;
+                    copySource->m_processed = true;
                 }
-                copyRequest->m_processed = PR_TRUE;
+                copyRequest->m_processed = true;
                 rv = copyRequest->m_dstFolder->CopyFileMessage
                     (aFile, aMessage,
                      copyRequest->m_isMoveOrDraftOrTemplate,
                      copyRequest->m_newMsgFlags,
                      copyRequest->m_newMsgKeywords,
                      copyRequest->m_msgWindow,
                      copyRequest->m_listener);
             }
@@ -591,17 +591,17 @@ nsMsgCopyService::CopyFolders(nsIArray* 
     NS_ASSERTION((NS_SUCCEEDED(rv)),"More than one folders to copy");
 
   support = do_QueryElementAt(folders, 0);
 
   copyRequest = new nsCopyRequest();
   if (!copyRequest) return NS_ERROR_OUT_OF_MEMORY;
 
   rv = copyRequest->Init(nsCopyFoldersType, support, dstFolder,
-    isMove, 0 /* new msg flags, not used */ , EmptyCString(), listener, window, PR_FALSE);
+    isMove, 0 /* new msg flags, not used */ , EmptyCString(), listener, window, false);
   NS_ENSURE_SUCCESS(rv, rv);
 
   curFolder = do_QueryInterface(support, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   copySource = copyRequest->AddNewCopySource(curFolder);
   if (!copySource)
     rv = NS_ERROR_OUT_OF_MEMORY;
@@ -639,17 +639,17 @@ nsMsgCopyService::CopyFileMessage(nsIFil
   if (window)
     window->GetTransactionManager(getter_AddRefs(txnMgr));
   copyRequest = new nsCopyRequest();
   if (!copyRequest) return rv;
   fileSupport = do_QueryInterface(file, &rv);
   if (NS_FAILED(rv)) goto done;
 
   rv = copyRequest->Init(nsCopyFileMessageType, fileSupport, dstFolder,
-                         isDraft, aMsgFlags, aNewMsgKeywords, listener, window, PR_FALSE);
+                         isDraft, aMsgFlags, aNewMsgKeywords, listener, window, false);
   if (NS_FAILED(rv)) goto done;
 
   if (msgToReplace)
   {
     // The actual source of the message is a file not a folder, but
     // we still need an nsCopySource to reference the old message header
     // which will be used to recover message metadata.
     copySource = copyRequest->AddNewCopySource(nsnull);
@@ -707,17 +707,17 @@ nsMsgCopyService::NotifyCompletion(nsISu
       for (sourceIndex = 0; sourceIndex < sourceCount;)
       {
         if (!(copyRequest->m_copySourceArray.ElementAt(sourceIndex))->m_processed)
             break;
          sourceIndex++;
       }
       // if all sources processed, mark the request as processed
       if (sourceIndex >= sourceCount)
-        copyRequest->m_processed = PR_TRUE;
+        copyRequest->m_processed = true;
       // if this request is done, or failed, clear it.
       if (copyRequest->m_processed || NS_FAILED(result))
       {
         ClearRequest(copyRequest, result);
         numOrigRequests--;
       }
       else
         break;
--- a/mailnews/base/src/nsMsgDBView.cpp
+++ b/mailnews/base/src/nsMsgDBView.cpp
@@ -160,47 +160,47 @@ NS_INTERFACE_MAP_BEGIN(nsMsgDBView)
    NS_INTERFACE_MAP_ENTRY(nsIDBChangeListener)
    NS_INTERFACE_MAP_ENTRY(nsITreeView)
    NS_INTERFACE_MAP_ENTRY(nsIJunkMailClassificationListener)
 NS_INTERFACE_MAP_END
 
 nsMsgDBView::nsMsgDBView()
 {
   /* member initializers and constructor code */
-  m_sortValid = PR_FALSE;
+  m_sortValid = false;
   m_sortOrder = nsMsgViewSortOrder::none;
   m_viewFlags = nsMsgViewFlagsType::kNone;
   m_secondarySort = nsMsgViewSortType::byId;
   m_secondarySortOrder = nsMsgViewSortOrder::ascending;
   m_cachedMsgKey = nsMsgKey_None;
   m_currentlyDisplayedMsgKey = nsMsgKey_None;
   m_currentlyDisplayedViewIndex = nsMsgViewIndex_None;
   mNumSelectedRows = 0;
-  mSuppressMsgDisplay = PR_FALSE;
-  mSuppressCommandUpdating = PR_FALSE;
-  mSuppressChangeNotification = PR_FALSE;
-  mSummarizeFailed = PR_FALSE;
-  mSelectionSummarized = PR_FALSE;
-  mGoForwardEnabled = PR_FALSE;
-  mGoBackEnabled = PR_FALSE;
-
-  mIsNews = PR_FALSE;
-  mIsRss = PR_FALSE;
-  mIsXFVirtual = PR_FALSE;
+  mSuppressMsgDisplay = false;
+  mSuppressCommandUpdating = false;
+  mSuppressChangeNotification = false;
+  mSummarizeFailed = false;
+  mSelectionSummarized = false;
+  mGoForwardEnabled = false;
+  mGoBackEnabled = false;
+
+  mIsNews = false;
+  mIsRss = false;
+  mIsXFVirtual = false;
   mDeleteModel = nsMsgImapDeleteModels::MoveToTrash;
-  m_deletingRows = PR_FALSE;
+  m_deletingRows = false;
   mNumMessagesRemainingInBatch = 0;
-  mShowSizeInLines = PR_FALSE;
+  mShowSizeInLines = false;
 
   /* mCommandsNeedDisablingBecauseOfSelection - A boolean that tell us if we needed to disable commands because of what's selected.
     If we're offline w/o a downloaded msg selected, or a dummy message was selected.
   */
 
-  mCommandsNeedDisablingBecauseOfSelection = PR_FALSE;
-  mRemovingRow = PR_FALSE;
+  mCommandsNeedDisablingBecauseOfSelection = false;
+  mRemovingRow = false;
   m_saveRestoreSelectionDepth = 0;
   mRecentlyDeletedArrayIndex = 0;
   // initialize any static atoms or unicode strings
   if (gInstanceCount == 0)
   {
     InitializeAtomsAndLiterals();
     InitDisplayFormats();
   }
@@ -531,17 +531,17 @@ nsresult nsMsgDBView::FetchAuthor(nsIMsg
         folder->GetCharset(charset);
 
       nsCOMPtr<nsIMimeConverter>
         mimeConverter(do_GetService(NS_MIME_CONVERTER_CONTRACTID,&rv));
 
       rv = mimeConverter->DecodeMimeHeader(name.get(),
                                            charset.get(),
                                            charsetOverride,
-                                           PR_TRUE,
+                                           true,
                                            aSenderString);
       if (NS_FAILED(rv) || aSenderString.IsEmpty())
         CopyUTF8toUTF16(name, aSenderString);
 
       // If the name is surrounded by quotes, strip them. In the future, we
       // may want to handle this in ParseHeaderAddresses.
       if ((aSenderString.First() == '"' && aSenderString.Last() == '"') ||
           (aSenderString.First() == '\'' && aSenderString.Last() == '\''))
@@ -639,17 +639,17 @@ nsresult nsMsgDBView::FetchRecipients(ns
     if (NS_SUCCEEDED(rv))
     {
       char *curAddressPtr = emailAddresses;
       char *curNamePtr = names;
 
       nsCOMPtr<nsISimpleEnumerator> enumerator;
       nsCOMPtr<nsIAbManager>
         abManager(do_GetService("@mozilla.org/abmanager;1", &rv));
-      NS_ENSURE_SUCCESS(rv, PR_FALSE);
+      NS_ENSURE_SUCCESS(rv, false);
 
       // go through each email address in the recipients and
       // compute its display name.
       for (PRUint32 i = 0; i < numAddresses; i++)
       {
         nsString recipient;
         nsDependentCString curAddress(curAddressPtr);
         nsDependentCString curName(curNamePtr);
@@ -698,17 +698,17 @@ nsresult nsMsgDBView::FetchSubject(nsIMs
     aValue.Append(subject);
   }
   else
     aMsgHdr->GetMime2DecodedSubject(aValue);
   return NS_OK;
 }
 
 // in case we want to play around with the date string, I've broken it out into
-// a separate routine.  Set rcvDate to PR_TRUE to get the Received: date instead
+// a separate routine.  Set rcvDate to true to get the Received: date instead
 // of the Date: date.
 nsresult nsMsgDBView::FetchDate(nsIMsgDBHdr * aHdr, nsAString &aDateString, bool rcvDate)
 {
   PRTime dateOfMsg;
   PRTime dateOfMsgLocal;
   PRUint32 rcvDateSecs;
   nsresult rv;
 
@@ -761,17 +761,17 @@ nsresult nsMsgDBView::FetchDate(nsIMsgDB
       // seeds
       LL_I2L  ( microSecondsPerSecond,  PR_USEC_PER_SEC );
       LL_UI2L ( secondsPerDay,          60 * 60 * 24 );
 
       // derivees
       LL_MUL( microSecondsPerDay,   secondsPerDay,      microSecondsPerSecond );
       LL_MUL( microSecondsPer6Days, microSecondsPerDay, 6 );
 
-      bGotConstants = PR_TRUE;
+      bGotConstants = true;
     }
 
     // setting the time variables to local time
     PRInt64 GMTLocalTimeShift;
     LL_ADD( GMTLocalTimeShift, explodedCurrentTime.tm_params.tp_gmt_offset, explodedCurrentTime.tm_params.tp_dst_offset );
     LL_MUL( GMTLocalTimeShift, GMTLocalTimeShift, microSecondsPerSecond );
     LL_ADD( currentTime, currentTime, GMTLocalTimeShift );
     LL_ADD( dateOfMsgLocal, dateOfMsg, GMTLocalTimeShift );
@@ -1018,17 +1018,17 @@ nsresult nsMsgDBView::SaveAndClearSelect
   m_saveRestoreSelectionDepth++;
   if (m_saveRestoreSelectionDepth != 1)
     return NS_OK;
 
   if (!mTreeSelection || !mTree)
     return NS_OK;
 
   // first, freeze selection.
-  mTreeSelection->SetSelectEventsSuppressed(PR_TRUE);
+  mTreeSelection->SetSelectEventsSuppressed(true);
 
   // second, save the current index.
   if (aCurrentMsgKey)
   {
     PRInt32 currentIndex;
     if (NS_SUCCEEDED(mTreeSelection->GetCurrentIndex(&currentIndex)) &&
         currentIndex >= 0 && PRUint32(currentIndex) < GetSize())
       *aCurrentMsgKey = m_keys[currentIndex];
@@ -1074,42 +1074,42 @@ nsresult nsMsgDBView::RestoreSelection(n
 
   // if we are threaded, we need to do a little more work
   // we need to find (and expand) all the threads that contain messages
   // that we had selected before.
   if (m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay)
   {
     for (PRInt32 index = 0; index < arraySize; index ++)
     {
-      FindKey(aMsgKeyArray[index], PR_TRUE /* expand */);
+      FindKey(aMsgKeyArray[index], true /* expand */);
     }
   }
 
   for (PRInt32 index = 0; index < arraySize; index ++)
   {
-    newViewPosition = FindKey(aMsgKeyArray[index], PR_FALSE);
+    newViewPosition = FindKey(aMsgKeyArray[index], false);
     // add the index back to the selection.
     if (newViewPosition != nsMsgViewIndex_None)
       mTreeSelection->ToggleSelect(newViewPosition);
   }
 
   // make sure the currentView was preserved....
   if (aCurrentMsgKey != nsMsgKey_None)
-    currentViewPosition = FindKey(aCurrentMsgKey, PR_TRUE);
+    currentViewPosition = FindKey(aCurrentMsgKey, true);
 
   if (mTree)
     mTreeSelection->SetCurrentIndex(currentViewPosition);
 
   // make sure the current message is once again visible in the thread pane
   // so we don't have to go search for it in the thread pane
   if (mTree && currentViewPosition != nsMsgViewIndex_None)
     mTree->EnsureRowIsVisible(currentViewPosition);
 
   // unfreeze selection.
-  mTreeSelection->SetSelectEventsSuppressed(PR_FALSE);
+  mTreeSelection->SetSelectEventsSuppressed(false);
   return NS_OK;
 }
 
 nsresult nsMsgDBView::GenerateURIForMsgKey(nsMsgKey aMsgKey, nsIMsgFolder *folder, nsACString & aURI)
 {
   NS_ENSURE_ARG(folder);
   return folder->GenerateMessageURI(aMsgKey, aURI);
 }
@@ -1146,23 +1146,23 @@ NS_IMETHODIMP nsMsgDBView::IsEditable(PR
   nsIMsgCustomColumnHandler* colHandler = GetColumnHandler(colID);
 
   if (colHandler)
   {
     colHandler->IsEditable(row, col, _retval);
     return NS_OK;
   }
 
-  *_retval = PR_FALSE;
+  *_retval = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBView::IsSelectable(PRInt32 row, nsITreeColumn* col, bool* _retval)
 {
-  *_retval = PR_FALSE;
+  *_retval = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBView::SetCellValue(PRInt32 row, nsITreeColumn* col, const nsAString& value)
 {
   return NS_OK;
 }
 
@@ -1254,17 +1254,17 @@ nsresult nsMsgDBView::UpdateDisplayMessa
     } // if view position is valid
   } // if we have an updater
   return NS_OK;
 }
 
 // given a msg key, we will load the message for it.
 NS_IMETHODIMP nsMsgDBView::LoadMessageByMsgKey(nsMsgKey aMsgKey)
 {
-  return LoadMessageByViewIndex(FindKey(aMsgKey, PR_FALSE));
+  return LoadMessageByViewIndex(FindKey(aMsgKey, false));
 }
 
 NS_IMETHODIMP nsMsgDBView::LoadMessageByViewIndex(nsMsgViewIndex aViewIndex)
 {
   NS_ASSERTION(aViewIndex != nsMsgViewIndex_None,"trying to load nsMsgViewIndex_None");
   if (aViewIndex == nsMsgViewIndex_None) return NS_ERROR_UNEXPECTED;
 
   nsCString uri;
@@ -1314,33 +1314,33 @@ NS_IMETHODIMP nsMsgDBView::SelectionChan
 
   bool commandsNeedDisablingBecauseOfSelection = false;
 
   if(indices)
   {
     if (WeAreOffline())
       commandsNeedDisablingBecauseOfSelection = !OfflineMsgSelected(indices, numSelected);
     if (!NonDummyMsgSelected(indices, numSelected))
-      commandsNeedDisablingBecauseOfSelection = PR_TRUE;
+      commandsNeedDisablingBecauseOfSelection = true;
   }
   bool selectionSummarized = false;
-  mSummarizeFailed = PR_FALSE;
+  mSummarizeFailed = false;
   // let the front-end adjust the message pane appropriately with either
   // the message body, or a summary of the selection
   if (mCommandUpdater)
   {
     mCommandUpdater->SummarizeSelection(&selectionSummarized);
     // check if the selection was not summarized, but we expected it to be,
     // and if so, remember it so GetHeadersFromSelection won't include
     // the messages in collapsed threads.
     if (!selectionSummarized &&
         (numSelected > 1 || (numSelected == 1 &&
                               m_flags[indices[0]] & nsMsgMessageFlags::Elided &&
                               OperateOnMsgsInCollapsedThreads())))
-      mSummarizeFailed = PR_TRUE;
+      mSummarizeFailed = true;
   }
 
   bool summaryStateChanged = selectionSummarized != mSelectionSummarized;
 
   mSelectionSummarized = selectionSummarized;
   // if only one item is selected then we want to display a message
   if (numSelected == 1 && !selectionSummarized)
   {
@@ -1458,17 +1458,17 @@ NS_IMETHODIMP nsMsgDBView::GetRowPropert
   if (NS_FAILED(rv) || !msgHdr) {
     ClearHdrCache();
     return NS_MSG_INVALID_DBVIEW_INDEX;
   }
 
   nsCString keywordProperty;
   FetchRowKeywords(index, msgHdr, keywordProperty);
   if (!keywordProperty.IsEmpty())
-    AppendKeywordProperties(keywordProperty, properties, PR_FALSE);
+    AppendKeywordProperties(keywordProperty, properties, false);
 
   // give the custom column handlers a chance to style the row.
   for (int i = 0; i < m_customColumnHandlers.Count(); i++)
     m_customColumnHandlers[i]->GetRowProperties(index, properties);
 
   return NS_OK;
 }
 
@@ -1543,17 +1543,17 @@ NS_IMETHODIMP nsMsgDBView::GetCellProper
     properties->AppendElement(junkScoreStr.ToInteger(&rv) == nsIJunkMailPlugin::IS_SPAM_SCORE ?
                               kJunkMsgAtom : kNotJunkMsgAtom);
     NS_ASSERTION(NS_SUCCEEDED(rv), "Converting junkScore to integer failed.");
   }
 
   nsCString keywords;
   FetchRowKeywords(aRow, msgHdr, keywords);
   if (!keywords.IsEmpty())
-    AppendKeywordProperties(keywords, properties, PR_TRUE);
+    AppendKeywordProperties(keywords, properties, true);
 
   // this is a double fetch of the keywords property since we also fetch
   // it for the tags - do we want to do this?
   // I'm not sure anyone uses the kw- property, though it could be nice
   // for people wanting to extend the thread pane.
   nsCString keywordProperty;
   msgHdr->GetStringProperty("keywords", getter_Copies(keywordProperty));
   if (!keywordProperty.IsEmpty())
@@ -1648,56 +1648,56 @@ NS_IMETHODIMP nsMsgDBView::IsContainer(P
       return NS_MSG_INVALID_DBVIEW_INDEX;
 
   if (m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay)
   {
     PRUint32 flags = m_flags[index];
     *_retval = !!(flags & MSG_VIEW_FLAG_HASCHILDREN);
   }
   else
-    *_retval = PR_FALSE;
+    *_retval = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBView::IsContainerOpen(PRInt32 index, bool *_retval)
 {
   if (!IsValidIndex(index))
       return NS_MSG_INVALID_DBVIEW_INDEX;
 
   if (m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay)
   {
     PRUint32 flags = m_flags[index];
     *_retval = (flags & MSG_VIEW_FLAG_HASCHILDREN) && !(flags & nsMsgMessageFlags::Elided);
   }
   else
-    *_retval = PR_FALSE;
+    *_retval = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBView::IsContainerEmpty(PRInt32 index, bool *_retval)
 {
   if (!IsValidIndex(index))
     return NS_MSG_INVALID_DBVIEW_INDEX;
 
   if (m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay)
   {
     PRUint32 flags = m_flags[index];
     *_retval = !(flags & MSG_VIEW_FLAG_HASCHILDREN);
   }
   else
-    *_retval = PR_FALSE;
+    *_retval = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBView::IsSeparator(PRInt32 index, bool *_retval)
 {
   if (!IsValidIndex(index))
     return NS_MSG_INVALID_DBVIEW_INDEX;
 
-  *_retval = PR_FALSE;
+  *_retval = false;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBView::GetParentIndex(PRInt32 rowIndex, PRInt32 *_retval)
 {
   *_retval = -1;
 
@@ -1717,33 +1717,33 @@ NS_IMETHODIMP nsMsgDBView::GetParentInde
     }
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBView::HasNextSibling(PRInt32 rowIndex, PRInt32 afterIndex, bool *_retval)
 {
-  *_retval = PR_FALSE;
+  *_retval = false;
 
   PRInt32 rowIndexLevel;
   GetLevel(rowIndex, &rowIndexLevel);
 
   PRInt32 i;
   PRInt32 count;
   GetRowCount(&count);
   for(i = afterIndex + 1; i < count; i++)
   {
     PRInt32 l;
     GetLevel(i, &l);
     if (l < rowIndexLevel)
       break;
     if (l == rowIndexLevel)
     {
-      *_retval = PR_TRUE;
+      *_retval = true;
       break;
     }
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBView::GetLevel(PRInt32 index, PRInt32 *_retval)
@@ -2114,17 +2114,17 @@ NS_IMETHODIMP nsMsgDBView::CellTextForCo
       msgHdr->GetFlags(&flags);
       rv = FetchStatus(flags, aValue);
     }
     break;
   case 'r':
     if (aColumnName[3] == 'i') // recipient
       rv = FetchRecipients(msgHdr, aValue);
     else if (aColumnName[3] == 'e') // received
-      rv = FetchDate(msgHdr, aValue, PR_TRUE);
+      rv = FetchDate(msgHdr, aValue, true);
     break;
   case 'd':  // date
     rv = FetchDate(msgHdr, aValue);
     break;
   case 'p': // priority
     rv = FetchPriority(msgHdr, aValue);
     break;
   case 'a': // account
@@ -2238,17 +2238,17 @@ NS_IMETHODIMP nsMsgDBView::CycleCell(PRI
   {
   case 'u': // unreadButtonColHeader
     if (colID[6] == 'B')
       ApplyCommandToIndices(nsMsgViewCommandType::toggleMessageRead, (nsMsgViewIndex *) &row, 1);
    break;
   case 't': // tag cell, threaded cell or total cell
     if (colID[1] == 'h')
     {
-      ExpandAndSelectThreadByIndex(row, PR_FALSE);
+      ExpandAndSelectThreadByIndex(row, false);
     }
     else if (colID[1] == 'a')
     {
       // ### Do we want to keep this behaviour but switch it to tags?
       // We could enumerate over the tags and go to the next one - it looks
       // to me like this wasn't working before tags landed, so maybe not
       // worth bothering with.
     }
@@ -2356,17 +2356,17 @@ NS_IMETHODIMP nsMsgDBView::Open(nsIMsgFo
     // Default to a virtual folder if folder not set, since synthetic search
     // views may not have a folder.
     PRUint32 folderFlags = nsMsgFolderFlags::Virtual;
     if (folder)
       folder->GetFlags(&folderFlags);
     mIsXFVirtual = folderFlags & nsMsgFolderFlags::Virtual;
 
     if (!mIsXFVirtual && MsgLowerCaseEqualsLiteral(type, "rss"))
-      mIsRss = PR_TRUE;
+      mIsRss = true;
 
     if (type.IsEmpty())
       mMessageTypeAtom = nsnull;
     else  // special case nntp --> news since we'll break themes if we try to be consistent
       mMessageTypeAtom = MsgGetAtom(mIsNews ? "news" : type.get());
 
     GetImapDeleteModel(nsnull);
 
@@ -2418,17 +2418,17 @@ NS_IMETHODIMP nsMsgDBView::Close()
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBView::OpenWithHdrs(nsISimpleEnumerator *aHeaders, nsMsgViewSortTypeValue aSortType,
                                         nsMsgViewSortOrderValue aSortOrder, nsMsgViewFlagsTypeValue aViewFlags,
                                         PRInt32 *aCount)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsMsgDBView::Init(nsIMessenger * aMessengerInstance, nsIMsgWindow * aMsgWindow, nsIMsgDBViewCommandUpdater *aCmdUpdater)
 {
   mMessengerWeak = do_GetWeakReference(aMessengerInstance);
   mMsgWindowWeak = do_GetWeakReference(aMsgWindow);
   mCommandUpdater = aCmdUpdater;
@@ -2449,17 +2449,17 @@ NS_IMETHODIMP nsMsgDBView::GetSuppressCo
 
 NS_IMETHODIMP nsMsgDBView::SetSuppressMsgDisplay(bool aSuppressDisplay)
 {
   PRUint32 numSelected = 0;
   GetNumSelected(&numSelected);
 
   bool forceDisplay = false;
   if (mSuppressMsgDisplay && !aSuppressDisplay && numSelected == 1)
-    forceDisplay = PR_TRUE;
+    forceDisplay = true;
 
   mSuppressMsgDisplay = aSuppressDisplay;
   if (forceDisplay)
   {
     // get the view indexfor the currently selected message
     nsMsgViewIndex viewIndex;
     nsresult rv = GetViewIndexForFirstSelectedMsg(&viewIndex);
     if (NS_SUCCEEDED(rv) && viewIndex != nsMsgViewIndex_None)
@@ -2600,17 +2600,17 @@ NS_IMETHODIMP nsMsgDBView::DoCommandWith
   switch (command) {
     case nsMsgViewCommandType::copyMessages:
     case nsMsgViewCommandType::moveMessages:
         NoteStartChange(nsMsgViewNotificationCode::none, 0, 0);
         rv = ApplyCommandToIndicesWithFolder(command, indices, numIndices, destFolder);
         NoteEndChange(nsMsgViewNotificationCode::none, 0, 0);
         break;
     default:
-        NS_ASSERTION(PR_FALSE, "invalid command type");
+        NS_ASSERTION(false, "invalid command type");
         rv = NS_ERROR_UNEXPECTED;
         break;
   }
   return rv;
 
 }
 
 NS_IMETHODIMP nsMsgDBView::DoCommand(nsMsgViewCommandTypeValue command)
@@ -2660,34 +2660,34 @@ NS_IMETHODIMP nsMsgDBView::DoCommand(nsM
   case nsMsgViewCommandType::selectThread:
     rv = ExpandAndSelectThread();
     break;
   case nsMsgViewCommandType::selectFlagged:
     if (!mTreeSelection)
       rv = NS_ERROR_UNEXPECTED;
     else
     {
-      mTreeSelection->SetSelectEventsSuppressed(PR_TRUE);
+      mTreeSelection->SetSelectEventsSuppressed(true);
       mTreeSelection->ClearSelection();
       // XXX ExpandAll?
       nsMsgViewIndex numIndices = GetSize();
       for (nsMsgViewIndex curIndex = 0; curIndex < numIndices; curIndex++)
       {
         if (m_flags[curIndex] & nsMsgMessageFlags::Marked)
           mTreeSelection->ToggleSelect(curIndex);
       }
-      mTreeSelection->SetSelectEventsSuppressed(PR_FALSE);
+      mTreeSelection->SetSelectEventsSuppressed(false);
     }
     break;
   case nsMsgViewCommandType::markAllRead:
     if (m_folder)
     {
-      SetSuppressChangeNotifications(PR_TRUE);
+      SetSuppressChangeNotifications(true);
       rv = m_folder->MarkAllMessagesRead(msgWindow);
-      SetSuppressChangeNotifications(PR_FALSE);
+      SetSuppressChangeNotifications(false);
       if (mTree)
         mTree->Invalidate();
     }
     break;
   case nsMsgViewCommandType::toggleThreadWatched:
     rv = ToggleWatched(indices,  numIndices);
     break;
   case nsMsgViewCommandType::expandAll:
@@ -2702,39 +2702,39 @@ NS_IMETHODIMP nsMsgDBView::DoCommand(nsM
     rv = CollapseAll();
     m_viewFlags &= ~nsMsgViewFlagsType::kExpandAll;
     SetViewFlags(m_viewFlags);
     NS_ASSERTION(mTree, "no tree, see bug #114956");
     if(mTree)
       mTree->Invalidate();
     break;
   default:
-    NS_ASSERTION(PR_FALSE, "invalid command type");
+    NS_ASSERTION(false, "invalid command type");
     rv = NS_ERROR_UNEXPECTED;
     break;
   }
   return rv;
 }
 
 bool nsMsgDBView::ServerSupportsFilterAfterTheFact()
 {
   if (!m_folder)  // cross folder virtual folders might not have a folder set.
-    return PR_FALSE;
+    return false;
 
   nsCOMPtr <nsIMsgIncomingServer> server;
   nsresult rv = m_folder->GetServer(getter_AddRefs(server));
   if (NS_FAILED(rv))
-    return PR_FALSE; // unexpected
+    return false; // unexpected
 
   // filter after the fact is implement using search
   // so if you can't search, you can't filter after the fact
   bool canSearch;
   rv = server->GetCanSearchMessages(&canSearch);
   if (NS_FAILED(rv))
-    return PR_FALSE; // unexpected
+    return false; // unexpected
 
   return canSearch;
 }
 
 NS_IMETHODIMP nsMsgDBView::GetCommandStatus(nsMsgViewCommandTypeValue command, bool *selectable_p, nsMsgViewCommandCheckStateValue *selected_p)
 {
   nsresult rv = NS_OK;
 
@@ -2753,17 +2753,17 @@ NS_IMETHODIMP nsMsgDBView::GetCommandSta
 
   switch (command)
   {
   case nsMsgViewCommandType::deleteMsg:
   case nsMsgViewCommandType::deleteNoTrash:
     {
       bool canDelete;
       if (m_folder && NS_SUCCEEDED(m_folder->GetCanDeleteMessages(&canDelete)) && !canDelete)
-        *selectable_p = PR_FALSE;
+        *selectable_p = false;
       else
         *selectable_p = haveSelection;
     }
     break;
   case nsMsgViewCommandType::applyFilters:
     // disable if no messages
     // XXX todo, check that we have filters, and at least one is enabled
     *selectable_p = GetSize();
@@ -2796,20 +2796,20 @@ NS_IMETHODIMP nsMsgDBView::GetCommandSta
   case nsMsgViewCommandType::unjunk:
     *selectable_p = haveSelection && JunkControlsEnabled(selection[0]);
     break;
   case nsMsgViewCommandType::cmdRequiringMsgBody:
     *selectable_p = haveSelection && (!WeAreOffline() || OfflineMsgSelected(indices, numIndices));
     break;
   case nsMsgViewCommandType::downloadFlaggedForOffline:
   case nsMsgViewCommandType::markAllRead:
-    *selectable_p = PR_TRUE;
+    *selectable_p = true;
     break;
   default:
-    NS_ASSERTION(PR_FALSE, "invalid command type");
+    NS_ASSERTION(false, "invalid command type");
     rv = NS_ERROR_FAILURE;
   }
   return rv;
 }
 
 // This method needs to be overridden by the various view classes
 // that have different kinds of threads. For example, in a 
 // threaded quick search db view, we'd only want to include children
@@ -2819,48 +2819,48 @@ NS_IMETHODIMP nsMsgDBView::GetCommandSta
 nsresult nsMsgDBView::ListCollapsedChildren(nsMsgViewIndex viewIndex, 
                                             nsIMutableArray *messageArray)
 {
   nsCOMPtr<nsIMsgDBHdr> msgHdr;
   nsCOMPtr<nsIMsgThread> thread;
   GetMsgHdrForViewIndex(viewIndex, getter_AddRefs(msgHdr));
   if (!msgHdr)
   {
-    NS_ASSERTION(PR_FALSE, "couldn't find message to expand");
+    NS_ASSERTION(false, "couldn't find message to expand");
     return NS_MSG_MESSAGE_NOT_FOUND;
   }
   nsresult rv = GetThreadContainingMsgHdr(msgHdr, getter_AddRefs(thread));
   NS_ENSURE_SUCCESS(rv, rv);
   PRUint32 numChildren;
   thread->GetNumChildren(&numChildren);
   for (PRUint32 i = 1; i < numChildren && NS_SUCCEEDED(rv); i++)
   {
     nsCOMPtr<nsIMsgDBHdr> msgHdr;
     rv = thread->GetChildHdrAt(i, getter_AddRefs(msgHdr));
     if (!msgHdr)
       continue;
-    rv = messageArray->AppendElement(msgHdr, PR_FALSE);
+    rv = messageArray->AppendElement(msgHdr, false);
   }
   return rv;
 }
 
 bool nsMsgDBView::OperateOnMsgsInCollapsedThreads()
 {
   if (mTreeSelection)
   {
     nsCOMPtr<nsITreeBoxObject> selTree;
     mTreeSelection->GetTree(getter_AddRefs(selTree));
     // no tree means stand-alone message window
     if (!selTree)
-      return PR_FALSE;
+      return false;
   }
 
   nsresult rv = NS_OK;
   nsCOMPtr<nsIPrefBranch> prefBranch (do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   bool includeCollapsedMsgs = false;
   prefBranch->GetBoolPref("mail.operate_on_msgs_in_collapsed_threads", &includeCollapsedMsgs);
   return includeCollapsedMsgs;
 }
 
 nsresult nsMsgDBView::GetHeadersFromSelection(PRUint32 *indices,
                                               PRUint32 numIndices,
@@ -2887,17 +2887,17 @@ nsresult nsMsgDBView::GetHeadersFromSele
           m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay)
         rv = ListCollapsedChildren(viewIndex, messageArray);
       continue;
     }
     nsCOMPtr<nsIMsgDBHdr> msgHdr;
     rv = GetMsgHdrForViewIndex(viewIndex, getter_AddRefs(msgHdr));
     if (NS_SUCCEEDED(rv) && msgHdr)
     {
-      rv = messageArray->AppendElement(msgHdr, PR_FALSE);
+      rv = messageArray->AppendElement(msgHdr, false);
       if (NS_SUCCEEDED(rv) && includeCollapsedMsgs && 
           viewIndexFlags & nsMsgMessageFlags::Elided &&
           viewIndexFlags & MSG_VIEW_FLAG_HASCHILDREN &&
           m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay)
       {
         rv = ListCollapsedChildren(viewIndex, messageArray);
       }
     }
@@ -2905,57 +2905,57 @@ nsresult nsMsgDBView::GetHeadersFromSele
   return rv;
 }
 
 nsresult
 nsMsgDBView::CopyMessages(nsIMsgWindow *window, nsMsgViewIndex *indices, PRInt32 numIndices, bool isMove, nsIMsgFolder *destFolder)
 {
   if (m_deletingRows)
   {
-    NS_ASSERTION(PR_FALSE, "Last move did not complete");
+    NS_ASSERTION(false, "Last move did not complete");
     return NS_OK;
   }
 
   nsresult rv;
   NS_ENSURE_ARG_POINTER(destFolder);
   nsCOMPtr<nsIMutableArray> messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
   rv = GetHeadersFromSelection(indices, numIndices, messageArray);
   NS_ENSURE_SUCCESS(rv, rv);
 
   m_deletingRows = isMove && mDeleteModel != nsMsgImapDeleteModels::IMAPDelete;
   if (m_deletingRows)
     mIndicesToNoteChange.AppendElements(indices, numIndices);
 
   nsCOMPtr<nsIMsgCopyService> copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
-  return copyService->CopyMessages(m_folder /* source folder */, messageArray, destFolder, isMove, nsnull /* listener */, window, PR_TRUE /*allowUndo*/);
+  return copyService->CopyMessages(m_folder /* source folder */, messageArray, destFolder, isMove, nsnull /* listener */, window, true /*allowUndo*/);
 }
 
 nsresult
 nsMsgDBView::ApplyCommandToIndicesWithFolder(nsMsgViewCommandTypeValue command, nsMsgViewIndex* indices,
                     PRInt32 numIndices, nsIMsgFolder *destFolder)
 {
   nsresult rv = NS_OK;
   NS_ENSURE_ARG_POINTER(destFolder);
 
   nsCOMPtr<nsIMsgWindow> msgWindow(do_QueryReferent(mMsgWindowWeak));
   switch (command) {
     case nsMsgViewCommandType::copyMessages:
         NS_ASSERTION(!(m_folder == destFolder), "The source folder and the destination folder are the same");
         if (m_folder != destFolder)
-          rv = CopyMessages(msgWindow, indices, numIndices, PR_FALSE /* isMove */, destFolder);
+          rv = CopyMessages(msgWindow, indices, numIndices, false /* isMove */, destFolder);
         break;
     case nsMsgViewCommandType::moveMessages:
         NS_ASSERTION(!(m_folder == destFolder), "The source folder and the destination folder are the same");
         if (m_folder != destFolder)
-          rv = CopyMessages(msgWindow, indices, numIndices, PR_TRUE  /* isMove */, destFolder);
+          rv = CopyMessages(msgWindow, indices, numIndices, true     /* isMove */, destFolder);
         break;
     default:
-        NS_ASSERTION(PR_FALSE, "unhandled command");
+        NS_ASSERTION(false, "unhandled command");
         rv = NS_ERROR_UNEXPECTED;
         break;
     }
     return rv;
 }
 
 nsresult
 nsMsgDBView::ApplyCommandToIndices(nsMsgViewCommandTypeValue command, nsMsgViewIndex* indices,
@@ -2966,19 +2966,19 @@ nsMsgDBView::ApplyCommandToIndices(nsMsg
 
   if (numIndices == 0)
     return NS_OK; // return quietly, just in case
 
   nsCOMPtr<nsIMsgFolder> folder;
   nsresult rv = GetFolderForViewIndex(indices[0], getter_AddRefs(folder));
   nsCOMPtr<nsIMsgWindow> msgWindow(do_QueryReferent(mMsgWindowWeak));
   if (command == nsMsgViewCommandType::deleteMsg)
-    return DeleteMessages(msgWindow, indices, numIndices, PR_FALSE);
+    return DeleteMessages(msgWindow, indices, numIndices, false);
   if (command == nsMsgViewCommandType::deleteNoTrash)
-    return DeleteMessages(msgWindow, indices, numIndices, PR_TRUE);
+    return DeleteMessages(msgWindow, indices, numIndices, true);
 
   nsTArray<nsMsgKey> imapUids;
   nsCOMPtr <nsIMsgImapMailFolder> imapFolder = do_QueryInterface(folder);
   bool thisIsImapFolder = (imapFolder != nsnull);
   nsCOMPtr<nsIJunkMailPlugin> junkPlugin;
 
   // if this is a junk command, get the junk plugin.
   if (command == nsMsgViewCommandType::junk ||
@@ -3001,24 +3001,24 @@ nsMsgDBView::ApplyCommandToIndices(nsMsg
     NS_ENSURE_SUCCESS(rv, rv);
     if (!mJunkHdrs)
     {
       mJunkHdrs = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
       NS_ENSURE_SUCCESS(rv,rv);
     }
   }
 
-  folder->EnableNotifications(nsIMsgFolder::allMessageCountNotifications, PR_FALSE, PR_TRUE /*dbBatching*/);
+  folder->EnableNotifications(nsIMsgFolder::allMessageCountNotifications, false, true /*dbBatching*/);
 
   // no sense going through the code that handles messages in collasped threads
   // for mark thread read.
   if (command == nsMsgViewCommandType::markThreadRead)
   {
     for (PRInt32 index = 0; index < numIndices; index++)
-      SetThreadOfMsgReadByIndex(indices[index], imapUids, PR_TRUE);
+      SetThreadOfMsgReadByIndex(indices[index], imapUids, true);
   }
   else
   {
     // Turn the selection into an array of msg hdrs. This may include messages
     // in collapsed threads
     PRUint32 length;
     nsCOMPtr<nsIMutableArray> messages(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv));
     NS_ENSURE_SUCCESS(rv, rv);
@@ -3036,23 +3036,23 @@ nsMsgDBView::ApplyCommandToIndices(nsMsg
       msgHdr->GetMessageKey(&msgKey);
       if (thisIsImapFolder)
         imapUids[i] = msgKey;
 
       switch (command)
       {
       case nsMsgViewCommandType::junk:
         mNumMessagesRemainingInBatch++;
-        mJunkHdrs->AppendElement(msgHdr, PR_FALSE);
+        mJunkHdrs->AppendElement(msgHdr, false);
         rv = SetMsgHdrJunkStatus(junkPlugin.get(), msgHdr,
                                  nsIJunkMailPlugin::JUNK);
         break;
       case nsMsgViewCommandType::unjunk:
         mNumMessagesRemainingInBatch++;
-        mJunkHdrs->AppendElement(msgHdr, PR_FALSE);
+        mJunkHdrs->AppendElement(msgHdr, false);
         rv = SetMsgHdrJunkStatus(junkPlugin.get(), msgHdr,
                                  nsIJunkMailPlugin::GOOD);
         break;
       case nsMsgViewCommandType::toggleMessageRead:
       case nsMsgViewCommandType::undeleteMsg:
       case nsMsgViewCommandType::markMessagesRead:
       case nsMsgViewCommandType::markMessagesUnread:
       case nsMsgViewCommandType::unflagMessages:
@@ -3099,48 +3099,48 @@ nsMsgDBView::ApplyCommandToIndices(nsMsg
       if (notifier)
         notifier->NotifyItemEvent(messages,
                                   NS_LITERAL_CSTRING("JunkStatusChanged"),
                                   (command == nsMsgViewCommandType::junk) ?
                                     kJunkMsgAtom : kNotJunkMsgAtom);
     }
   }
 
-  folder->EnableNotifications(nsIMsgFolder::allMessageCountNotifications, PR_TRUE, PR_TRUE /*dbBatching*/);
+  folder->EnableNotifications(nsIMsgFolder::allMessageCountNotifications, true, true /*dbBatching*/);
 
   if (thisIsImapFolder)
   {
     imapMessageFlagsType flags = kNoImapMsgFlag;
     bool addFlags = false;
     nsCOMPtr<nsIMsgWindow> msgWindow(do_QueryReferent(mMsgWindowWeak));
     switch (command)
     {
     case nsMsgViewCommandType::markThreadRead:
       flags |= kImapMsgSeenFlag;
-      addFlags = PR_TRUE;
+      addFlags = true;
       break;
     case nsMsgViewCommandType::undeleteMsg:
       flags = kImapMsgDeletedFlag;
-      addFlags = PR_FALSE;
+      addFlags = false;
       break;
     case nsMsgViewCommandType::junk:
         return imapFolder->StoreCustomKeywords(msgWindow,
                     NS_LITERAL_CSTRING("Junk"),
                     NS_LITERAL_CSTRING("NonJunk"),
                     imapUids.Elements(), imapUids.Length(),
                     nsnull);
     case nsMsgViewCommandType::unjunk:
       {
         nsCOMPtr<nsIMsgDBHdr> msgHdr;
         GetHdrForFirstSelectedMessage(getter_AddRefs(msgHdr));
         PRUint32 msgFlags = 0;
         if (msgHdr)
           msgHdr->GetFlags(&msgFlags);
         if (msgFlags & nsMsgMessageFlags::IMAPDeleted)
-          imapFolder->StoreImapFlags(kImapMsgDeletedFlag, PR_FALSE,
+          imapFolder->StoreImapFlags(kImapMsgDeletedFlag, false,
                                      imapUids.Elements(),
                                      imapUids.Length(), nsnull);
         return imapFolder->StoreCustomKeywords(msgWindow,
                     NS_LITERAL_CSTRING("NonJunk"),
                     NS_LITERAL_CSTRING("Junk"),
                     imapUids.Elements(), imapUids.Length(),
                     nsnull);
       }
@@ -3223,29 +3223,29 @@ nsresult nsMsgDBView::DeleteMessages(nsI
         (nsIPrompt::BUTTON_TITLE_CANCEL * nsIPrompt::BUTTON_POS_1);
       rv = dialog->ConfirmEx(dialogTitle.get(), confirmString.get(), buttonFlags,
                              buttonApplyNowText.get(), nsnull, nsnull,
                              checkboxText.get(), &alwaysAsk, &buttonPressed);
       NS_ENSURE_SUCCESS(rv, rv);
       if (buttonPressed)
         return NS_ERROR_FAILURE;
        if (!alwaysAsk)
-         prefBranch->SetBoolPref(warnPref, PR_FALSE);
+         prefBranch->SetBoolPref(warnPref, false);
     }
   }
 
   if (mDeleteModel != nsMsgImapDeleteModels::IMAPDelete)
-    m_deletingRows = PR_TRUE;
+    m_deletingRows = true;
 
   if (m_deletingRows)
     mIndicesToNoteChange.AppendElements(indices, numIndices);
 
-  rv = m_folder->DeleteMessages(messageArray, window, deleteStorage, PR_FALSE, nsnull, PR_TRUE /*allow Undo*/ );
+  rv = m_folder->DeleteMessages(messageArray, window, deleteStorage, false, nsnull, true /*allow Undo*/ );
   if (NS_FAILED(rv))
-    m_deletingRows = PR_FALSE;
+    m_deletingRows = false;
   return rv;
 }
 
 nsresult nsMsgDBView::DownloadForOffline(nsIMsgWindow *window, nsMsgViewIndex *indices, PRInt32 numIndices)
 {
   nsresult rv = NS_OK;
   nsCOMPtr<nsIMutableArray> messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID));
   for (nsMsgViewIndex index = 0; index < (nsMsgViewIndex) numIndices; index++)
@@ -3254,17 +3254,17 @@ nsresult nsMsgDBView::DownloadForOffline
     nsCOMPtr <nsIMsgDBHdr> msgHdr;
     rv = m_db->GetMsgHdrForKey(key, getter_AddRefs(msgHdr));
     NS_ENSURE_SUCCESS(rv,rv);
     if (msgHdr)
     {
       PRUint32 flags;
       msgHdr->GetFlags(&flags);
       if (!(flags & nsMsgMessageFlags::Offline))
-        messageArray->AppendElement(msgHdr, PR_FALSE);
+        messageArray->AppendElement(msgHdr, false);
     }
   }
   m_folder->DownloadMessagesForOffline(messageArray, window);
   return rv;
 }
 
 nsresult nsMsgDBView::DownloadFlaggedForOffline(nsIMsgWindow *window)
 {
@@ -3281,17 +3281,17 @@ nsresult nsMsgDBView::DownloadFlaggedFor
       nsCOMPtr <nsIMsgDBHdr> pHeader;
       rv = enumerator->GetNext(getter_AddRefs(pHeader));
       NS_ASSERTION(NS_SUCCEEDED(rv), "nsMsgDBEnumerator broken");
       if (pHeader && NS_SUCCEEDED(rv))
       {
         PRUint32 flags;
         pHeader->GetFlags(&flags);
         if ((flags & nsMsgMessageFlags::Marked) && !(flags & nsMsgMessageFlags::Offline))
-          messageArray->AppendElement(pHeader, PR_FALSE);
+          messageArray->AppendElement(pHeader, false);
       }
     }
   }
   m_folder->DownloadMessagesForOffline(messageArray, window);
   return rv;
 }
 
 // read/unread handling.
@@ -3341,17 +3341,17 @@ nsresult nsMsgDBView::SetReadByIndex(nsM
 }
 
 nsresult nsMsgDBView::SetThreadOfMsgReadByIndex(nsMsgViewIndex index, nsTArray<nsMsgKey> &keysMarkedRead, bool /*read*/)
 {
   nsresult rv;
 
   if (!IsValidIndex(index))
     return NS_MSG_INVALID_DBVIEW_INDEX;
-  rv = MarkThreadOfMsgRead(m_keys[index], index, keysMarkedRead, PR_TRUE);
+  rv = MarkThreadOfMsgRead(m_keys[index], index, keysMarkedRead, true);
   return rv;
 }
 
 nsresult nsMsgDBView::SetFlaggedByIndex(nsMsgViewIndex index, bool mark)
 {
   nsresult rv;
 
   if (!IsValidIndex(index))
@@ -3555,35 +3555,35 @@ nsMsgDBView::PerformActionsOnJunkMsgs(bo
     nsCOMPtr<nsIMsgWindow> msgWindow(do_QueryReferent(mMsgWindowWeak));
     NoteStartChange(nsMsgViewNotificationCode::none, 0, 0);
     if (targetFolder)
     {
       nsCOMPtr<nsIMsgCopyService> copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv);
       NS_ENSURE_SUCCESS(rv, rv);
 
       rv = copyService->CopyMessages(srcFolder , mJunkHdrs, targetFolder,
-                                     PR_TRUE, nsnull, msgWindow, PR_TRUE);
+                                     true, nsnull, msgWindow, true);
     }
     else if (msgsAreJunk)
     {
-      rv = srcFolder->DeleteMessages(mJunkHdrs, msgWindow, PR_FALSE, PR_FALSE,
-                                     nsnull, PR_TRUE);
+      rv = srcFolder->DeleteMessages(mJunkHdrs, msgWindow, false, false,
+                                     nsnull, true);
     }
     else if (mDeleteModel == nsMsgImapDeleteModels::IMAPDelete)
     {
       nsCOMPtr<nsIMsgImapMailFolder> imapFolder(do_QueryInterface(srcFolder));
       nsTArray<nsMsgKey> imapUids;
       imapUids.SetLength(numJunkHdrs);
       for (uint32 i = 0; i < numJunkHdrs; i++)
       {
         nsCOMPtr<nsIMsgDBHdr> msgHdr = do_QueryElementAt(mJunkHdrs, i);
         msgHdr->GetMessageKey(&imapUids[i]);
       }
 
-      imapFolder->StoreImapFlags(kImapMsgDeletedFlag, PR_FALSE, imapUids.Elements(),
+      imapFolder->StoreImapFlags(kImapMsgDeletedFlag, false, imapUids.Elements(),
                                  imapUids.Length(), nsnull);
     }
     NoteEndChange(nsMsgViewNotificationCode::none, 0, 0);
 
     NS_ASSERTION(NS_SUCCEEDED(rv), "move or deletion of message marked-as-junk/non junk failed");
   }
   return rv;
 }
@@ -4053,17 +4053,17 @@ nsresult nsMsgDBView::GetLongField(nsIMs
     case nsMsgViewSortType::byCustom:
       if (colHandler != nsnull)
       {
         colHandler->GetSortLongForRow(msgHdr, result);
         rv = NS_OK;
       }
       else
       {
-        NS_ASSERTION(PR_FALSE, "should not be here (Sort Type: byCustom (Long), but no custom handler)");
+        NS_ASSERTION(false, "should not be here (Sort Type: byCustom (Long), but no custom handler)");
         rv = NS_ERROR_UNEXPECTED;
       }
       break;
     case nsMsgViewSortType::byId:
         // handled by caller, since caller knows the key
     default:
         NS_ERROR("should not be here");
         rv = NS_ERROR_UNEXPECTED;
@@ -4216,17 +4216,17 @@ nsMsgDBView::GetCollationKey(nsIMsgDBHdr
         {
           rv = GetDBForHeader(msgHdr, getter_AddRefs(dbToUse));
           NS_ENSURE_SUCCESS(rv,rv);
         }
         rv = dbToUse->CreateCollationKey(strKey, len, result);
       }
       else
       {
-        NS_ASSERTION(PR_FALSE,"should not be here (Sort Type: byCustom (String), but no custom handler)");
+        NS_ASSERTION(false,"should not be here (Sort Type: byCustom (String), but no custom handler)");
         //rv = NS_ERROR_UNEXPECTED;
       }
       break;
     default:
         rv = NS_ERROR_UNEXPECTED;
         break;
     }
 
@@ -4337,34 +4337,34 @@ PRInt32  nsMsgDBView::SecondarySort(nsMs
       else
         GetLongField(hdr1, sortType, &EntryInfo1.dword, colHandler);
       comparisonFun = FnSortIdUint32;
       break;
     default:
       return 0;
   }
   bool saveAscendingSort = comparisonContext->ascendingSort;
-  comparisonContext->isSecondarySort = PR_TRUE;
+  comparisonContext->isSecondarySort = true;
   comparisonContext->ascendingSort = (sortOrder == nsMsgViewSortOrder::ascending);
   if (fieldType == kCollationKey)
   {
     PR_FREEIF(EntryInfo2.key);
     rv = GetCollationKey(hdr2, sortType, &EntryInfo2.key, &EntryInfo2.dword, colHandler);
     NS_ASSERTION(NS_SUCCEEDED(rv),"failed to create collation key");
   }
   else if (fieldType == kU32)
   {
     if (sortType == nsMsgViewSortType::byId)
       EntryInfo2.dword = EntryInfo2.id;
     else 
       GetLongField(hdr2, sortType, &EntryInfo2.dword, colHandler);
   }
   retStatus = (*comparisonFun)(&pValue1, &pValue2, comparisonContext);
   
-  comparisonContext->isSecondarySort = PR_FALSE;
+  comparisonContext->isSecondarySort = false;
   comparisonContext->ascendingSort = saveAscendingSort;
 
   return retStatus;
 }
 
 
 NS_IMETHODIMP nsMsgDBView::Sort(nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder)
 {
@@ -4542,17 +4542,17 @@ NS_IMETHODIMP nsMsgDBView::Sort(nsMsgVie
 
     pTemp += keyOffset + actualFieldLen;
     ++numSoFar;
     PR_Free(keyValue);
   }
 
   viewSortInfo qsPrivateData;
   qsPrivateData.view = this;
-  qsPrivateData.isSecondarySort = PR_FALSE;
+  qsPrivateData.isSecondarySort = false;
   qsPrivateData.ascendingSort = (sortOrder == nsMsgViewSortOrder::ascending);
 
   nsCOMPtr <nsIMsgDatabase> dbToUse = m_db;
 
   if (!dbToUse) // probably search view
     GetDBForViewIndex(0, getter_AddRefs(dbToUse));
   qsPrivateData.db = dbToUse;
   if (dbToUse)
@@ -4583,17 +4583,17 @@ NS_IMETHODIMP nsMsgDBView::Sort(nsMsgVie
   }
 
   m_sortType = sortType;
   m_sortOrder = sortOrder;
 
   // free all the memory we allocated
   FreeAll(&ptrs);
 
-  m_sortValid = PR_TRUE;
+  m_sortValid = true;
   //m_db->SetSortInfo(sortType, sortOrder);
 
   return NS_OK;
 }
 
 void nsMsgDBView::FreeAll(nsVoidArray *ptrs)
 {
   PRInt32 i;
@@ -4677,21 +4677,21 @@ nsMsgDBView::ThreadIndexOfMsgHdr(nsIMsgD
   nsresult rv = GetThreadContainingMsgHdr(msgHdr, getter_AddRefs(threadHdr));
   NS_ENSURE_SUCCESS(rv, nsMsgViewIndex_None);
 
   nsMsgViewIndex retIndex = nsMsgViewIndex_None;
 
   if (threadHdr != nsnull)
   {
     if (msgIndex == nsMsgViewIndex_None)
-      msgIndex = FindHdr(msgHdr, 0, PR_TRUE);
+      msgIndex = FindHdr(msgHdr, 0, true);
 
     if (msgIndex == nsMsgViewIndex_None)  // hdr is not in view, need to find by thread
     {
-      msgIndex = GetIndexOfFirstDisplayedKeyInThread(threadHdr, PR_TRUE);
+      msgIndex = GetIndexOfFirstDisplayedKeyInThread(threadHdr, true);
       //nsMsgKey    threadKey = (msgIndex == nsMsgViewIndex_None) ? nsMsgKey_None : GetAt(msgIndex);
       if (pFlags)
         threadHdr->GetFlags(pFlags);
     }
     nsMsgViewIndex startOfThread = msgIndex;
     while ((PRInt32) startOfThread >= 0 && m_levels[startOfThread] != 0)
       startOfThread--;
     retIndex = startOfThread;
@@ -4790,17 +4790,17 @@ nsMsgViewIndex  nsMsgDBView::FindKey(nsM
   if (retIndex != nsMsgViewIndex_None && m_flags[retIndex] & MSG_VIEW_FLAG_DUMMY &&  !(m_flags[retIndex] & nsMsgMessageFlags::Elided))
     return (nsMsgViewIndex) m_keys.IndexOf(key, retIndex + 1);
   if (key != nsMsgKey_None && (retIndex == nsMsgViewIndex_None || m_flags[retIndex] & MSG_VIEW_FLAG_DUMMY)
     && expand && m_db)
   {
     nsMsgKey threadKey = GetKeyOfFirstMsgInThread(key);
     if (threadKey != nsMsgKey_None)
     {
-      nsMsgViewIndex threadIndex = FindKey(threadKey, PR_FALSE);
+      nsMsgViewIndex threadIndex = FindKey(threadKey, false);
       if (threadIndex != nsMsgViewIndex_None)
       {
         PRUint32 flags = m_flags[threadIndex];
         if ((flags & nsMsgMessageFlags::Elided) && NS_SUCCEEDED(ExpandByIndex(threadIndex, nsnull))
           || (flags & MSG_VIEW_FLAG_DUMMY))
           retIndex = (nsMsgViewIndex) m_keys.IndexOf(key, threadIndex + 1);
       }
     }
@@ -4875,17 +4875,17 @@ nsresult nsMsgDBView::ExpansionDelta(nsM
 nsresult nsMsgDBView::ToggleExpansion(nsMsgViewIndex index, PRUint32 *numChanged)
 {
   nsresult rv;
   NS_ENSURE_ARG(numChanged);
   *numChanged = 0;
   nsMsgViewIndex threadIndex = GetThreadIndex(index);
   if (threadIndex == nsMsgViewIndex_None)
   {
-    NS_ASSERTION(PR_FALSE, "couldn't find thread");
+    NS_ASSERTION(false, "couldn't find thread");
     return NS_MSG_MESSAGE_NOT_FOUND;
   }
   PRInt32  flags = m_flags[threadIndex];
 
   // if not a thread, or doesn't have children, no expand/collapse
   // If we add sub-thread expand collapse, this will need to be relaxed
   if (!(flags & MSG_VIEW_FLAG_ISTHREAD) || !(flags & MSG_VIEW_FLAG_HASCHILDREN))
     return NS_MSG_MESSAGE_NOT_FOUND;
@@ -4905,17 +4905,17 @@ nsresult nsMsgDBView::ExpandAndSelectThr
 
     NS_ASSERTION(mTreeSelection, "no tree selection");
     if (!mTreeSelection) return NS_ERROR_UNEXPECTED;
 
     PRInt32 index;
     rv = mTreeSelection->GetCurrentIndex(&index);
     NS_ENSURE_SUCCESS(rv,rv);
 
-    rv = ExpandAndSelectThreadByIndex(index, PR_FALSE);
+    rv = ExpandAndSelectThreadByIndex(index, false);
     NS_ENSURE_SUCCESS(rv,rv);
     return NS_OK;
 }
 
 nsresult nsMsgDBView::ExpandAndSelectThreadByIndex(nsMsgViewIndex index, bool augment)
 {
   nsresult rv;
 
@@ -4924,17 +4924,17 @@ nsresult nsMsgDBView::ExpandAndSelectThr
 
   if (inThreadedMode)
   {
     nsCOMPtr<nsIMsgDBHdr> msgHdr;
     GetMsgHdrForViewIndex(index, getter_AddRefs(msgHdr));
     threadIndex = ThreadIndexOfMsgHdr(msgHdr, index);
     if (threadIndex == nsMsgViewIndex_None)
     {
-      NS_ASSERTION(PR_FALSE, "couldn't find thread");
+      NS_ASSERTION(false, "couldn't find thread");
       return NS_MSG_MESSAGE_NOT_FOUND;
     }
   }
   else
   {
     threadIndex = index;
   }
 
@@ -5117,17 +5117,17 @@ nsMsgDBView::GetIndexForThread(nsIMsgDBH
   msgHdr->GetFolder(&EntryInfo1.folder);
   EntryInfo1.folder->Release();
   //check if a custom column handler exists. If it does then grab it and pass it in
   //to either GetCollationKey or GetLongField
   nsIMsgCustomColumnHandler* colHandler = GetCurColumnHandlerFromDBInfo();
 
   viewSortInfo comparisonContext;
   comparisonContext.view = this;
-  comparisonContext.isSecondarySort = PR_FALSE;
+  comparisonContext.isSecondarySort = false;
   comparisonContext.ascendingSort = (m_sortOrder == nsMsgViewSortOrder::ascending);
   nsCOMPtr <nsIMsgDatabase> hdrDB;
   EntryInfo1.folder->GetMsgDatabase(getter_AddRefs(hdrDB));
   comparisonContext.db = hdrDB.get();
   switch (fieldType)
   {
     case kCollationKey:
       rv = GetCollationKey(msgHdr, m_sortType, &EntryInfo1.key, &EntryInfo1.dword, colHandler);
@@ -5233,17 +5233,17 @@ nsMsgViewIndex nsMsgDBView::GetInsertInd
   msgHdr->GetFolder(&EntryInfo1.folder);
   EntryInfo1.folder->Release();
   //check if a custom column handler exists. If it does then grab it and pass it in
   //to either GetCollationKey or GetLongField
   nsIMsgCustomColumnHandler* colHandler = GetCurColumnHandlerFromDBInfo();
 
   viewSortInfo comparisonContext;
   comparisonContext.view = this;
-  comparisonContext.isSecondarySort = PR_FALSE;
+  comparisonContext.isSecondarySort = false;
   comparisonContext.ascendingSort = (sortOrder == nsMsgViewSortOrder::ascending);
   rv = EntryInfo1.folder->GetMsgDatabase(&comparisonContext.db);
   NS_ENSURE_SUCCESS(rv, highIndex);
   comparisonContext.db->Release();
   switch (fieldType)
   {
     case kCollationKey:
       rv = GetCollationKey(msgHdr, sortType, &EntryInfo1.key, &EntryInfo1.dword, colHandler);
@@ -5378,34 +5378,34 @@ nsresult  nsMsgDBView::AddHdr(nsIMsgDBHd
       InsertMsgHdrAt(0, msgHdr, msgKey, flags, levelToAdd);
       if (resultIndex)
         *resultIndex = 0;
 
       // the call to NoteChange() has to happen after we insert the key
       // as NoteChange() will call RowCountChanged() which will call our GetRowCount()
       NoteChange(0, 1, nsMsgViewNotificationCode::insertOrDelete);
     }
-    m_sortValid = PR_FALSE;
+    m_sortValid = false;
   }
   else
   {
     InsertMsgHdrAt(insertIndex, msgHdr, msgKey, flags, 0);
     if (resultIndex)
       *resultIndex = insertIndex;
     // the call to NoteChange() has to happen after we add the key
     // as NoteChange() will call RowCountChanged() which will call our GetRowCount()
     NoteChange(insertIndex, 1, nsMsgViewNotificationCode::insertOrDelete);
   }
   OnHeaderAddedOrDeleted();
   return NS_OK;
 }
 
 bool nsMsgDBView::WantsThisThread(nsIMsgThread * /*threadHdr*/)
 {
-  return PR_TRUE; // default is to want all threads.
+  return true; // default is to want all threads.
 }
 
 nsMsgViewIndex nsMsgDBView::FindParentInThread(nsMsgKey parentKey, nsMsgViewIndex startOfThreadViewIndex)
 {
   nsCOMPtr<nsIMsgDBHdr> msgHdr;
   while (parentKey != nsMsgKey_None)
   {
     nsMsgViewIndex parentIndex = m_keys.IndexOf(parentKey, startOfThreadViewIndex);
@@ -5445,17 +5445,17 @@ nsresult nsMsgDBView::ListIdsInThreadOrd
     {
       if (*pNumListed == numChildren)
       {
         NS_NOTREACHED("thread corrupt in db");
         // if we've listed more messages than are in the thread, then the db
         // is corrupt, and we should invalidate it.
         // we'll use this rv to indicate there's something wrong with the db
         // though for now it probably won't get paid attention to.
-        m_db->SetSummaryValid(PR_FALSE);
+        m_db->SetSummaryValid(false);
         rv = NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE;
         break;
       }
 
       msgHdr = do_QueryInterface(supports);
       if (!(m_viewFlags & nsMsgViewFlagsType::kShowIgnored))
       {
         bool ignored;
@@ -5569,17 +5569,17 @@ nsresult nsMsgDBView::ListIdsInThread(ns
     }
     if (ignoredHeaders + *pNumListed < numChildren)
     {
       NS_NOTREACHED("thread corrupt in db");
       // if we've listed fewer messages than are in the thread, then the db
       // is corrupt, and we should invalidate it.
       // we'll use this rv to indicate there's something wrong with the db
       // though for now it probably won't get paid attention to.
-      m_db->SetSummaryValid(PR_FALSE);
+      m_db->SetSummaryValid(false);
       rv = NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE;
     }
   }
 
   // We may have added too many elements (i.e., subthreads were cut)
   // ### fix for cross folder view case.
   if (*pNumListed < numChildren)
     RemoveRows(viewIndex, numChildren - *pNumListed);
@@ -5655,17 +5655,17 @@ nsMsgDBView::GetThreadRootIndex(nsIMsgDB
   msgHdr->GetFolder(&EntryInfo1.folder);
   EntryInfo1.folder->Release();
   //check if a custom column handler exists. If it does then grab it and pass it in
   //to either GetCollationKey or GetLongField
   nsIMsgCustomColumnHandler* colHandler = GetCurColumnHandlerFromDBInfo();
 
   viewSortInfo comparisonContext;
   comparisonContext.view = this;
-  comparisonContext.isSecondarySort = PR_FALSE;
+  comparisonContext.isSecondarySort = false;
   comparisonContext.ascendingSort = (m_sortOrder == nsMsgViewSortOrder::ascending);
   nsCOMPtr<nsIMsgDatabase> hdrDB;
   EntryInfo1.folder->GetMsgDatabase(getter_AddRefs(hdrDB));
   comparisonContext.db = hdrDB.get();
   switch (fieldType)
   {
     case kCollationKey:
       rv = GetCollationKey(msgHdr, m_sortType, &EntryInfo1.key, &EntryInfo1.dword, colHandler);
@@ -5812,17 +5812,17 @@ void nsMsgDBView::ValidateSort()
   nsCOMPtr<nsIMsgDBHdr> hdr1, hdr2;
 
   PRUint16  maxLen;
   eFieldType fieldType;
   GetFieldTypeAndLenForSort(m_sortType, &maxLen, &fieldType);
 
   viewSortInfo comparisonContext;
   comparisonContext.view = this;
-  comparisonContext.isSecondarySort = PR_FALSE;
+  comparisonContext.isSecondarySort = false;
   comparisonContext.ascendingSort = (m_sortOrder == nsMsgViewSortOrder::ascending);
   nsCOMPtr<nsIMsgDatabase> db;
   GetDBForViewIndex(0, getter_AddRefs(db));
   // this is only for comparing collation keys - it could be any db.
   comparisonContext.db = db.get();
 
   for (nsMsgViewIndex i = 0; i < m_keys.Length();)
   {
@@ -5889,17 +5889,17 @@ nsresult nsMsgDBView::ListUnreadIdsInThr
       nsMsgKey msgKey;
       PRUint32 msgFlags;
       msgHdr->GetMessageKey(&msgKey);
       msgHdr->GetFlags(&msgFlags);
       bool isRead = AdjustReadFlag(msgHdr, &msgFlags);
       if (!isRead)
       {
         // just make sure flag is right in db.
-        m_db->MarkHdrRead(msgHdr, PR_FALSE, nsnull);
+        m_db->MarkHdrRead(msgHdr, false, nsnull);
         if (msgKey != topLevelMsgKey)
         {
           InsertMsgHdrAt(viewIndex, msgHdr, msgKey, msgFlags,
                 FindLevelInThread(msgHdr, startOfThreadViewIndex, viewIndex));
           viewIndex++;
           (*pNumListed)++;
         }
       }
@@ -5965,17 +5965,17 @@ NS_IMETHODIMP nsMsgDBView::OnHdrDeleted(
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBView::OnHdrAdded(nsIMsgDBHdr *aHdrChanged, nsMsgKey aParentKey, PRInt32 aFlags,
                           nsIDBChangeListener *aInstigator)
 {
-  return OnNewHeader(aHdrChanged, aParentKey, PR_FALSE);
+  return OnNewHeader(aHdrChanged, aParentKey, false);
   // probably also want to pass that parent key in, since we went to the trouble
   // of figuring out what it is.
 }
 
 NS_IMETHODIMP
 nsMsgDBView::OnHdrPropertyChanged(nsIMsgDBHdr *aHdrToChange, bool aPreChange, PRUint32 *aStatus, 
                                  nsIDBChangeListener * aInstigator)
 {
@@ -6067,21 +6067,21 @@ void nsMsgDBView::NoteChange(nsMsgViewIn
   {
     switch (changeType)
     {
     case nsMsgViewNotificationCode::changed:
       mTree->InvalidateRange(firstLineChanged, firstLineChanged + numChanged - 1);
       break;
     case nsMsgViewNotificationCode::insertOrDelete:
       if (numChanged < 0)
-        mRemovingRow = PR_TRUE;
+        mRemovingRow = true;
       // the caller needs to have adjusted m_keys before getting here, since
       // RowCountChanged() will call our GetRowCount()
       mTree->RowCountChanged(firstLineChanged, numChanged);
-      mRemovingRow = PR_FALSE;
+      mRemovingRow = false;
     case nsMsgViewNotificationCode::all:
       ClearHdrCache();
       break;
     }
   }
 }
 
 void nsMsgDBView::NoteStartChange(nsMsgViewIndex firstlineChanged, PRInt32 numChanged,
@@ -6172,17 +6172,17 @@ NS_IMETHODIMP nsMsgDBView::GetViewFlags(
 
 NS_IMETHODIMP nsMsgDBView::SetViewFlags(nsMsgViewFlagsTypeValue aViewFlags)
 {
   // if we're turning off threaded display, we need to expand all so that all
   // messages will be displayed.
   if (m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay && ! (aViewFlags & nsMsgViewFlagsType::kThreadedDisplay))
   {
     ExpandAll();
-    m_sortValid = PR_FALSE; // invalidate the sort so sorting will do something
+    m_sortValid = false; // invalidate the sort so sorting will do something
   }
   m_viewFlags = aViewFlags;
 
   if (m_viewFolder)
   {
     nsCOMPtr <nsIMsgDatabase> db;
     nsCOMPtr <nsIDBFolderInfo> folderInfo;
     nsresult rv = m_viewFolder->GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), getter_AddRefs(db));
@@ -6393,17 +6393,17 @@ nsresult nsMsgDBView::NavigateFromPos(ns
             }
             if (curIndex > lastIndex)
             {
                 // wrap around by starting at index 0.
                 if (wrap)
                 {
                     nsMsgKey startKey = GetAt(startIndex);
 
-                    rv = NavigateFromPos(nsMsgNavigationType::nextUnreadMessage, nsMsgViewIndex_None, pResultKey, pResultIndex, pThreadIndex, PR_FALSE);
+                    rv = NavigateFromPos(nsMsgNavigationType::nextUnreadMessage, nsMsgViewIndex_None, pResultKey, pResultIndex, pThreadIndex, false);
 
                     if (*pResultKey == startKey)
                     {
                         // wrapped around and found start message!
                         *pResultIndex = nsMsgViewIndex_None;
                         *pResultKey = nsMsgKey_None;
                     }
                 }
@@ -6452,26 +6452,26 @@ nsresult nsMsgDBView::NavigateFromPos(ns
             }
             break;
         case nsMsgNavigationType::lastUnreadMessage:
             break;
         case nsMsgNavigationType::nextUnreadThread:
             if (startIndex != nsMsgViewIndex_None)
               ApplyCommandToIndices(nsMsgViewCommandType::markThreadRead, &startIndex, 1);
 
-            return NavigateFromPos(nsMsgNavigationType::nextUnreadMessage, startIndex, pResultKey, pResultIndex, pThreadIndex, PR_TRUE);
+            return NavigateFromPos(nsMsgNavigationType::nextUnreadMessage, startIndex, pResultKey, pResultIndex, pThreadIndex, true);
         case nsMsgNavigationType::toggleThreadKilled:
             {
                 bool resultKilled;
                 nsMsgViewIndexArray selection;
                 GetSelectedIndices(selection);
                 ToggleIgnored(selection.Elements(), selection.Length(), &threadIndex, &resultKilled);
                 if (resultKilled)
                 {
-                    return NavigateFromPos(nsMsgNavigationType::nextUnreadThread, threadIndex, pResultKey, pResultIndex, pThreadIndex, PR_TRUE);
+                    return NavigateFromPos(nsMsgNavigationType::nextUnreadThread, threadIndex, pResultKey, pResultIndex, pThreadIndex, true);
                 }
                 else
                 {
                     *pResultIndex = nsMsgViewIndex_None;
                     *pResultKey = nsMsgKey_None;
                     return NS_OK;
                 }
             }
@@ -6479,17 +6479,17 @@ nsresult nsMsgDBView::NavigateFromPos(ns
             {
                 bool resultKilled;
                 nsMsgViewIndexArray selection;
                 GetSelectedIndices(selection);
                 ToggleMessageKilled(selection.Elements(), selection.Length(),
                     &threadIndex, &resultKilled);
                 if (resultKilled)
                 {
-                    return NavigateFromPos(nsMsgNavigationType::nextUnreadMessage, threadIndex, pResultKey, pResultIndex, pThreadIndex, PR_TRUE);
+                    return NavigateFromPos(nsMsgNavigationType::nextUnreadMessage, threadIndex, pResultKey, pResultIndex, pThreadIndex, true);
                 }
                 else
                 {
                     *pResultIndex = nsMsgViewIndex_None;
                     *pResultKey = nsMsgKey_None;
                     return NS_OK;
                 }
             }
@@ -6557,25 +6557,25 @@ NS_IMETHODIMP nsMsgDBView::NavigateStatu
     // warning - we no longer validate index up front because fe passes in -1 for no
     // selection, so if you use index, be sure to validate it before using it
     // as an array index.
     switch (motion)
     {
         case nsMsgNavigationType::firstMessage:
         case nsMsgNavigationType::lastMessage:
             if (GetSize() > 0)
-                enable = PR_TRUE;
+                enable = true;
             break;
         case nsMsgNavigationType::nextMessage:
             if (IsValidIndex(index) && PRUint32(index) < GetSize() - 1)
-                enable = PR_TRUE;
+                enable = true;
             break;
         case nsMsgNavigationType::previousMessage:
             if (IsValidIndex(index) && index != 0 && GetSize() > 1)
-                enable = PR_TRUE;
+                enable = true;
             break;
         case nsMsgNavigationType::firstFlagged:
             rv = FindFirstFlagged(&resultIndex);
             enable = (NS_SUCCEEDED(rv) && resultIndex != nsMsgViewIndex_None);
             break;
         case nsMsgNavigationType::nextFlagged:
             rv = FindNextFlagged(index + 1, &resultIndex);
             enable = (NS_SUCCEEDED(rv) && resultIndex != nsMsgViewIndex_None);
@@ -6585,23 +6585,23 @@ NS_IMETHODIMP nsMsgDBView::NavigateStatu
                 rv = FindPrevFlagged(index, &resultIndex);
             enable = (NS_SUCCEEDED(rv) && resultIndex != nsMsgViewIndex_None);
             break;
         case nsMsgNavigationType::firstNew:
             rv = FindFirstNew(&resultIndex);
             enable = (NS_SUCCEEDED(rv) && resultIndex != nsMsgViewIndex_None);
             break;
         case nsMsgNavigationType::readMore:
-            enable = PR_TRUE;  // for now, always true.
+            enable = true;  // for now, always true.
             break;
         case nsMsgNavigationType::nextFolder:
         case nsMsgNavigationType::nextUnreadThread:
         case nsMsgNavigationType::nextUnreadMessage:
         case nsMsgNavigationType::toggleThreadKilled:
-            enable = PR_TRUE;  // always enabled
+            enable = true;  // always enabled
             break;
         case nsMsgNavigationType::previousUnreadMessage:
             if (IsValidIndex(index))
             {
                 nsMsgKey threadId;
                 rv = FindPrevUnread(m_keys[index], &resultKey, &threadId);
                 enable = (resultKey != nsMsgKey_None);
             }
@@ -6665,17 +6665,17 @@ nsresult nsMsgDBView::FindNextFlagged(ns
 
 nsresult nsMsgDBView::FindFirstNew(nsMsgViewIndex *pResultIndex)
 {
   if (m_db)
   {
     nsMsgKey firstNewKey = nsMsgKey_None;
     m_db->GetFirstNew(&firstNewKey);
     *pResultIndex = (firstNewKey != nsMsgKey_None)
-        ? FindKey(firstNewKey, PR_TRUE) : nsMsgViewIndex_None;
+        ? FindKey(firstNewKey, true) : nsMsgViewIndex_None;
   }
   return NS_OK;
 }
 
 nsresult nsMsgDBView::FindPrevUnread(nsMsgKey startKey, nsMsgKey *pResultKey,
                                      nsMsgKey *resultThreadId)
 {
     nsMsgViewIndex startIndex = FindViewIndex(startKey);
@@ -6908,17 +6908,17 @@ nsresult nsMsgDBView::SetThreadIgnored(n
   if (!IsValidIndex(threadIndex))
     return NS_MSG_INVALID_DBVIEW_INDEX;
 
   NoteChange(threadIndex, 1, nsMsgViewNotificationCode::changed);
   if (ignored)
   {
     nsTArray<nsMsgKey> idsMarkedRead;
 
-    MarkThreadRead(thread, threadIndex, idsMarkedRead, PR_TRUE);
+    MarkThreadRead(thread, threadIndex, idsMarkedRead, true);
     CollapseByIndex(threadIndex, nsnull);
   }
   return m_db->MarkThreadIgnored(thread, m_keys[threadIndex], ignored, this);
 }
 
 nsresult nsMsgDBView::SetSubthreadKilled(nsIMsgDBHdr *header, nsMsgViewIndex msgIndex, bool ignored)
 {
   if (!IsValidIndex(msgIndex))
@@ -6959,17 +6959,17 @@ nsresult nsMsgDBView::SetSubthreadKilled
        bool isKilled;
        
        thread->GetChildHdrAt(current, getter_AddRefs(nextHdr));
        nextHdr->GetIsKilled(&isKilled);
        
        // Ideally, the messages should stop processing here.
        // However, the children are ordered not by thread...
        if (isKilled)
-         nextHdr->MarkRead(PR_TRUE);
+         nextHdr->MarkRead(true);
     }
   }
   return NS_OK;
 }
 
 nsresult nsMsgDBView::SetThreadWatched(nsIMsgThread *thread, nsMsgViewIndex index, bool watched)
 {
   if (!IsValidIndex(index))
@@ -7037,17 +7037,17 @@ nsMsgDBView::GetNumSelected(PRUint32 *aN
   }
   *aNumSelected = numSelectedIncludingCollapsed;
   return rv;
 }
 
 NS_IMETHODIMP nsMsgDBView::GetNumMsgsInView(PRInt32 *aNumMsgs)
 {
   NS_ENSURE_ARG_POINTER(aNumMsgs);
-  return (m_folder) ? m_folder->GetTotalMessages(PR_FALSE, aNumMsgs) :
+  return (m_folder) ? m_folder->GetTotalMessages(false, aNumMsgs) :
                     NS_ERROR_FAILURE;
 }
 /**
  * @note For the IMAP delete model, this applies to both deleting and 
  *       undeleting a message.
  */
 NS_IMETHODIMP
 nsMsgDBView::GetMsgToSelectAfterDelete(nsMsgViewIndex *msgToSelectAfterDelete)
@@ -7143,17 +7143,17 @@ nsMsgDBView::GetMsgToSelectAfterDelete(n
 
 NS_IMETHODIMP
 nsMsgDBView::GetRemoveRowOnMoveOrDelete(bool *aRemoveRowOnMoveOrDelete)
 {
   NS_ENSURE_ARG_POINTER(aRemoveRowOnMoveOrDelete);
   nsCOMPtr <nsIMsgImapMailFolder> imapFolder = do_QueryInterface(m_folder);
   if (!imapFolder)
   {
-    *aRemoveRowOnMoveOrDelete = PR_TRUE;
+    *aRemoveRowOnMoveOrDelete = true;
     return NS_OK;
   }
 
   // need to update the imap-delete model, can change more than once in a session.
   GetImapDeleteModel(nsnull);
 
   // unlike the other imap delete models, "mark as deleted" does not remove rows on delete (or move)
   *aRemoveRowOnMoveOrDelete = (mDeleteModel != nsMsgImapDeleteModels::IMAPDelete);
@@ -7220,67 +7220,67 @@ nsMsgDBView::OnDeleteCompleted(bool aSuc
       for (PRUint32 i = 0; i < numIndices; i++)
         NoteChange(mIndicesToNoteChange[i], -1, nsMsgViewNotificationCode::insertOrDelete);
       if (numIndices > 1)
         mTree->EndUpdateBatch();
     }
     mIndicesToNoteChange.Clear();
   }
 
- m_deletingRows = PR_FALSE;
+ m_deletingRows = false;
  return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBView::GetDb(nsIMsgDatabase **aDB)
 {
   NS_ENSURE_ARG_POINTER(aDB);
   NS_IF_ADDREF(*aDB = m_db);
   return NS_OK;
 }
 
 bool nsMsgDBView::OfflineMsgSelected(nsMsgViewIndex * indices, PRInt32 numIndices)
 {
   nsCOMPtr <nsIMsgLocalMailFolder> localFolder = do_QueryInterface(m_folder);
   if (localFolder)
-    return PR_TRUE;
+    return true;
 
   for (nsMsgViewIndex index = 0; index < (nsMsgViewIndex) numIndices; index++)
   {
     // For cross-folder saved searches, we need to check if any message
     // is in a local folder.
     if (!m_folder)
     {
       nsCOMPtr<nsIMsgFolder> folder;
       GetFolderForViewIndex(indices[index], getter_AddRefs(folder));
       nsCOMPtr <nsIMsgLocalMailFolder> localFolder = do_QueryInterface(folder);
       if (localFolder)
-        return PR_TRUE;
+        return true;
     }
 
     PRUint32 flags = m_flags[indices[index]];
     if ((flags & nsMsgMessageFlags::Offline))
-      return PR_TRUE;
-  }
-  return PR_FALSE;
+      return true;
+  }
+  return false;
 }
 
 bool nsMsgDBView::NonDummyMsgSelected(nsMsgViewIndex * indices, PRInt32 numIndices)
 {
   bool includeCollapsedMsgs = OperateOnMsgsInCollapsedThreads();
   
   for (nsMsgViewIndex index = 0; index < (nsMsgViewIndex) numIndices; index++)
   {
     PRUint32 flags = m_flags[indices[index]];
     // We now treat having a collapsed dummy message selected as if
     // the whole group was selected so we can apply commands to the group.
     if (!(flags & MSG_VIEW_FLAG_DUMMY) ||
         (flags & nsMsgMessageFlags::Elided && includeCollapsedMsgs))
-      return PR_TRUE;
-  }
-  return PR_FALSE;
+      return true;
+  }
+  return false;
 }
 
 NS_IMETHODIMP nsMsgDBView::GetViewIndexForFirstSelectedMsg(nsMsgViewIndex *aViewIndex)
 {
   NS_ENSURE_ARG_POINTER(aViewIndex);
   // If we don't have a tree selection we must be in stand alone mode...
   if (!mTreeSelection)
   {
@@ -7376,17 +7376,17 @@ nsresult nsMsgDBView::GetImapDeleteModel
 // Can't drop on the thread pane.
 //
 NS_IMETHODIMP nsMsgDBView::CanDrop(PRInt32 index,
                                    PRInt32 orient,
                                    nsIDOMDataTransfer *dataTransfer,
                                    bool *_retval)
 {
   NS_ENSURE_ARG_POINTER(_retval);
-  *_retval = PR_FALSE;
+  *_retval = false;
 
   return NS_OK;
 }
 
 
 //
 // Drop
 //
@@ -7402,29 +7402,29 @@ NS_IMETHODIMP nsMsgDBView::Drop(PRInt32 
 
 //
 // IsSorted
 //
 // ...
 //
 NS_IMETHODIMP nsMsgDBView::IsSorted(bool *_retval)
 {
-  *_retval = PR_FALSE;
+  *_retval = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBView::SelectFolderMsgByKey(nsIMsgFolder *aFolder, nsMsgKey aKey)
 {
   NS_ENSURE_ARG_POINTER(aFolder);
   if (aKey == nsMsgKey_None)
     return NS_ERROR_FAILURE;
 
   // this is OK for non search views.
 
-  nsMsgViewIndex viewIndex = FindKey(aKey, PR_TRUE /* expand */);
+  nsMsgViewIndex viewIndex = FindKey(aKey, true /* expand */);
 
   if (mTree)
     mTreeSelection->SetCurrentIndex(viewIndex);
 
   // make sure the current message is once again visible in the thread pane
   // so we don't have to go search for it in the thread pane
   if (mTree && viewIndex != nsMsgViewIndex_None)
   {
@@ -7508,32 +7508,32 @@ nsresult nsMsgDBView::CopyDBView(nsMsgDB
   aNewMsgDBView->m_customColumnHandlers.AppendObjects(m_customColumnHandlers);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgDBView::GetSearchSession(nsIMsgSearchSession* *aSession)
 {
-  NS_ASSERTION(PR_FALSE, "should be overriden by child class");
+  NS_ASSERTION(false, "should be overriden by child class");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 nsMsgDBView::SetSearchSession(nsIMsgSearchSession *aSession)
 {
-  NS_ASSERTION(PR_FALSE, "should be overriden by child class");
+  NS_ASSERTION(false, "should be overriden by child class");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 nsMsgDBView::GetSupportsThreading(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = PR_TRUE;
+  *aResult = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgDBView::FindIndexFromKey(nsMsgKey aMsgKey, bool aExpand, nsMsgViewIndex *aIndex)
 {
   NS_ENSURE_ARG_POINTER(aIndex);
 
@@ -7671,44 +7671,44 @@ nsresult nsMsgDBView::GetDBForHeader(nsI
 }
 
 /**
  * Determine whether junk commands should be enabled on this view.
  * Junk commands are always enabled for mail. For nntp and rss, they
  * may be selectively enabled using an inherited folder property.
  *
  * @param  aViewIndex  view index of the message to check
- * @return             PR_TRUE if junk controls should be enabled
+ * @return             true if junk controls should be enabled
  */
 bool nsMsgDBView::JunkControlsEnabled(nsMsgViewIndex aViewIndex)
 {
   // For normal mail, junk commands are always enabled.
   if (!(mIsNews || mIsRss || mIsXFVirtual))
-    return PR_TRUE;
+    return true;
 
   // we need to check per message or folder
   nsCOMPtr <nsIMsgFolder> folder = m_folder;
   if (!folder && aViewIndex != nsMsgViewIndex_None)
     GetFolderForViewIndex(aViewIndex, getter_AddRefs(folder));
   if (folder)
   {
     // Check if this is a mail message in search folders.
     if (mIsXFVirtual)
     {
       nsCOMPtr <nsIMsgIncomingServer> server;
       folder->GetServer(getter_AddRefs(server));
       nsCAutoString type;
       if (server)
         server->GetType(type);
       if (!(MsgLowerCaseEqualsLiteral(type, "nntp") || MsgLowerCaseEqualsLiteral(type, "rss")))
-        return PR_TRUE;
+        return true;
     }
 
     // For rss and news, check the inherited folder property.
     nsCAutoString junkEnableOverride;
     folder->GetInheritedStringProperty("dobayes.mailnews@mozilla.org#junk",
                                        junkEnableOverride);
     if (junkEnableOverride.EqualsLiteral("true"))
-      return PR_TRUE;
-  }
-
-  return PR_FALSE;
-}
+      return true;
+  }
+
+  return false;
+}
--- a/mailnews/base/src/nsMsgDBView.h
+++ b/mailnews/base/src/nsMsgDBView.h
@@ -303,17 +303,17 @@ protected:
   void ReverseThreads();
   nsresult SaveSortInfo(nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder);
   nsresult PersistFolderInfo(nsIDBFolderInfo **dbFolderInfo);
   void     SetMRUTimeForFolder(nsIMsgFolder *folder);
 
   nsMsgKey  GetAt(nsMsgViewIndex index)
                   {return m_keys.SafeElementAt(index, nsMsgKey_None);}
   nsMsgViewIndex FindViewIndex(nsMsgKey  key)
-     {return FindKey(key, PR_FALSE);}
+     {return FindKey(key, false);}
   /**
    * Find the message header if it is visible in this view.  (Messages in
    *     threads/groups that are elided will not be
    * @param msgHdr Message header to look for.
    * @param startIndex The index to start looking from.
    * @param allowDummy Are dummy headers acceptable?  If yes, then for a group
    *     with a dummy header, we return the root of the thread (the dummy
    *     header), otherwise we return the actual "content" header for the
--- a/mailnews/base/src/nsMsgFolderCache.cpp
+++ b/mailnews/base/src/nsMsgFolderCache.cpp
@@ -111,17 +111,17 @@ nsresult nsMsgFolderCache::InitNewDB()
 {
   nsresult err = InitMDBInfo();
   if (NS_SUCCEEDED(err))
   {
     nsIMdbStore *store = GetStore();
     // create the unique table for the dbFolderInfo.
     mdb_err mdberr;
     mdberr = (nsresult) store->NewTable(GetEnv(), m_folderRowScopeToken,
-    m_folderTableKindToken, PR_FALSE, nsnull, &m_mdbAllFoldersTable);
+    m_folderTableKindToken, false, nsnull, &m_mdbAllFoldersTable);
   }
   return err;
 }
 
 nsresult nsMsgFolderCache::InitExistingDB()
 {
   nsresult err = InitMDBInfo();
   if (NS_FAILED(err))
@@ -130,17 +130,17 @@ nsresult nsMsgFolderCache::InitExistingD
   err = GetStore()->GetTable(GetEnv(), &m_allFoldersTableOID, &m_mdbAllFoldersTable);
   if (NS_SUCCEEDED(err) && m_mdbAllFoldersTable)
   {
     nsIMdbTableRowCursor* rowCursor = nsnull;
     err = m_mdbAllFoldersTable->GetTableRowCursor(GetEnv(), -1, &rowCursor);
     if (NS_SUCCEEDED(err) && rowCursor)
     {
       // iterate over the table rows and create nsMsgFolderCacheElements for each.
-      while (PR_TRUE)
+      while (true)
       {
         nsresult rv;
         nsIMdbRow* hdrRow;
         mdb_pos rowPos;
 
         rv = rowCursor->NextRow(GetEnv(), &hdrRow, &rowPos);
         if (NS_FAILED(rv) || !hdrRow)
           break;
@@ -169,17 +169,17 @@ nsresult nsMsgFolderCache::OpenMDB(const
     ret = mdbFactory->MakeEnv(nsnull, &m_mdbEnv);
     if (NS_SUCCEEDED(ret))
     {
       nsIMdbThumb *thumb = nsnull;
       nsIMdbHeap* dbHeap = 0;
       mdb_bool dbFrozen = mdbBool_kFalse; // not readonly, we want modifiable
 
       if (m_mdbEnv)
-        m_mdbEnv->SetAutoClear(PR_TRUE);
+        m_mdbEnv->SetAutoClear(true);
       if (exists)
       {
         mdbOpenPolicy inOpenPolicy;
         mdb_bool canOpen;
         mdbYarn outFormatVersion;
 
         nsIMdbFile* oldFile = 0;
         ret = mdbFactory->OpenOldFile(m_mdbEnv, dbHeap, nsCString(dbName).get(),
@@ -204,24 +204,24 @@ nsresult nsMsgFolderCache::OpenMDB(const
           }
           NS_RELEASE(oldFile); // always release our file ref, store has own
         }
       }
       if (NS_SUCCEEDED(ret) && thumb)
       {
         mdb_count outTotal;    // total somethings to do in operation
         mdb_count outCurrent;  // subportion of total completed so far
-        mdb_bool outDone = PR_FALSE;      // is operation finished?
+        mdb_bool outDone = false;      // is operation finished?
         mdb_bool outBroken;     // is operation irreparably dead and broken?
         do
         {
           ret = thumb->DoMore(m_mdbEnv, &outTotal, &outCurrent, &outDone, &outBroken);
           if (ret != 0)
           {// mork isn't really doing NS errors yet.
-            outDone = PR_TRUE;
+            outDone = true;
             break;
           }
         }
         while (NS_SUCCEEDED(ret) && !outBroken && !outDone);
         // m_mdbEnv->ClearErrors(); // ### temporary...
         if (NS_SUCCEEDED(ret) && outDone)
         {
           ret = mdbFactory->ThumbToOpenStore(m_mdbEnv, thumb, &m_mdbStore);
@@ -274,18 +274,18 @@ NS_IMETHODIMP nsMsgFolderCache::Init(nsI
   aFile->GetNativePath(dbPath);
   // ### evil cast until MDB supports file streams.
   nsresult rv = OpenMDB(dbPath, exists);
   // if this fails and panacea.dat exists, try blowing away the db and recreating it
   if (NS_FAILED(rv) && exists)
   {
     if (m_mdbStore)
       m_mdbStore->Release();
-    aFile->Remove(PR_FALSE);
-    rv = OpenMDB(dbPath, PR_FALSE);
+    aFile->Remove(false);
+    rv = OpenMDB(dbPath, false);
   }
   return rv;
 }
 
 NS_IMETHODIMP nsMsgFolderCache::GetCacheElement(const nsACString& pathKey, bool createIfMissing,
                                                 nsIMsgFolderCacheElement **result)
 {
   NS_ENSURE_ARG_POINTER(result);
@@ -336,17 +336,17 @@ NS_IMETHODIMP nsMsgFolderCache::Clear()
   m_cacheElements.Clear();
   if (m_mdbAllFoldersTable)
     m_mdbAllFoldersTable->CutAllRows(GetEnv());
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgFolderCache::Close()
 {
-  return Commit(PR_TRUE);
+  return Commit(true);
 }
 
 NS_IMETHODIMP nsMsgFolderCache::Commit(bool compress)
 {
   nsresult ret = NS_OK;
   nsIMdbThumb *commitThumb = nsnull;
   if (m_mdbStore)
   {
@@ -355,18 +355,18 @@ NS_IMETHODIMP nsMsgFolderCache::Commit(b
     else
       ret = m_mdbStore->LargeCommit(GetEnv(), &commitThumb);
   }
 
   if (commitThumb)
   {
     mdb_count outTotal = 0;    // total somethings to do in operation
     mdb_count outCurrent = 0;  // subportion of total completed so far
-    mdb_bool outDone = PR_FALSE;      // is operation finished?
-    mdb_bool outBroken = PR_FALSE;     // is operation irreparably dead and broken?
+    mdb_bool outDone = false;      // is operation finished?
+    mdb_bool outBroken = false;     // is operation irreparably dead and broken?
     while (!outDone && !outBroken && NS_SUCCEEDED(ret))
       ret = commitThumb->DoMore(GetEnv(), &outTotal, &outCurrent, &outDone, &outBroken);
     NS_IF_RELEASE(commitThumb);
   }
   // ### do something with error, but clear it now because mork errors out on commits.
   if (GetEnv())
     GetEnv()->ClearErrors();
   return ret;
--- a/mailnews/base/src/nsMsgFolderCompactor.cpp
+++ b/mailnews/base/src/nsMsgFolderCompactor.cpp
@@ -73,23 +73,23 @@
 NS_IMPL_ISUPPORTS5(nsFolderCompactState, nsIMsgFolderCompactor, nsIRequestObserver, nsIStreamListener, nsICopyMessageStreamListener, nsIUrlListener)
 
 nsFolderCompactState::nsFolderCompactState()
 {
   m_fileStream = nsnull;
   m_size = 0;
   m_curIndex = -1;
   m_status = NS_OK;
-  m_compactAll = PR_FALSE;
-  m_compactOfflineAlso = PR_FALSE;
-  m_compactingOfflineFolders = PR_FALSE;
-  m_parsingFolder=PR_FALSE;
+  m_compactAll = false;
+  m_compactOfflineAlso = false;
+  m_compactingOfflineFolders = false;
+  m_parsingFolder=false;
   m_folderIndex = 0;
-  m_startOfMsg = PR_TRUE;
-  m_needStatusLine = PR_FALSE;
+  m_startOfMsg = true;
+  m_needStatusLine = false;
 }
 
 nsFolderCompactState::~nsFolderCompactState()
 {
   CloseOutputStream();
   if (NS_FAILED(m_status))
   {
     CleanupTempFilesAfterError();
@@ -109,18 +109,18 @@ void nsFolderCompactState::CloseOutputSt
 
 void nsFolderCompactState::CleanupTempFilesAfterError()
 {
   CloseOutputStream();
   if (m_db)
     m_db->ForceClosed();
   nsCOMPtr <nsILocalFile> summaryFile;
   GetSummaryFileLocation(m_file, getter_AddRefs(summaryFile)); 
-  m_file->Remove(PR_FALSE);
-  summaryFile->Remove(PR_FALSE);
+  m_file->Remove(false);
+  summaryFile->Remove(false);
 }
 
 nsresult nsFolderCompactState::BuildMessageURI(const char *baseURI, PRUint32 key, nsCString& uri)
 {
   uri.Append(baseURI);
   uri.Append('#');
   uri.AppendInt(key);
   return NS_OK;
@@ -132,47 +132,47 @@ nsFolderCompactState::InitDB(nsIMsgDatab
 {
   nsCOMPtr<nsIMsgDatabase> mailDBFactory;
   nsresult rv = db->ListAllKeys(m_keyArray);
   NS_ENSURE_SUCCESS(rv, rv);
   m_size = m_keyArray->m_keys.Length();
 
   nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
-  rv = msgDBService->OpenMailDBFromFile(m_file, m_folder, PR_TRUE, PR_FALSE,
+  rv = msgDBService->OpenMailDBFromFile(m_file, m_folder, true, false,
                                      getter_AddRefs(m_db));
 
   if (rv == NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE ||
       rv == NS_MSG_ERROR_FOLDER_SUMMARY_MISSING)
       // if it's out of date then reopen with upgrade.
     return msgDBService->OpenMailDBFromFile(m_file,
-                                            m_folder, PR_TRUE, PR_TRUE,
+                                            m_folder, true, true,
                                getter_AddRefs(m_db));
   return NS_OK;
 }
 
 NS_IMETHODIMP nsFolderCompactState::CompactFolders(nsIArray *aArrayOfFoldersToCompact,
                                                    nsIArray *aOfflineFolderArray,
                                                    nsIUrlListener *aUrlListener,
                                                    nsIMsgWindow *aMsgWindow)
 {
   m_window = aMsgWindow;
   m_listener = aUrlListener;
   if (aArrayOfFoldersToCompact)
     m_folderArray = aArrayOfFoldersToCompact;
   else if (aOfflineFolderArray)
   {
     m_folderArray = aOfflineFolderArray;
-    m_compactingOfflineFolders = PR_TRUE;
+    m_compactingOfflineFolders = true;
     aOfflineFolderArray = nsnull;
   }
   if (!m_folderArray)
     return NS_OK;
  
-  m_compactAll = PR_TRUE;
+  m_compactAll = true;
   m_compactOfflineAlso = aOfflineFolderArray != nsnull;
   if (m_compactOfflineAlso)
     m_offlineFolderArray = aOfflineFolderArray;
 
   m_folderIndex = 0;
   nsresult rv = NS_OK;
   nsCOMPtr<nsIMsgFolder> firstFolder = do_QueryElementAt(m_folderArray,
                                                          m_folderIndex, &rv);
@@ -209,17 +209,17 @@ nsFolderCompactState::Compact(nsIMsgFold
    {
      rv=localFolder->GetDatabaseWOReparse(getter_AddRefs(db));
      if (NS_FAILED(rv) || !db)
      {
        if (rv == NS_MSG_ERROR_FOLDER_SUMMARY_MISSING ||
            rv == NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE)
        {
          m_folder = folder;  //will be used to compact
-         m_parsingFolder = PR_TRUE;
+         m_parsingFolder = true;
          rv = localFolder->ParseFolder(m_window, this);
        }
        return rv;
      }
      else
      {
        bool valid;  
        rv = db->GetSummaryValid(&valid); 
@@ -287,17 +287,17 @@ nsFolderCompactState::Init(nsIMsgFolder 
 
   m_folder = folder;
   m_baseMessageUri = baseMsgUri;
   m_file = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   m_file->InitWithFile(path);
   // need to make sure the temp file goes in the same real directory
   // as the original file, so resolve sym links.
-  m_file->SetFollowLinks(PR_TRUE);
+  m_file->SetFollowLinks(true);
 
   m_file->SetNativeLeafName(NS_LITERAL_CSTRING("nstmp"));
   m_file->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 00600);   //make sure we are not crunching existing nstmp file
   m_window = aMsgWindow;
   m_keyArray = new nsMsgKeyArray;
   m_size = 0;
   m_totalMsgSize = 0;
   rv = InitDB(db);
@@ -335,17 +335,17 @@ NS_IMETHODIMP nsFolderCompactState::OnSt
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP nsFolderCompactState::OnStopRunningUrl(nsIURI *url, nsresult status)
 {
   if (m_parsingFolder)
   {
-    m_parsingFolder = PR_FALSE;
+    m_parsingFolder = false;
     if (NS_SUCCEEDED(status))
       status = Compact(m_folder, m_compactingOfflineFolders, m_listener, m_window);
     else if (m_compactAll)
       CompactNextFolder();
   }
   else if (m_compactAll) // this should be the imap case only
   {
     nsCOMPtr <nsIMsgFolder> prevFolder = do_QueryElementAt(m_folderArray,
@@ -382,17 +382,17 @@ nsresult nsFolderCompactState::StartComp
                               nsnull);
   if (m_size > 0)
   {
     nsCOMPtr<nsIURI> notUsed;
     ShowCompactingStatusMsg();
     AddRef();
     rv = m_messageService->CopyMessages(m_size, m_keyArray->m_keys.Elements(),
                                         m_folder, this,
-                                        PR_FALSE, nsnull, m_window,
+                                        false, nsnull, m_window,
                                         getter_AddRefs(notUsed));
   }
   else
   { // no messages to copy with
     FinishCompact();
 //    Release(); // we don't "own" ourselves yet.
   }
   return rv;
@@ -411,17 +411,17 @@ nsFolderCompactState::FinishCompact()
   // get leaf name and database name of the folder
   nsresult rv = m_folder->GetFilePath(getter_AddRefs(path));
   nsCOMPtr <nsILocalFile> folderPath = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr <nsILocalFile> summaryFile;
   folderPath->InitWithFile(path);
   // need to make sure we put the .msf file in the same directory
   // as the original mailbox, so resolve symlinks.
-  folderPath->SetFollowLinks(PR_TRUE);
+  folderPath->SetFollowLinks(true);
   GetSummaryFileLocation(folderPath, getter_AddRefs(summaryFile));
 
   nsCString leafName;
   summaryFile->GetNativeLeafName(leafName);
   nsCAutoString dbName(leafName);
 
   path->GetNativeLeafName(leafName);
 
@@ -456,66 +456,66 @@ nsFolderCompactState::FinishCompact()
   NS_ASSERTION(tempFileRightSize, "temp file not of expected size in compact");
   
   bool folderRenameSucceeded = false;
   bool msfRenameSucceeded = false;
   if (tempFileRightSize)
   {
     bool summaryFileExists;
     // remove the old folder and database
-    rv = summaryFile->Remove(PR_FALSE);
+    rv = summaryFile->Remove(false);
     summaryFile->Exists(&summaryFileExists);
     if (NS_SUCCEEDED(rv) && !summaryFileExists)
     {
       bool folderPathExists;
-      rv = folderPath->Remove(PR_FALSE);
+      rv = folderPath->Remove(false);
       folderPath->Exists(&folderPathExists);
       if (NS_SUCCEEDED(rv) && !folderPathExists)
       {
         // rename the copied folder and database to be the original folder and
         // database 
         rv = m_file->MoveToNative((nsIFile *) nsnull, leafName);
         NS_ASSERTION(NS_SUCCEEDED(rv), "error renaming compacted folder");
         if (NS_SUCCEEDED(rv))
         {
-          folderRenameSucceeded = PR_TRUE;
+          folderRenameSucceeded = true;
           rv = newSummaryFile->MoveToNative((nsIFile *) nsnull, dbName);
           NS_ASSERTION(NS_SUCCEEDED(rv), "error renaming compacted folder's db");
           msfRenameSucceeded = NS_SUCCEEDED(rv);
         }
       }
     }
     NS_ASSERTION(msfRenameSucceeded && folderRenameSucceeded, "rename failed in compact");
   }
   if (!folderRenameSucceeded)
-    m_file->Remove(PR_FALSE);
+    m_file->Remove(false);
   if (!msfRenameSucceeded)
-    newSummaryFile->Remove(PR_FALSE);
+    newSummaryFile->Remove(false);
   rv = ReleaseFolderLock();
   NS_ASSERTION(NS_SUCCEEDED(rv),"folder lock not released successfully");
   if (msfRenameSucceeded && folderRenameSucceeded)
   {
     nsCOMPtr<nsIMsgDBService> msgDBService =
       do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
-    rv = msgDBService->OpenFolderDB(m_folder, PR_TRUE, getter_AddRefs(m_db));
-    m_db->SetSummaryValid(PR_TRUE);
+    rv = msgDBService->OpenFolderDB(m_folder, true, getter_AddRefs(m_db));
+    m_db->SetSummaryValid(true);
     m_folder->SetDBTransferInfo(transferInfo);
 
     nsCOMPtr<nsIDBFolderInfo> dbFolderInfo;
 
     m_db->GetDBFolderInfo(getter_AddRefs(dbFolderInfo));
 
     // since we're transferring info from the old db, we need to reset the expunged bytes,
     // and set the summary valid again.
     if(dbFolderInfo)
       dbFolderInfo->SetExpungedBytes(0);
   }
   if (m_db)
-    m_db->Close(PR_TRUE);
+    m_db->Close(true);
   m_db = nsnull;
 
   // Notify that compaction of the folder is completed.
   nsCOMPtr<nsIMsgFolderNotificationService>
     notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
   if (notifier)
     notifier->NotifyItemEvent(m_folder,
                               NS_LITERAL_CSTRING("FolderCompactFinish"),
@@ -574,17 +574,17 @@ nsFolderCompactState::CompactNextFolder(
   // and get back here from OnStopRunningUrl.
   if (m_folderIndex >= cnt)
   {
     if (!m_compactOfflineAlso || m_compactingOfflineFolders)
     {
       CompactCompleted(NS_OK);
       return rv;
     }
-    m_compactingOfflineFolders = PR_TRUE;
+    m_compactingOfflineFolders = true;
     nsCOMPtr<nsIMsgFolder> folder = do_QueryElementAt(m_folderArray,
                                                       m_folderIndex-1, &rv);
     if (NS_SUCCEEDED(rv) && folder)
       return folder->CompactAllOfflineStores(this, m_window, m_offlineFolderArray);
     else
       NS_WARNING("couldn't get folder to compact offline stores");
 
   }
@@ -674,64 +674,64 @@ nsFolderCompactState::OnDataAvailable(ns
       rv = GetMessage(getter_AddRefs(m_curSrcHdr));
       NS_ENSURE_SUCCESS(rv, rv);
       if (m_curSrcHdr)
       {
         (void) m_curSrcHdr->GetFlags(&msgFlags);
         (void) m_curSrcHdr->GetStatusOffset(&statusOffset);
         
         if (statusOffset == 0)
-          m_needStatusLine = PR_TRUE;
+          m_needStatusLine = true;
         // x-mozilla-status lines should be at the start of the headers, and the code
         // below assumes everything will fit in m_dataBuffer - if there's not
         // room, skip the keyword stuff.
         if (statusOffset > sizeof(m_dataBuffer) - 1024)
         {
-          checkForKeyword = PR_FALSE;
-          NS_ASSERTION(PR_FALSE, "status offset past end of read buffer size");
+          checkForKeyword = false;
+          NS_ASSERTION(false, "status offset past end of read buffer size");
           
         }
       }
     }
-    m_startOfMsg = PR_FALSE;
+    m_startOfMsg = false;
   }
   PRUint32 maxReadCount, readCount, writeCount;
   PRUint32 bytesWritten;
   
   while (NS_SUCCEEDED(rv) && (PRInt32) count > 0)
   {
     maxReadCount = count > sizeof(m_dataBuffer) - 1 ? sizeof(m_dataBuffer) - 1 : count;
     writeCount = 0;
     rv = inStr->Read(m_dataBuffer, maxReadCount, &readCount);
     
     // if status offset is past the number of bytes we read, it's probably bogus,
     // and we shouldn't do any of the keyword stuff.
     if (statusOffset + X_MOZILLA_STATUS_LEN > readCount)
-      checkForKeyword = PR_FALSE;
+      checkForKeyword = false;
     
     if (NS_SUCCEEDED(rv))
     {
       if (checkForKeyword)
       {
         // make sure that status offset really points to x-mozilla-status line
         if  (!strncmp(m_dataBuffer + statusOffset, X_MOZILLA_STATUS, X_MOZILLA_STATUS_LEN))
         {
           const char *keywordHdr = PL_strnrstr(m_dataBuffer, HEADER_X_MOZILLA_KEYWORDS, readCount);
           if (keywordHdr)
             m_curSrcHdr->GetUint32Property("growKeywords", &needToGrowKeywords);
           else
-            addKeywordHdr = PR_TRUE;
+            addKeywordHdr = true;
           m_curSrcHdr->GetStringProperty("keywords", getter_Copies(msgHdrKeywords));
         }
-        checkForKeyword = PR_FALSE;
+        checkForKeyword = false;
       }
       PRUint32 blockOffset = 0;
       if (m_needStatusLine)
       {
-        m_needStatusLine = PR_FALSE;
+        m_needStatusLine = false;
         // we need to parse out the "From " header, write it out, then 
         // write out the x-mozilla-status headers, and set the 
         // status offset of the dest hdr for later use 
         // in OnEndCopy).
         if (!strncmp(m_dataBuffer, "From ", 5))
         {
           blockOffset = 5;
           // skip from line
@@ -742,23 +742,23 @@ nsFolderCompactState::OnDataAvailable(ns
           PR_snprintf(statusLine, sizeof(statusLine), X_MOZILLA_STATUS_FORMAT MSG_LINEBREAK, msgFlags & 0xFFFF);
           m_fileStream->Write(statusLine, strlen(statusLine), &m_addedHeaderSize);
           PR_snprintf(statusLine, sizeof(statusLine), X_MOZILLA_STATUS2_FORMAT MSG_LINEBREAK, msgFlags & 0xFFFF0000);
           m_fileStream->Write(statusLine, strlen(statusLine), &bytesWritten);
           m_addedHeaderSize += bytesWritten;
         }
         else
         {
-          NS_ASSERTION(PR_FALSE, "not an envelope");
+          NS_ASSERTION(false, "not an envelope");
           // try to mark the db as invalid so it will be reparsed.
           nsCOMPtr <nsIMsgDatabase> srcDB;
           m_folder->GetMsgDatabase(getter_AddRefs(srcDB));
           if (srcDB)
           {
-            srcDB->SetSummaryValid(PR_FALSE);
+            srcDB->SetSummaryValid(false);
             srcDB->ForceClosed();
           }
         }
       }
 #define EXTRA_KEYWORD_HDR "                                                                                 "MSG_LINEBREAK
 
        // if status offset isn't in the first block, this code won't work. There's no good reason
       // for the status offset not to be at the beginning of the message anyway.
@@ -794,17 +794,17 @@ nsFolderCompactState::OnDataAvailable(ns
           { // keywords don't fit, so write out keywords on one line and an extra blank line
             nsCString newKeywordHeader(HEADER_X_MOZILLA_KEYWORDS ": ");
             newKeywordHeader.Append(msgHdrKeywords);
             newKeywordHeader.Append(MSG_LINEBREAK EXTRA_KEYWORD_HDR);
             m_fileStream->Write(newKeywordHeader.get(), newKeywordHeader.Length(), &bytesWritten);
             m_addedHeaderSize += bytesWritten;
           }
         }
-        addKeywordHdr = PR_FALSE;
+        addKeywordHdr = false;
       }
       else if (needToGrowKeywords)
       {
         blockOffset = statusOffset;
         if (!strncmp(m_dataBuffer + blockOffset, X_MOZILLA_STATUS, X_MOZILLA_STATUS_LEN))
           MsgAdvanceToNextLine(m_dataBuffer, blockOffset, readCount); // skip x-mozilla-status hdr
         if (!strncmp(m_dataBuffer + blockOffset, X_MOZILLA_STATUS2, X_MOZILLA_STATUS2_LEN))
           MsgAdvanceToNextLine(m_dataBuffer, blockOffset, readCount); // skip x-mozilla-status2 hdr
@@ -830,40 +830,40 @@ nsFolderCompactState::OnDataAvailable(ns
         PRInt32 curHdrLineStart = 0;
         PRInt32 newKeywordSize = 0;
         while (!done)
         {
           nextBlankOffset = msgHdrKeywords.FindChar(' ', nextBlankOffset);
           if (nextBlankOffset == kNotFound)
           {
             nextBlankOffset = msgHdrKeywords.Length();
-            done = PR_TRUE;
+            done = true;
           }
           if (nextBlankOffset - curHdrLineStart > 90 || done)
           {
             keywordHdr.Append(nsDependentCSubstring(msgHdrKeywords, curHdrLineStart, msgHdrKeywords.Length() - curHdrLineStart));
             keywordHdr.Append(MSG_LINEBREAK);
             m_fileStream->Write(keywordHdr.get(), keywordHdr.Length(), &bytesWritten);
             newKeywordSize += bytesWritten;
             curHdrLineStart = nextBlankOffset;
             keywordHdr.Assign(' ');
           }
           nextBlankOffset++;
         }
         m_fileStream->Write(EXTRA_KEYWORD_HDR, sizeof(EXTRA_KEYWORD_HDR) - 1, &bytesWritten);
         newKeywordSize += bytesWritten;
         m_addedHeaderSize += newKeywordSize - oldKeywordSize;
         m_curSrcHdr->SetUint32Property("growKeywords", 0);
-        needToGrowKeywords = PR_FALSE;
+        needToGrowKeywords = false;
         writeCount += blockOffset - preKeywordBlockOffset; // fudge writeCount
 
       }
       if (readCount <= blockOffset)
       {
-        NS_ASSERTION(PR_FALSE, "bad block offset");
+        NS_ASSERTION(false, "bad block offset");
         // not sure what to do to handle this.
       
       }
       m_fileStream->Write(m_dataBuffer + blockOffset, readCount - blockOffset, &bytesWritten);
       writeCount += bytesWritten;
       count -= readCount;
       if (writeCount != readCount)
       {
@@ -921,21 +921,21 @@ nsresult nsOfflineStoreCompactState::Cop
       // settings.
       hdr->SetStringProperty("pendingRemoval", "");
       continue;
     }
     m_messageUri.Truncate(); // clear the previous message uri
     rv = BuildMessageURI(m_baseMessageUri.get(), m_keyArray->m_keys[m_curIndex],
                                   m_messageUri);
     NS_ENSURE_SUCCESS(rv, rv);
-    m_startOfMsg = PR_TRUE;
+    m_startOfMsg = true;
     nsCOMPtr<nsISupports> thisSupports;
     QueryInterface(NS_GET_IID(nsISupports), getter_AddRefs(thisSupports));
     rv = m_messageService->StreamMessage(m_messageUri.get(), thisSupports, m_window, nsnull,
-                                    PR_FALSE, EmptyCString(), PR_TRUE, nsnull);
+                                    false, EmptyCString(), true, nsnull);
     // if copy fails, we clear the offline flag on the source message.
     if (NS_FAILED(rv))
     {
       nsCOMPtr<nsIMsgDBHdr> hdr;
       GetMessage(getter_AddRefs(hdr));
       if (hdr)
       {
         PRUint32 resultFlags;
@@ -1048,21 +1048,21 @@ nsOfflineStoreCompactState::FinishCompac
     // make sure the new database is valid
   nsCOMPtr <nsIDBFolderInfo> dbFolderInfo;
   m_db->GetDBFolderInfo(getter_AddRefs(dbFolderInfo));
   if (dbFolderInfo)
     dbFolderInfo->SetExpungedBytes(0);
   // this forces the m_folder to update mExpungedBytes from the db folder info.
   PRUint32 expungedBytes;
   m_folder->GetExpungedBytes(&expungedBytes);
-  m_folder->UpdateSummaryTotals(PR_TRUE);
-  m_db->SetSummaryValid(PR_TRUE);
+  m_folder->UpdateSummaryTotals(true);
+  m_db->SetSummaryValid(true);
 
     // remove the old folder 
-  path->Remove(PR_FALSE);
+  path->Remove(false);
 
     // rename the copied folder to be the original folder 
   m_file->MoveToNative((nsIFile *) nsnull, leafName);
 
   ShowStatusMsg(EmptyString());
   m_folder->NotifyCompactCompleted();
   if (m_compactAll)
     rv = CompactNextFolder();
@@ -1106,29 +1106,29 @@ nsFolderCompactState::EndMessage(nsMsgKe
 NS_IMETHODIMP
 nsFolderCompactState::EndCopy(nsISupports *url, nsresult aStatus)
 {
   nsCOMPtr<nsIMsgDBHdr> msgHdr;
   nsCOMPtr<nsIMsgDBHdr> newMsgHdr;
 
   if (m_curIndex >= m_size)
   {
-    NS_ASSERTION(PR_FALSE, "m_curIndex out of bounds");
+    NS_ASSERTION(false, "m_curIndex out of bounds");
     return NS_OK;
   }
 
   /**
    * Done with the current message; copying the existing message header
    * to the new database.
    * XXX This will need to be changed when we support local mail folders
    * > 4GB. We'll need to set the messageOffset attribute on the new header,
    * and assign the nsMsgKey some other way.
    */
   if (m_curSrcHdr)
-    m_db->CopyHdrFromExistingHdr((nsMsgKey) m_startOfNewMsg, m_curSrcHdr, PR_TRUE,
+    m_db->CopyHdrFromExistingHdr((nsMsgKey) m_startOfNewMsg, m_curSrcHdr, true,
                                getter_AddRefs(newMsgHdr));
   m_curSrcHdr = nsnull;
   if (newMsgHdr)
   {
     if ( m_statusOffset != 0)
       newMsgHdr->SetStatusOffset(m_statusOffset);
       
     char storeToken[100];
@@ -1143,17 +1143,17 @@ nsFolderCompactState::EndCopy(nsISupport
       newMsgHdr->SetMessageSize(msgSize);
     }
     m_totalMsgSize += msgSize;
   }
 
 //  m_db->Commit(nsMsgDBCommitType::kLargeCommit);  // no sense commiting until the end
     // advance to next message 
   m_curIndex ++;
-  m_startOfMsg = PR_TRUE;
+  m_startOfMsg = true;
   nsCOMPtr <nsIMsgStatusFeedback> statusFeedback;
   if (m_window)
   {
     m_window->GetStatusFeedback(getter_AddRefs(statusFeedback));
     if (statusFeedback)
       statusFeedback->ShowProgress (100 * m_curIndex / m_size);
   }
   return NS_OK;
@@ -1206,17 +1206,17 @@ nsOfflineStoreCompactState::OnDataAvaila
     maxReadCount = count > sizeof(m_dataBuffer) - 1 ? sizeof(m_dataBuffer) - 1 : count;
     writeCount = 0;
     rv = inStr->Read(m_dataBuffer, maxReadCount, &readCount);
 
     if (NS_SUCCEEDED(rv))
     {
       if (m_startOfMsg)
       {
-        m_startOfMsg = PR_FALSE;
+        m_startOfMsg = false;
         // check if there's an envelope header; if not, write one.
         if (strncmp(m_dataBuffer, "From ", 5))
         {
           m_fileStream->Write("From "CRLF, 7, &bytesWritten);
           m_offlineMsgSize += bytesWritten;
         }
       }
       m_fileStream->Write(m_dataBuffer, readCount, &bytesWritten);
--- a/mailnews/base/src/nsMsgFolderDataSource.cpp
+++ b/mailnews/base/src/nsMsgFolderDataSource.cpp
@@ -383,17 +383,17 @@ NS_IMETHODIMP nsMsgFolderDataSource::Get
     return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgFolderDataSource::GetSource(nsIRDFResource* property,
                                                nsIRDFNode* target,
                                                bool tv,
                                                nsIRDFResource** source /* out */)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsMsgFolderDataSource::GetTarget(nsIRDFResource* source,
                                                nsIRDFResource* property,
                                                bool tv,
                                                nsIRDFNode** target)
 {
@@ -477,17 +477,17 @@ NS_IMETHODIMP nsMsgFolderDataSource::Get
 
 NS_IMETHODIMP nsMsgFolderDataSource::Assert(nsIRDFResource* source,
                       nsIRDFResource* property,
                       nsIRDFNode* target,
                       bool tv)
 {
   nsresult rv;
   nsCOMPtr<nsIMsgFolder> folder(do_QueryInterface(source, &rv));
-  //We don't handle tv = PR_FALSE at the moment.
+  //We don't handle tv = false at the moment.
   if(NS_SUCCEEDED(rv) && tv)
     return DoFolderAssert(folder, property, target);
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP nsMsgFolderDataSource::Unassert(nsIRDFResource* source,
                         nsIRDFResource* property,
                         nsIRDFNode* target)
@@ -505,17 +505,17 @@ NS_IMETHODIMP nsMsgFolderDataSource::Has
                             bool tv,
                             bool* hasAssertion)
 {
   nsresult rv;
   nsCOMPtr<nsIMsgFolder> folder(do_QueryInterface(source, &rv));
   if(NS_SUCCEEDED(rv))
     return DoFolderHasAssertion(folder, property, target, tv, hasAssertion);
   else
-    *hasAssertion = PR_FALSE;
+    *hasAssertion = false;
   return NS_OK;
 }
 
 
 NS_IMETHODIMP
 nsMsgFolderDataSource::HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc, bool *result)
 {
   nsresult rv;
@@ -550,17 +550,17 @@ nsMsgFolderDataSource::HasArcOut(nsIRDFR
       aArc == kNC_InVFEditSearchScope ||
       aArc == kNC_ImapShared ||
       aArc == kNC_Synchronize ||
       aArc == kNC_SyncDisabled ||
       aArc == kNC_CanSearchMessages);
   }
   else
   {
-    *result = PR_FALSE;
+    *result = false;
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgFolderDataSource::ArcLabelsIn(nsIRDFNode* node,
                                                  nsISimpleEnumerator** labels)
 {
   return nsMsgRDFDataSource::ArcLabelsIn(node, labels);
@@ -637,29 +637,29 @@ nsMsgFolderDataSource::GetAllCmds(nsIRDF
 
   nsCOMPtr<nsIMsgFolder> folder(do_QueryInterface(source, &rv));
   if (NS_FAILED(rv)) return rv;
 
   nsCOMPtr<nsIMutableArray> cmds =
     do_CreateInstance(NS_ARRAY_CONTRACTID);
   NS_ENSURE_STATE(cmds);
 
-  cmds->AppendElement(kNC_Delete, PR_FALSE);
-  cmds->AppendElement(kNC_ReallyDelete, PR_FALSE);
-  cmds->AppendElement(kNC_NewFolder, PR_FALSE);
-  cmds->AppendElement(kNC_GetNewMessages, PR_FALSE);
-  cmds->AppendElement(kNC_Copy, PR_FALSE);
-  cmds->AppendElement(kNC_Move, PR_FALSE);
-  cmds->AppendElement(kNC_CopyFolder, PR_FALSE);
-  cmds->AppendElement(kNC_MoveFolder, PR_FALSE);
-  cmds->AppendElement(kNC_MarkAllMessagesRead, PR_FALSE);
-  cmds->AppendElement(kNC_Compact, PR_FALSE);
-  cmds->AppendElement(kNC_CompactAll, PR_FALSE);
-  cmds->AppendElement(kNC_Rename, PR_FALSE);
-  cmds->AppendElement(kNC_EmptyTrash, PR_FALSE);
+  cmds->AppendElement(kNC_Delete, false);
+  cmds->AppendElement(kNC_ReallyDelete, false);
+  cmds->AppendElement(kNC_NewFolder, false);
+  cmds->AppendElement(kNC_GetNewMessages, false);
+  cmds->AppendElement(kNC_Copy, false);
+  cmds->AppendElement(kNC_Move, false);
+  cmds->AppendElement(kNC_CopyFolder, false);
+  cmds->AppendElement(kNC_MoveFolder, false);
+  cmds->AppendElement(kNC_MarkAllMessagesRead, false);
+  cmds->AppendElement(kNC_Compact, false);
+  cmds->AppendElement(kNC_CompactAll, false);
+  cmds->AppendElement(kNC_Rename, false);
+  cmds->AppendElement(kNC_EmptyTrash, false);
 
   return cmds->Enumerate(commands);
 }
 
 NS_IMETHODIMP
 nsMsgFolderDataSource::IsCommandEnabled(nsISupportsArray/*<nsIRDFResource>*/* aSources,
                                         nsIRDFResource*   aCommand,
                                         nsISupportsArray/*<nsIRDFResource>*/* aArguments,
@@ -686,22 +686,22 @@ nsMsgFolderDataSource::IsCommandEnabled(
             (aCommand == kNC_MoveFolder) ||
             (aCommand == kNC_GetNewMessages) ||
             (aCommand == kNC_MarkAllMessagesRead) ||
             (aCommand == kNC_Compact) ||
             (aCommand == kNC_CompactAll) ||
             (aCommand == kNC_Rename) ||
             (aCommand == kNC_EmptyTrash)))
       {
-        *aResult = PR_FALSE;
+        *aResult = false;
         return NS_OK;
       }
     }
   }
-  *aResult = PR_TRUE;
+  *aResult = true;
   return NS_OK; // succeeded for all sources
 }
 
 NS_IMETHODIMP
 nsMsgFolderDataSource::DoCommand(nsISupportsArray/*<nsIRDFResource>*/* aSources,
                                  nsIRDFResource*   aCommand,
                                  nsISupportsArray/*<nsIRDFResource>*/* aArguments)
 {
@@ -731,60 +731,60 @@ nsMsgFolderDataSource::DoCommand(nsISupp
 
   for ( ; i < cnt; i++)
   {
     nsCOMPtr<nsIMsgFolder> folder = do_QueryElementAt(aSources, i, &rv);
     if (NS_SUCCEEDED(rv))
     {
       if ((aCommand == kNC_Delete))
       {
-        rv = DoDeleteFromFolder(folder, aArguments, window, PR_FALSE);
+        rv = DoDeleteFromFolder(folder, aArguments, window, false);
       }
       if ((aCommand == kNC_ReallyDelete))
       {
-        rv = DoDeleteFromFolder(folder, aArguments, window, PR_TRUE);
+        rv = DoDeleteFromFolder(folder, aArguments, window, true);
       }
       else if((aCommand == kNC_NewFolder))
       {
         rv = DoNewFolder(folder, aArguments, window);
       }
       else if((aCommand == kNC_GetNewMessages))
       {
         nsCOMPtr<nsIMsgIncomingServer> server = do_QueryElementAt(aArguments, i, &rv);
         NS_ENSURE_SUCCESS(rv, rv);
         rv = server->GetNewMessages(folder, window, nsnull);
       }
       else if((aCommand == kNC_Copy))
       {
-        rv = DoCopyToFolder(folder, aArguments, window, PR_FALSE);
+        rv = DoCopyToFolder(folder, aArguments, window, false);
       }
       else if((aCommand == kNC_Move))
       {
-        rv = DoCopyToFolder(folder, aArguments, window, PR_TRUE);
+        rv = DoCopyToFolder(folder, aArguments, window, true);
       }
       else if((aCommand == kNC_CopyFolder))
       {
-        rv = DoFolderCopyToFolder(folder, aArguments, window, PR_FALSE);
+        rv = DoFolderCopyToFolder(folder, aArguments, window, false);
       }
       else if((aCommand == kNC_MoveFolder))
       {
-        rv = DoFolderCopyToFolder(folder, aArguments, window, PR_TRUE);
+        rv = DoFolderCopyToFolder(folder, aArguments, window, true);
       }
       else if((aCommand == kNC_MarkAllMessagesRead))
       {
         rv = folder->MarkAllMessagesRead(window);
       }
       else if ((aCommand == kNC_Compact))
       {
         rv = folder->Compact(nsnull, window);
       }
       else if ((aCommand == kNC_CompactAll))
       {
         // this will also compact offline stores for IMAP
-        rv = folder->CompactAll(nsnull, window, PR_TRUE);
+        rv = folder->CompactAll(nsnull, window, true);
       }
       else if ((aCommand == kNC_EmptyTrash))
       {
           rv = folder->EmptyTrash(window, nsnull);
       }
       else if ((aCommand == kNC_Rename))
       {
         nsCOMPtr<nsIRDFLiteral> literal = do_QueryElementAt(aArguments, 0, &rv);
@@ -803,32 +803,32 @@ nsMsgFolderDataSource::DoCommand(nsISupp
   }
   //for the moment return NS_OK, because failure stops entire DoCommand process.
   return rv;
   //return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgFolderDataSource::OnItemAdded(nsIMsgFolder *parentItem, nsISupports *item)
 {
-  return OnItemAddedOrRemoved(parentItem, item, PR_TRUE);
+  return OnItemAddedOrRemoved(parentItem, item, true);
 }
 
 NS_IMETHODIMP nsMsgFolderDataSource::OnItemRemoved(nsIMsgFolder *parentItem, nsISupports *item)
 {
-  return OnItemAddedOrRemoved(parentItem, item, PR_FALSE);
+  return OnItemAddedOrRemoved(parentItem, item, false);
 }
 
 nsresult nsMsgFolderDataSource::OnItemAddedOrRemoved(nsIMsgFolder *parentItem, nsISupports *item, bool added)
 {
   nsCOMPtr<nsIRDFNode> itemNode(do_QueryInterface(item));
   if (itemNode)
   {
     nsCOMPtr<nsIRDFResource> parentResource(do_QueryInterface(parentItem));
     if (parentResource) // RDF is not happy about a null parent resource.
-      NotifyObservers(parentResource, kNC_Child, itemNode, nsnull, added, PR_FALSE);
+      NotifyObservers(parentResource, kNC_Child, itemNode, nsnull, added, false);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgFolderDataSource::OnItemPropertyChanged(nsIMsgFolder *resource,
                                              nsIAtom *property,
                                              const char *oldValue,
@@ -871,17 +871,17 @@ nsMsgFolderDataSource::OnItemUnicharProp
                                                     nsIAtom *property,
                                                     const PRUnichar *oldValue,
                                                     const PRUnichar *newValue)
 {
   nsCOMPtr<nsIRDFResource> resource(do_QueryInterface(folder));
   if (kNameAtom == property)
   {
     PRInt32 numUnread;
-    folder->GetNumUnread(PR_FALSE, &numUnread);
+    folder->GetNumUnread(false, &numUnread);
     NotifyFolderTreeNameChanged(folder, resource, numUnread);
     NotifyFolderTreeSimpleNameChanged(folder, resource);
     NotifyFolderNameChanged(folder, resource);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
@@ -931,21 +931,21 @@ nsMsgFolderDataSource::OnItemEvent(nsIMs
 
 nsresult nsMsgFolderDataSource::createFolderNode(nsIMsgFolder* folder,
                                                  nsIRDFResource* property,
                                                  nsIRDFNode** target)
 {
   nsresult rv = NS_RDF_NO_VALUE;
 
   if (kNC_NameSort == property)
-    rv = createFolderNameNode(folder, target, PR_TRUE);
+    rv = createFolderNameNode(folder, target, true);
   else if(kNC_FolderTreeNameSort == property)
-    rv = createFolderNameNode(folder, target, PR_TRUE);
+    rv = createFolderNameNode(folder, target, true);
   else if (kNC_Name == property)
-    rv = createFolderNameNode(folder, target, PR_FALSE);
+    rv = createFolderNameNode(folder, target, false);
   else if(kNC_Open == property)
     rv = createFolderOpenNode(folder, target);
   else if (kNC_FolderTreeName == property)
     rv = createFolderTreeNameNode(folder, target);
   else if (kNC_FolderTreeSimpleName == property)
     rv = createFolderTreeSimpleNameNode(folder, target);
   else if ((kNC_SpecialFolder == property))
     rv = createFolderSpecialNode(folder,target);
@@ -979,21 +979,21 @@ nsresult nsMsgFolderDataSource::createFo
     rv = createUnreadMessagesNode(folder, target);
   else if ((kNC_FolderSize == property))
     rv = createFolderSizeNode(folder, target);
   else if ((kNC_Charset == property))
     rv = createCharsetNode(folder, target);
   else if ((kNC_BiffState == property))
     rv = createBiffStateNodeFromFolder(folder, target);
   else if ((kNC_HasUnreadMessages == property))
-    rv = createHasUnreadMessagesNode(folder, PR_FALSE, target);
+    rv = createHasUnreadMessagesNode(folder, false, target);
   else if ((kNC_NewMessages == property))
     rv = createNewMessagesNode(folder, target);
   else if ((kNC_SubfoldersHaveUnreadMessages == property))
-    rv = createHasUnreadMessagesNode(folder, PR_TRUE, target);
+    rv = createHasUnreadMessagesNode(folder, true, target);
   else if ((kNC_Child == property))
     rv = createFolderChildNode(folder, target);
   else if ((kNC_NoSelect == property))
     rv = createFolderNoSelectNode(folder, target);
   else if ((kNC_VirtualFolder == property))
     rv = createFolderVirtualNode(folder, target);
   else if (kNC_InVFEditSearchScope == property)
     rv = createInVFEditSearchScopeNode(folder, target);
@@ -1044,17 +1044,17 @@ nsMsgFolderDataSource::createFolderTreeN
                                                 nsIRDFNode **target)
 {
   nsString name;
   nsresult rv = GetFolderDisplayName(folder, name);
   if (NS_FAILED(rv)) return rv;
   nsAutoString nameString(name);
   PRInt32 unreadMessages;
 
-  rv = folder->GetNumUnread(PR_FALSE, &unreadMessages);
+  rv = folder->GetNumUnread(false, &unreadMessages);
   if(NS_SUCCEEDED(rv))
     CreateUnreadMessagesNameString(unreadMessages, nameString);
 
   createNode(nameString.get(), target, getRDFService());
   return NS_OK;
 }
 
 nsresult nsMsgFolderDataSource::createFolderTreeSimpleNameNode(nsIMsgFolder * folder, nsIRDFNode **target)
@@ -1469,17 +1469,17 @@ nsMsgFolderDataSource::createTotalMessag
   nsresult rv = folder->GetIsServer(&isServer);
   if (NS_FAILED(rv)) return rv;
 
   PRInt32 totalMessages;
   if(isServer)
     totalMessages = kDisplayBlankCount;
   else
   {
-    rv = folder->GetTotalMessages(PR_FALSE, &totalMessages);
+    rv = folder->GetTotalMessages(false, &totalMessages);
     if(NS_FAILED(rv)) return rv;
   }
   GetNumMessagesNode(totalMessages, target);
 
   return rv;
 }
 
 nsresult
@@ -1558,17 +1558,17 @@ nsMsgFolderDataSource::createUnreadMessa
   nsresult rv = folder->GetIsServer(&isServer);
   if (NS_FAILED(rv)) return rv;
 
   PRInt32 totalUnreadMessages;
   if(isServer)
     totalUnreadMessages = kDisplayBlankCount;
   else
   {
-    rv = folder->GetNumUnread(PR_FALSE, &totalUnreadMessages);
+    rv = folder->GetNumUnread(false, &totalUnreadMessages);
     if(NS_FAILED(rv)) return rv;
   }
   GetNumMessagesNode(totalUnreadMessages, target);
 
   return NS_OK;
 }
 
 nsresult
@@ -1585,17 +1585,17 @@ nsMsgFolderDataSource::createHasUnreadMe
   {
     rv = folder->GetNumUnread(aIncludeSubfolders, &totalUnreadMessages);
     if(NS_FAILED(rv)) return rv;
     // if we're including sub-folders, we're trying to find out if child folders
     // have unread. If so, we subtract the unread msgs in the current folder.
     if (aIncludeSubfolders)
     {
       PRInt32 numUnreadInFolder;
-      rv = folder->GetNumUnread(PR_FALSE, &numUnreadInFolder);
+      rv = folder->GetNumUnread(false, &numUnreadInFolder);
       NS_ENSURE_SUCCESS(rv, rv);
       // don't subtract if numUnread is negative (which means we don't know the unread count)
       if (numUnreadInFolder > 0)
         totalUnreadMessages -= numUnreadInFolder;
     }
     *target = (totalUnreadMessages > 0) ? kTrueLiteral : kFalseLiteral;
   }
 
@@ -1708,17 +1708,17 @@ nsMsgFolderDataSource::NotifyAncestors(n
   nsCOMPtr<nsIRDFResource> parentFolderResource = do_QueryInterface(parentMsgFolder,&rv);
   NS_ENSURE_SUCCESS(rv,rv);
 
   // if we're setting the subFoldersHaveUnreadMessages property to false, check
   // if the folder really doesn't have subfolders with unread messages.
   if (aPropertyResource == kNC_SubfoldersHaveUnreadMessages && aNode == kFalseLiteral)
   {
     nsCOMPtr <nsIRDFNode> unreadMsgsNode;
-    createHasUnreadMessagesNode(parentMsgFolder, PR_TRUE, getter_AddRefs(unreadMsgsNode));
+    createHasUnreadMessagesNode(parentMsgFolder, true, getter_AddRefs(unreadMsgsNode));
     aNode = unreadMsgsNode;
   }
   NotifyPropertyChanged(parentFolderResource, aPropertyResource, aNode);
 
   return NotifyAncestors(parentMsgFolder, aPropertyResource, aNode);
 }
 
 // New Messages
@@ -1781,17 +1781,17 @@ nsMsgFolderDataSource::OnUnreadMessagePr
 **/
 nsresult
 nsMsgFolderDataSource::OnFolderSortOrderPropertyChanged(nsIRDFResource *folderResource, PRInt32 oldValue, PRInt32 newValue)
 {
   nsCOMPtr<nsIMsgFolder> folder(do_QueryInterface(folderResource));
   if (folder)
   {
     nsCOMPtr<nsIRDFNode> newNode;
-    createFolderNameNode(folder, getter_AddRefs(newNode), PR_TRUE);
+    createFolderNameNode(folder, getter_AddRefs(newNode), true);
     NotifyPropertyChanged(folderResource, kNC_FolderTreeNameSort, newNode);
   }
   return NS_OK;
 }
 
 nsresult
 nsMsgFolderDataSource::OnFolderSizePropertyChanged(nsIRDFResource *folderResource, PRInt32 oldValue, PRInt32 newValue)
 {
@@ -1885,27 +1885,27 @@ nsresult nsMsgFolderDataSource::DoCopyTo
   nsCOMPtr<nsIMutableArray> messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID));
 
   // Remove first element
   for(PRUint32 i = 1; i < itemCount; i++)
   {
     nsCOMPtr<nsIMsgDBHdr> message(do_QueryElementAt(arguments, i));
     if (message)
     {
-      messageArray->AppendElement(message, PR_FALSE);
+      messageArray->AppendElement(message, false);
     }
   }
 
   //Call copyservice with dstFolder, srcFolder, messages, isMove, and txnManager
   nsCOMPtr<nsIMsgCopyService> copyService =
     do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
 
   return copyService->CopyMessages(srcFolder, messageArray, dstFolder, isMove,
-    nsnull, msgWindow, PR_TRUE/* allowUndo */);
+    nsnull, msgWindow, true/* allowUndo */);
 }
 
 nsresult nsMsgFolderDataSource::DoFolderCopyToFolder(nsIMsgFolder *dstFolder, nsISupportsArray *arguments,
                                                      nsIMsgWindow *msgWindow, bool isMoveFolder)
 {
   nsresult rv;
   PRUint32 itemCount;
   rv = arguments->Count(&itemCount);
@@ -1915,17 +1915,17 @@ nsresult nsMsgFolderDataSource::DoFolder
   if(itemCount < 1)
     return NS_ERROR_FAILURE;
 
   if (!isMoveFolder)   // copy folder not on the same server
   {
     // Create an nsIMutableArray from the nsISupportsArray
     nsCOMPtr<nsIMutableArray> folderArray(do_CreateInstance(NS_ARRAY_CONTRACTID));
     for (PRUint32 i = 0; i < itemCount; i++)
-      folderArray->AppendElement(arguments->ElementAt(i), PR_FALSE);
+      folderArray->AppendElement(arguments->ElementAt(i), false);
 
     //Call copyservice with dstFolder, srcFolder, folders and isMoveFolder
     nsCOMPtr<nsIMsgCopyService> copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv);
     if(NS_SUCCEEDED(rv))
     {
       rv = copyService->CopyFolders(folderArray, dstFolder, isMoveFolder,
         nsnull, msgWindow);
 
@@ -1965,28 +1965,28 @@ nsresult nsMsgFolderDataSource::DoDelete
   //for deletion.
   for(PRUint32 item = 0; item < itemCount; item++)
   {
     nsCOMPtr<nsISupports> supports(do_QueryElementAt(arguments, item));
     nsCOMPtr<nsIMsgDBHdr> deletedMessage(do_QueryInterface(supports));
     nsCOMPtr<nsIMsgFolder> deletedFolder(do_QueryInterface(supports));
     if (deletedMessage)
     {
-      messageArray->AppendElement(supports, PR_FALSE);
+      messageArray->AppendElement(supports, false);
     }
     else if(deletedFolder)
     {
-      folderArray->AppendElement(supports, PR_FALSE);
+      folderArray->AppendElement(supports, false);
     }
   }
   PRUint32 cnt;
   rv = messageArray->GetLength(&cnt);
   if (NS_FAILED(rv)) return rv;
   if (cnt > 0)
-    rv = folder->DeleteMessages(messageArray, msgWindow, reallyDelete, PR_FALSE, nsnull, PR_TRUE /*allowUndo*/);
+    rv = folder->DeleteMessages(messageArray, msgWindow, reallyDelete, false, nsnull, true /*allowUndo*/);
 
   rv = folderArray->GetLength(&cnt);
   if (NS_FAILED(rv)) return rv;
   if (cnt > 0)
   {
     nsCOMPtr<nsIMsgFolder> folderToDelete = do_QueryElementAt(folderArray, 0);
     PRUint32 folderFlags = 0;
     if (folderToDelete)
@@ -2073,17 +2073,17 @@ nsresult nsMsgFolderDataSource::DoFolder
 {
   nsresult rv = NS_OK;
   if(!hasAssertion)
     return NS_ERROR_NULL_POINTER;
 
   //We're not keeping track of negative assertions on folders.
   if(!tv)
   {
-    *hasAssertion = PR_FALSE;
+    *hasAssertion = false;
     return NS_OK;
   }
 
   if((kNC_Child == property))
   {
     nsCOMPtr<nsIMsgFolder> childFolder(do_QueryInterface(target, &rv));
     if(NS_SUCCEEDED(rv))
     {
@@ -2125,23 +2125,23 @@ nsresult nsMsgFolderDataSource::DoFolder
     nsCOMPtr<nsIRDFResource> folderResource(do_QueryInterface(folder, &rv));
 
     if(NS_FAILED(rv))
       return rv;
 
     rv = GetTargetHasAssertion(this, folderResource, property, tv, target, hasAssertion);
   }
   else
-    *hasAssertion = PR_FALSE;
+    *hasAssertion = false;
   return rv;
 }
 
 nsMsgFlatFolderDataSource::nsMsgFlatFolderDataSource()
 {
-  m_builtFolders = PR_FALSE;
+  m_builtFolders = false;
 }
 
 nsMsgFlatFolderDataSource::~nsMsgFlatFolderDataSource()
 {
 }
 
 nsresult nsMsgFlatFolderDataSource::Init()
 {
@@ -2153,17 +2153,17 @@ nsresult nsMsgFlatFolderDataSource::Init
   rdf->GetResource(dsUri, getter_AddRefs(m_rootResource));
 
   return nsMsgFolderDataSource::Init();
 }
 
 void nsMsgFlatFolderDataSource::Cleanup()
 {
   m_folders.Clear();
-  m_builtFolders = PR_FALSE;
+  m_builtFolders = false;
   nsMsgFolderDataSource::Cleanup();
 }
 
 NS_IMETHODIMP nsMsgFlatFolderDataSource::GetTarget(nsIRDFResource* source,
                        nsIRDFResource* property,
                        bool tv,
                        nsIRDFNode** target)
 {
@@ -2191,17 +2191,17 @@ NS_IMETHODIMP nsMsgFlatFolderDataSource:
   }
   return NS_NewSingletonEnumerator(targets, property);
 }
 
 void nsMsgFlatFolderDataSource::EnsureFolders()
 {
   if (!m_builtFolders)
   {
-    m_builtFolders = PR_TRUE; // in case something goes wrong
+    m_builtFolders = true; // in case something goes wrong
 
     // need an enumerator that gives all folders with unread
     nsresult rv;
     nsCOMPtr <nsIMsgAccountManager> accountManager = do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
     if (NS_FAILED(rv))
       return;
 
     nsCOMPtr<nsISupportsArray> allServers;
@@ -2275,37 +2275,37 @@ NS_IMETHODIMP nsMsgFlatFolderDataSource:
     {
       nsCOMPtr<nsIMsgFolder> parentMsgFolder;
       folder->GetParent(getter_AddRefs(parentMsgFolder));
       // a folder without a parent must be getting deleted as part of
       // the rename operation and is thus a folder we are
       // no longer interested in
       if (parentMsgFolder && WantsThisFolder(folder))
       {
-        *hasAssertion = PR_TRUE;
+        *hasAssertion = true;
         return NS_OK;
       }
     }
   }
-  *hasAssertion = PR_FALSE;
+  *hasAssertion = false;
   return NS_OK;
 }
 
 nsresult nsMsgFlatFolderDataSource::OnItemAddedOrRemoved(nsIMsgFolder *parentItem, nsISupports *item, bool added)
 {
   // When a folder is added or removed, parentItem is the parent folder and item is the folder being
   // added or removed. In a flat data source, there is no arc in the graph between the parent folder
   // and the folder being added or removed. Our flat data source root (i.e. mailnewsunreadfolders:/) has
   // an arc with the child property to every folder in the data source.  We must change parentItem
   // to be our data source root before calling nsMsgFolderDataSource::OnItemAddedOrRemoved. This ensures
   // that datasource listeners such as the template builder properly handle add and remove
   // notifications on the flat datasource.
   nsCOMPtr<nsIRDFNode> itemNode(do_QueryInterface(item));
   if (itemNode)
-    NotifyObservers(m_rootResource, kNC_Child, itemNode, nsnull, added, PR_FALSE);
+    NotifyObservers(m_rootResource, kNC_Child, itemNode, nsnull, added, false);
   return NS_OK;
 }
 
 bool nsMsgFlatFolderDataSource::ResourceIsOurRoot(nsIRDFResource *resource)
 {
   return m_rootResource.get() == resource;
 }
 
@@ -2342,39 +2342,39 @@ nsresult nsMsgFlatFolderDataSource::GetF
   // check if folder name is unique - if not, append account name
   return folder->GetAbbreviatedName(folderName);
 }
 
 
 bool nsMsgUnreadFoldersDataSource::WantsThisFolder(nsIMsgFolder *folder)
 {
   PRInt32 numUnread;
-  folder->GetNumUnread(PR_FALSE, &numUnread);
+  folder->GetNumUnread(false, &numUnread);
   return numUnread > 0;
 }
 
 nsresult nsMsgUnreadFoldersDataSource::NotifyPropertyChanged(nsIRDFResource *resource,
                     nsIRDFResource *property, nsIRDFNode *newNode,
                     nsIRDFNode *oldNode)
 {
   // check if it's the has unread property that's changed; if so, see if we need
   // to add this folder to the view.
   // Then, call base class.
   if (kNC_HasUnreadMessages == property)
   {
     nsCOMPtr<nsIMsgFolder> folder(do_QueryInterface(resource));
     if (folder)
     {
       PRInt32 numUnread;
-      folder->GetNumUnread(PR_FALSE, &numUnread);
+      folder->GetNumUnread(false, &numUnread);
       if (numUnread > 0)
       {
         if (m_folders.IndexOf(folder) == kNotFound)
           m_folders.AppendObject(folder);
-        NotifyObservers(kNC_UnreadFolders, kNC_Child, resource, nsnull, PR_TRUE, PR_FALSE);
+        NotifyObservers(kNC_UnreadFolders, kNC_Child, resource, nsnull, true, false);
       }
     }
   }
   return nsMsgFolderDataSource::NotifyPropertyChanged(resource, property,
                                                 newNode, oldNode);
 }
 
 bool nsMsgFavoriteFoldersDataSource::WantsThisFolder(nsIMsgFolder *folder)
@@ -2391,17 +2391,17 @@ void nsMsgRecentFoldersDataSource::Clean
   nsMsgFlatFolderDataSource::Cleanup();
 }
 
 
 void nsMsgRecentFoldersDataSource::EnsureFolders()
 {
   if (!m_builtFolders)
   {
-    m_builtFolders = PR_TRUE;
+    m_builtFolders = true;
 
     nsresult rv;
     nsCOMPtr <nsIMsgAccountManager> accountManager = do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
     if (NS_FAILED(rv))
       return;
 
     nsCOMPtr<nsISupportsArray> allServers;
     rv = accountManager->GetAllServers(getter_AddRefs(allServers));
@@ -2501,17 +2501,17 @@ NS_IMETHODIMP nsMsgRecentFoldersDataSour
   // get added, but maybe that's OK.
   if (m_builtFolders)
   {
     nsCOMPtr<nsIMsgFolder> folder(do_QueryInterface(item));
     if (folder && m_folders.IndexOf(folder) == kNotFound)
     {
       m_folders.AppendObject(folder);
       nsCOMPtr<nsIRDFResource> resource = do_QueryInterface(item);
-      NotifyObservers(kNC_RecentFolders, kNC_Child, resource, nsnull, PR_TRUE, PR_FALSE);
+      NotifyObservers(kNC_RecentFolders, kNC_Child, resource, nsnull, true, false);
     }
   }
   return nsMsgFlatFolderDataSource::OnItemAdded(parentItem, item);
 }
 
 nsresult nsMsgRecentFoldersDataSource::NotifyPropertyChanged(nsIRDFResource *resource,
                     nsIRDFResource *property, nsIRDFNode *newNode,
                     nsIRDFNode *oldNode)
@@ -2526,16 +2526,16 @@ nsresult nsMsgRecentFoldersDataSource::N
     {
       bool hasNewMessages;
       folder->GetHasNewMessages(&hasNewMessages);
       if (hasNewMessages > 0)
       {
         if (m_folders.IndexOf(folder) == kNotFound)
         {
           m_folders.AppendObject(folder);
-          NotifyObservers(kNC_RecentFolders, kNC_Child, resource, nsnull, PR_TRUE, PR_FALSE);
+          NotifyObservers(kNC_RecentFolders, kNC_Child, resource, nsnull, true, false);
         }
       }
     }
   }
   return nsMsgFolderDataSource::NotifyPropertyChanged(resource, property,
                                                 newNode, oldNode);
 }
--- a/mailnews/base/src/nsMsgFolderNotificationService.cpp
+++ b/mailnews/base/src/nsMsgFolderNotificationService.cpp
@@ -150,17 +150,17 @@ NS_IMETHODIMP nsMsgFolderNotificationSer
     {
       nsCOMPtr<nsIImapIncomingServer> imapServer;
       imapFolder->GetImapIncomingServer(getter_AddRefs(imapServer));
       if (imapServer)
       {
         nsMsgImapDeleteModel deleteModel;
         imapServer->GetDeleteModel(&deleteModel);
         if (deleteModel == nsMsgImapDeleteModels::IMAPDelete)
-          isReallyMove = PR_FALSE;
+          isReallyMove = false;
       }
     }
   }
 
   NOTIFY_MSGFOLDER_LISTENERS(msgsMoveCopyCompleted, MsgsMoveCopyCompleted,
                              (isReallyMove, aSrcMsgs, aDestFolder, aDestMsgs));
   return NS_OK;
 }
--- a/mailnews/base/src/nsMsgGroupThread.cpp
+++ b/mailnews/base/src/nsMsgGroupThread.cpp
@@ -56,17 +56,17 @@ nsMsgGroupThread::nsMsgGroupThread(nsIMs
 
 void nsMsgGroupThread::Init()
 {
   m_threadKey = nsMsgKey_None; 
   m_threadRootKey = nsMsgKey_None;
   m_numUnreadChildren = 0;	
   m_flags = 0;
   m_newestMsgDate = 0;
-  m_dummy = PR_FALSE;
+  m_dummy = false;
 }
 
 nsMsgGroupThread::~nsMsgGroupThread()
 {
 }
 
 NS_IMETHODIMP nsMsgGroupThread::SetThreadKey(nsMsgKey threadKey)
 {
@@ -93,23 +93,23 @@ NS_IMETHODIMP nsMsgGroupThread::GetFlags
 NS_IMETHODIMP nsMsgGroupThread::SetFlags(PRUint32 aFlags)
 {
   m_flags = aFlags;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgGroupThread::SetSubject(const nsACString& aSubject)
 {
-  NS_ASSERTION(PR_FALSE, "shouldn't call this");
+  NS_ASSERTION(false, "shouldn't call this");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsMsgGroupThread::GetSubject(nsACString& result)
 {
-  NS_ASSERTION(PR_FALSE, "shouldn't call this");
+  NS_ASSERTION(false, "shouldn't call this");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsMsgGroupThread::GetNumChildren(PRUint32 *aNumChildren)
 {
   NS_ENSURE_ARG_POINTER(aNumChildren);
   *aNumChildren = m_keys.Length(); // - ((m_dummy) ? 1 : 0);
   return NS_OK;
@@ -146,17 +146,17 @@ nsMsgViewIndex nsMsgGroupThread::FindMsg
   nsMsgKey msgKey;
   hdr->GetMessageKey(&msgKey);
   return (nsMsgViewIndex)m_keys.IndexOf(msgKey);
 }
 
 NS_IMETHODIMP nsMsgGroupThread::AddChild(nsIMsgDBHdr *child, nsIMsgDBHdr *inReplyTo, bool threadInThread, 
                                     nsIDBChangeAnnouncer *announcer)
 {
-  NS_ASSERTION(PR_FALSE, "shouldn't call this");
+  NS_ASSERTION(false, "shouldn't call this");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 nsMsgViewIndex nsMsgGroupThread::AddMsgHdrInDateOrder(nsIMsgDBHdr *child, nsMsgDBView *view)
 {
   nsMsgKey newHdrKey;
   child->GetMessageKey(&newHdrKey);
   PRUint32 insertIndex = 0;
@@ -378,23 +378,23 @@ protected:
   bool                    mNeedToPrefetch;
   nsMsgGroupThreadEnumeratorFilter     mFilter;
   void*                   mClosure;
   bool                    mFoundChildren;
 };
 
 nsMsgGroupThreadEnumerator::nsMsgGroupThreadEnumerator(nsMsgGroupThread *thread, nsMsgKey startKey,
                                              nsMsgGroupThreadEnumeratorFilter filter, void* closure)
-                                             : mDone(PR_FALSE),
-                                             mFilter(filter), mClosure(closure), mFoundChildren(PR_FALSE)
+                                             : mDone(false),
+                                             mFilter(filter), mClosure(closure), mFoundChildren(false)
 {
   mThreadParentKey = startKey;
   mChildIndex = 0;
   mThread = thread;
-  mNeedToPrefetch = PR_TRUE;
+  mNeedToPrefetch = true;
   mFirstMsgKey = nsMsgKey_None;
   
   nsresult rv = mThread->GetRootHdr(nsnull, getter_AddRefs(mResultHdr));
   
   if (NS_SUCCEEDED(rv) && mResultHdr)
     mResultHdr->GetMessageKey(&mFirstMsgKey);
   
   PRUint32 numChildren;
@@ -420,17 +420,17 @@ nsMsgGroupThreadEnumerator::nsMsgGroupTh
           break;
         }
         
         if (mDone)
           break;
         
       }
       else
-        NS_ASSERTION(PR_FALSE, "couldn't get child from thread");
+        NS_ASSERTION(false, "couldn't get child from thread");
     }
   }
   
 #ifdef DEBUG_bienvenu1
   nsCOMPtr <nsIMsgDBHdr> child;
   for (PRUint32 childIndex = 0; childIndex < numChildren; childIndex++)
   {
     rv = mThread->GetChildHdrAt(childIndex, getter_AddRefs(child));
@@ -457,17 +457,17 @@ nsMsgGroupThreadEnumerator::~nsMsgGroupT
 }
 
 NS_IMPL_ISUPPORTS1(nsMsgGroupThreadEnumerator, nsISimpleEnumerator)
 
 
 PRInt32 nsMsgGroupThreadEnumerator::MsgKeyFirstChildIndex(nsMsgKey inMsgKey)
 {
   //	if (msgKey != mThreadParentKey)
-  //		mDone = PR_TRUE;
+  //		mDone = true;
   // look through rest of thread looking for a child of this message.
   // If the inMsgKey is the first message in the thread, then all children
   // without parents are considered to be children of inMsgKey.
   // Otherwise, only true children qualify.
   PRUint32 numChildren;
   nsCOMPtr <nsIMsgDBHdr> curHdr;
   PRInt32 firstChildIndex = -1;
   
@@ -507,17 +507,17 @@ NS_IMETHODIMP nsMsgGroupThreadEnumerator
   
   if (mNeedToPrefetch)
     rv = Prefetch();
   
   if (NS_SUCCEEDED(rv) && mResultHdr) 
   {
     *aItem = mResultHdr;
     NS_ADDREF(*aItem);
-    mNeedToPrefetch = PR_TRUE;
+    mNeedToPrefetch = true;
   }
   return rv;
 }
 
 nsresult nsMsgGroupThreadEnumerator::Prefetch()
 {
   nsresult rv=NS_OK;          // XXX or should this default to an error?
   mResultHdr = nsnull;
@@ -552,36 +552,36 @@ nsresult nsMsgGroupThreadEnumerator::Pre
         // level message in the thread, then leave mResultHdr set to cur msg.
         if (parentKey == mThreadParentKey || 
           (parentKey == nsMsgKey_None 
           && mThreadParentKey == mFirstMsgKey && curKey != mThreadParentKey))
           break;
         mResultHdr = nsnull;
       }
       else
-        NS_ASSERTION(PR_FALSE, "better be able to get child");
+        NS_ASSERTION(false, "better be able to get child");
     }
     if (!mResultHdr && mThreadParentKey == mFirstMsgKey && !mFoundChildren && numChildren > 1)
     {
 //      mThread->ReparentMsgsWithInvalidParent(numChildren, mThreadParentKey);
     }
   }
   if (!mResultHdr) 
   {
-    mDone = PR_TRUE;
+    mDone = true;
     return NS_ERROR_FAILURE;
   }
   if (NS_FAILED(rv)) 
   {
-    mDone = PR_TRUE;
+    mDone = true;
     return rv;
   }
   else
-    mNeedToPrefetch = PR_FALSE;
-  mFoundChildren = PR_TRUE;
+    mNeedToPrefetch = false;
+  mFoundChildren = true;
 
 #ifdef DEBUG_bienvenu1
 	nsMsgKey debugMsgKey;
 	mResultHdr->GetMessageKey(&debugMsgKey);
 	printf("next for %ld = %ld\n", mThreadParentKey, debugMsgKey);
 #endif
 
     return rv;
@@ -825,17 +825,17 @@ NS_IMETHODIMP nsMsgXFGroupThread::GetChi
   if (aIndex < 0 || aIndex >= m_folders.Count())
     return NS_MSG_MESSAGE_NOT_FOUND;
   m_folders.ObjectAt(aIndex)->GetMessageHeader(m_keys[aIndex], aResult);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgXFGroupThread::GetChildKeyAt(PRInt32 aIndex, nsMsgKey *aResult)
 {
-  NS_ASSERTION(PR_FALSE, "shouldn't call this");
+  NS_ASSERTION(false, "shouldn't call this");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsMsgXFGroupThread::RemoveChildAt(PRInt32 aIndex)
 {
   nsMsgGroupThread::RemoveChildAt(aIndex);
   m_folders.RemoveObjectAt(aIndex);
   return NS_OK;
@@ -859,17 +859,17 @@ void nsMsgXFGroupThread::SetMsgHdrAt(nsM
 
 nsMsgViewIndex nsMsgXFGroupThread::FindMsgHdr(nsIMsgDBHdr *hdr)
 {
   nsMsgKey msgKey;
   hdr->GetMessageKey(&msgKey);
   nsCOMPtr<nsIMsgFolder> folder;
   hdr->GetFolder(getter_AddRefs(folder));
   PRUint32 index = 0;
-  while (PR_TRUE) {
+  while (true) {
     index = m_keys.IndexOf(msgKey, index);
     if (index == -1 || m_folders[index] == folder)
       break;
     index++;
   }
   return (nsMsgViewIndex)index;
 }
 
--- a/mailnews/base/src/nsMsgGroupView.cpp
+++ b/mailnews/base/src/nsMsgGroupView.cpp
@@ -49,17 +49,17 @@
 #include <plhash.h>
 
 #define MSGHDR_CACHE_LOOK_AHEAD_SIZE  25    // Allocate this more to avoid reallocation on new mail.
 #define MSGHDR_CACHE_MAX_SIZE         8192  // Max msghdr cache entries.
 #define MSGHDR_CACHE_DEFAULT_SIZE     100
 
 nsMsgGroupView::nsMsgGroupView()
 {
-  m_dayChanged = PR_FALSE;
+  m_dayChanged = false;
   m_lastCurExplodedTime.tm_mday = 0;
   m_groupsTable.Init();
 }
 
 nsMsgGroupView::~nsMsgGroupView()
 {
 }
 
@@ -83,17 +83,17 @@ void nsMsgGroupView::InternalClose()
   m_groupsTable.Clear();
   // nothing to do if we're not grouped.
   if (!(m_viewFlags & nsMsgViewFlagsType::kGroupBySort))
     return;
 
   bool rcvDate = false;
 
   if (m_sortType == nsMsgViewSortType::byReceived)
-    rcvDate = PR_TRUE;
+    rcvDate = true;
   if (m_db &&
       ((m_sortType == nsMsgViewSortType::byDate) ||
        (m_sortType == nsMsgViewSortType::byReceived)))
   {
     nsCOMPtr <nsIDBFolderInfo> dbFolderInfo;
     m_db->GetDBFolderInfo(getter_AddRefs(dbFolderInfo));
     if (dbFolderInfo)
     {
@@ -121,17 +121,17 @@ void nsMsgGroupView::InternalClose()
 }
 
 NS_IMETHODIMP nsMsgGroupView::Close()
 {
   InternalClose();
   return nsMsgDBView::Close();
 }
 
-// Set rcvDate to PR_TRUE to get the Received: date instead of the Date: date.
+// Set rcvDate to true to get the Received: date instead of the Date: date.
 nsresult nsMsgGroupView::GetAgeBucketValue(nsIMsgDBHdr *aMsgHdr, PRUint32 * aAgeBucket, bool rcvDate)
 {
   NS_ENSURE_ARG_POINTER(aMsgHdr);
   NS_ENSURE_ARG_POINTER(aAgeBucket);
 
   PRTime dateOfMsg;
   nsresult rv;
   if (!rcvDate)
@@ -147,17 +147,17 @@ nsresult nsMsgGroupView::GetAgeBucketVal
   PRTime currentTime = PR_Now();
   PRExplodedTime currentExplodedTime;
   PR_ExplodeTime(currentTime, PR_LocalTimeParameters, &currentExplodedTime);
   PRExplodedTime explodedMsgTime;
   PR_ExplodeTime(dateOfMsg, PR_LocalTimeParameters, &explodedMsgTime);
 
   if (m_lastCurExplodedTime.tm_mday &&
      m_lastCurExplodedTime.tm_mday != currentExplodedTime.tm_mday)
-    m_dayChanged = PR_TRUE; // this will cause us to rebuild the view.
+    m_dayChanged = true; // this will cause us to rebuild the view.
 
   m_lastCurExplodedTime = currentExplodedTime;
   if (currentExplodedTime.tm_year == explodedMsgTime.tm_year &&
       currentExplodedTime.tm_month == explodedMsgTime.tm_month &&
       currentExplodedTime.tm_mday == explodedMsgTime.tm_mday)
   {
     // same day...
     *aAgeBucket = 1;
@@ -178,17 +178,17 @@ nsresult nsMsgGroupView::GetAgeBucketVal
       // seeds
       LL_I2L  ( microSecondsPerSecond,  PR_USEC_PER_SEC );
       LL_UI2L ( secondsPerDay,          60 * 60 * 24 );
 
       // derivees
       LL_MUL( microSecondsPerDay,   secondsPerDay,      microSecondsPerSecond );
       LL_MUL( microSecondsPer6Days, microSecondsPerDay, 6 );
       LL_MUL( microSecondsPer13Days, microSecondsPerDay, 13 );
-      bGotConstants = PR_TRUE;
+      bGotConstants = true;
     }
 
     // setting the time variables to local time
     PRInt64 GMTLocalTimeShift;
     LL_ADD( GMTLocalTimeShift, currentExplodedTime.tm_params.tp_gmt_offset, currentExplodedTime.tm_params.tp_dst_offset );
     LL_MUL( GMTLocalTimeShift, GMTLocalTimeShift, microSecondsPerSecond );
     LL_ADD( currentTime, currentTime, GMTLocalTimeShift );
     LL_ADD( dateOfMsg, dateOfMsg, GMTLocalTimeShift );
@@ -275,17 +275,17 @@ nsresult nsMsgGroupView::HashHdr(nsIMsgD
     case nsMsgViewSortType::byStatus:
       {
         PRUint32 status = 0;
         GetStatusSortValue(msgHdr, &status);
         aHashKey.AppendInt(status);
       }
       break;
     case nsMsgViewSortType::byReceived:
-      rcvDate = PR_TRUE;
+      rcvDate = true;
     case nsMsgViewSortType::byDate:
     {
       PRUint32 ageBucket;
       rv = GetAgeBucketValue(msgHdr, &ageBucket, rcvDate);
       if (NS_SUCCEEDED(rv))
         aHashKey.AppendInt(ageBucket);
       break;
     }
@@ -294,17 +294,17 @@ nsresult nsMsgGroupView::HashHdr(nsIMsgD
       nsIMsgCustomColumnHandler* colHandler = GetCurColumnHandlerFromDBInfo();
       if (colHandler)
       {
         rv = colHandler->GetSortStringForRow(msgHdr, aHashKey);
         break;
       }
     }
     default:
-      NS_ASSERTION(PR_FALSE, "no hash key for this type");
+      NS_ASSERTION(false, "no hash key for this type");
       rv = NS_ERROR_FAILURE;
   }
   return rv;
 }
 
 nsMsgGroupThread *nsMsgGroupView::CreateGroupThread(nsIMsgDatabase *db)
 {
   return new nsMsgGroupThread(db);
@@ -330,35 +330,35 @@ nsMsgGroupThread *nsMsgGroupView::AddHdr
   nsMsgViewIndex viewIndexOfThread; // index of first message in thread in view
   nsMsgViewIndex threadInsertIndex; // index of newly added header in thread
 
   nsMsgGroupThread *foundThread = static_cast<nsMsgGroupThread *>(msgThread.get());
   if (foundThread) 
   {
     // find the view index of the root node of the thread in the view
     viewIndexOfThread = GetIndexOfFirstDisplayedKeyInThread(foundThread,
-                                                            PR_TRUE);
+                                                            true);
     if (viewIndexOfThread == nsMsgViewIndex_None)
     {
       // Something is wrong with the group table. Remove the old group and
       // insert a new one.
       m_groupsTable.Remove(hashKey);
       foundThread = nsnull;
-      *pNewThread = newThread = PR_TRUE;
+      *pNewThread = newThread = true;
     }
   }
   // If the thread does not already exist, create one
   if (!foundThread)
   {
     foundThread = CreateGroupThread(m_db);
     msgThread = do_QueryInterface(foundThread);
     m_groupsTable.Put(hashKey, msgThread);
     if (GroupViewUsesDummyRow())
     {
-      foundThread->m_dummy = PR_TRUE;
+      foundThread->m_dummy = true;
       msgFlags |=  MSG_VIEW_FLAG_DUMMY | MSG_VIEW_FLAG_HASCHILDREN;
     }
 
     viewIndexOfThread = GetInsertIndex(msgHdr);
     if (viewIndexOfThread == nsMsgViewIndex_None)
       viewIndexOfThread = m_keys.Length();
 
     // add the thread root node to the view
@@ -529,35 +529,35 @@ nsMsgGroupView::CopyDBView(nsMsgDBView *
 // rebuild the new view based on the new view type. So we pass the new
 // view flags to OpenWithHdrs.
 nsresult nsMsgGroupView::RebuildView(nsMsgViewFlagsTypeValue newFlags)
 {
   nsCOMPtr <nsISimpleEnumerator> headers;
   if (NS_SUCCEEDED(GetMessageEnumerator(getter_AddRefs(headers))))
   {
     PRInt32 count;
-    m_dayChanged = PR_FALSE;
+    m_dayChanged = false;
     nsAutoTArray<nsMsgKey, 1> preservedSelection;
     nsMsgKey curSelectedKey;
     SaveAndClearSelection(&curSelectedKey, preservedSelection);
     InternalClose();
     PRInt32 oldSize = GetSize();
     // this is important, because the tree will ask us for our
     // row count, which get determine from the number of keys.
     m_keys.Clear();
     // be consistent
     m_flags.Clear();
     m_levels.Clear();
 
     // this needs to happen after we remove all the keys, since RowCountChanged() will call our GetRowCount()
     if (mTree)
       mTree->RowCountChanged(0, -oldSize);
-    SetSuppressChangeNotifications(PR_TRUE);
+    SetSuppressChangeNotifications(true);
     nsresult rv = OpenWithHdrs(headers, m_sortType, m_sortOrder, newFlags, &count);
-    SetSuppressChangeNotifications(PR_FALSE);
+    SetSuppressChangeNotifications(false);
     if (mTree)
       mTree->RowCountChanged(0, GetSize());
 
     NS_ENSURE_SUCCESS(rv,rv);
 
     // now, restore our desired selection
     nsAutoTArray<nsMsgKey, 1> keyArray;
     keyArray.AppendElement(curSelectedKey);
@@ -701,17 +701,17 @@ NS_IMETHODIMP nsMsgGroupView::OnHdrDelet
 
   nsCOMPtr <nsIMsgThread> thread;
   nsMsgKey keyDeleted;
   aHdrDeleted->GetMessageKey(&keyDeleted);
 
   nsresult rv = GetThreadContainingMsgHdr(aHdrDeleted, getter_AddRefs(thread));
   NS_ENSURE_SUCCESS(rv, rv);
   nsMsgViewIndex viewIndexOfThread = GetIndexOfFirstDisplayedKeyInThread(
-                                       thread, PR_TRUE); // yes to dummy node
+                                       thread, true); // yes to dummy node
   thread->RemoveChildHdr(aHdrDeleted, nsnull);
 
   nsMsgGroupThread *groupThread = static_cast<nsMsgGroupThread *>((nsIMsgThread *) thread);
 
   bool rootDeleted = viewIndexOfThread != nsMsgKey_None &&
     m_keys[viewIndexOfThread] == keyDeleted;
   rv = nsMsgDBView::OnHdrDeleted(aHdrDeleted, aParentKey, aFlags, aInstigator);
   if (groupThread->m_dummy)
@@ -792,17 +792,17 @@ NS_IMETHODIMP nsMsgGroupView::CellTextFo
       PRUint32 flags;
       bool rcvDate = false;
       msgHdr->GetFlags(&flags);
       aValue.Truncate();
       nsString tmp_str;
       switch (m_sortType)
       {
         case nsMsgViewSortType::byReceived:
-          rcvDate = PR_TRUE;
+          rcvDate = true;
         case nsMsgViewSortType::byDate:
         {
           PRUint32 ageBucket = 0;
           GetAgeBucketValue(msgHdr, &ageBucket, rcvDate);
           switch (ageBucket)
           {
           case 1:
             if (m_kTodayString.IsEmpty())
@@ -825,17 +825,17 @@ NS_IMETHODIMP nsMsgGroupView::CellTextFo
             aValue.Assign(m_kTwoWeeksAgoString);
             break;
           case 5:
             if (m_kOldMailString.IsEmpty())
               m_kOldMailString.Adopt(GetString(NS_LITERAL_STRING("older").get()));
             aValue.Assign(m_kOldMailString);
             break;
           default:
-            NS_ASSERTION(PR_FALSE, "bad age thread");
+            NS_ASSERTION(false, "bad age thread");
             break;
           }
           break;
         }
         case nsMsgViewSortType::byAuthor:
           FetchAuthor(msgHdr, aValue);
           break;
         case nsMsgViewSortType::byStatus:
@@ -890,17 +890,17 @@ NS_IMETHODIMP nsMsgGroupView::CellTextFo
           if (colHandler)
           {
             rv = colHandler->GetSortStringForRow(msgHdr.get(), aValue);
             break;
           }
         }
 
         default:
-          NS_ASSERTION(PR_FALSE, "we don't sort by group for this type");
+          NS_ASSERTION(false, "we don't sort by group for this type");
           break;
       }
 
       if (groupThread)
       {
         // Get number of messages in group
         nsAutoString formattedCountMsg;
         PRUint32 numMsg = groupThread->NumRealChildren();
--- a/mailnews/base/src/nsMsgMailSession.cpp
+++ b/mailnews/base/src/nsMsgMailSession.cpp
@@ -309,17 +309,17 @@ nsresult nsMsgMailSession::GetTopmostMsg
 
     nsCOMPtr<nsISimpleEnumerator> windowEnum;
 
 #if defined (XP_UNIX)
     // The window managers under Unix/X11 do not support ZOrder information,
     // so we have to use the normal enumeration call here.
     rv = windowMediator->GetEnumerator(nsnull, getter_AddRefs(windowEnum));
 #else
-    rv = windowMediator->GetZOrderDOMWindowEnumerator(nsnull, PR_TRUE,
+    rv = windowMediator->GetZOrderDOMWindowEnumerator(nsnull, true,
                                                       getter_AddRefs(windowEnum));
 #endif
 
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsISupports> windowSupports;
     nsCOMPtr<nsPIDOMWindow> topMostWindow;
     nsCOMPtr<nsIDOMDocument> domDocument;
@@ -414,27 +414,27 @@ NS_IMETHODIMP nsMsgMailSession::RemoveMs
 #endif
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgMailSession::IsFolderOpenInWindow(nsIMsgFolder *folder, bool *aResult)
 {
   if (!aResult)
     return NS_ERROR_NULL_POINTER;
-  *aResult = PR_FALSE;
+  *aResult = false;
   
   PRUint32 count = mWindows.Count();
   
   for(PRUint32 i = 0; i < count; i++)
   {
     nsCOMPtr<nsIMsgFolder> openFolder;
     mWindows[i]->GetOpenFolder(getter_AddRefs(openFolder));
     if (folder == openFolder.get())
     {
-      *aResult = PR_TRUE;
+      *aResult = true;
       break;
     }
   }
   
   return NS_OK;
 }
 
 NS_IMETHODIMP
@@ -540,26 +540,26 @@ nsMsgMailSession::GetDataFilesDir(const 
 }
 
 /********************************************************************************/
 
 NS_IMPL_ISUPPORTS3(nsMsgShutdownService, nsIMsgShutdownService, nsIUrlListener, nsIObserver)
 
 nsMsgShutdownService::nsMsgShutdownService()
 : mQuitMode(nsIAppStartup::eAttemptQuit),
-  mProcessedShutdown(PR_FALSE),
-  mQuitForced(PR_FALSE),
-  mReadyToQuit(PR_FALSE)
+  mProcessedShutdown(false),
+  mQuitForced(false),
+  mReadyToQuit(false)
 {
   nsCOMPtr<nsIObserverService> observerService = do_GetService("@mozilla.org/observer-service;1");
   if (observerService)
   {
-    observerService->AddObserver(this, "quit-application-requested", PR_FALSE);
-    observerService->AddObserver(this, "quit-application-granted", PR_FALSE);
-    observerService->AddObserver(this, "quit-application", PR_FALSE);
+    observerService->AddObserver(this, "quit-application-requested", false);
+    observerService->AddObserver(this, "quit-application-granted", false);
+    observerService->AddObserver(this, "quit-application", false);
   }
 }
 
 nsMsgShutdownService::~nsMsgShutdownService()
 {
   nsCOMPtr<nsIObserverService> observerService = do_GetService("@mozilla.org/observer-service;1");
   if (observerService)
   {  
@@ -571,17 +571,17 @@ nsMsgShutdownService::~nsMsgShutdownServ
 
 nsresult nsMsgShutdownService::ProcessNextTask()
 {
   bool shutdownTasksDone = true;
   
   PRInt32 count = mShutdownTasks.Count();
   if (mTaskIndex < count)
   {
-    shutdownTasksDone = PR_FALSE;
+    shutdownTasksDone = false;
 
     nsCOMPtr<nsIMsgShutdownTask> curTask = mShutdownTasks[mTaskIndex];    
     nsString taskName;
     curTask->GetCurrentTaskName(taskName); 
     SetStatusText(taskName);
    
     nsCOMPtr<nsIMsgMailSession> mailSession = do_GetService(NS_MSGMAILSESSION_CONTRACTID);
     NS_ENSURE_TRUE(mailSession, NS_ERROR_FAILURE);
@@ -609,17 +609,17 @@ nsresult nsMsgShutdownService::ProcessNe
   return NS_OK;
 }
 
 void nsMsgShutdownService::AttemptShutdown()
 {
   if (mQuitForced)
   {
     PR_CEnterMonitor(this);
-    mReadyToQuit = PR_TRUE;
+    mReadyToQuit = true;
     PR_CNotifyAll(this);
     PR_CExitMonitor(this);
   }
   else
   {
     nsCOMPtr<nsIAppStartup> appStartup =
       do_GetService(NS_APPSTARTUP_CONTRACTID);
     NS_ENSURE_TRUE(appStartup, );
@@ -641,27 +641,27 @@ NS_IMETHODIMP nsMsgShutdownService::Obse
   // Due to bug 459376 we don't always get quit-application-requested and
   // quit-application-granted. quit-application-requested is preferred, but if
   // we don't then we have to hook onto quit-application, but we don't want
   // to do the checking twice so we set some flags to prevent that.
   if (!strcmp(aTopic, "quit-application-granted"))
   {
     // Quit application has been requested and granted, therefore we will shut
     // down. 
-    mProcessedShutdown = PR_TRUE;
+    mProcessedShutdown = true;
     return NS_OK;
   }
 
   // If we've already processed a shutdown notification, no need to do it again.
   if (!strcmp(aTopic, "quit-application"))
   {
     if (mProcessedShutdown)
       return NS_OK;
     else
-      mQuitForced = PR_TRUE;
+      mQuitForced = true;
   }
 
   nsCOMPtr<nsIObserverService> observerService = do_GetService("@mozilla.org/observer-service;1");
   NS_ENSURE_STATE(observerService);
   
   nsCOMPtr<nsISimpleEnumerator> listenerEnum;
   nsresult rv = observerService->EnumerateObservers("msg-shutdown", getter_AddRefs(listenerEnum));
   if (NS_SUCCEEDED(rv) && listenerEnum)
@@ -719,34 +719,34 @@ NS_IMETHODIMP nsMsgShutdownService::Obse
         appShell->GetHiddenDOMWindow(getter_AddRefs(internalDomWin));
         NS_ENSURE_TRUE(internalDomWin, NS_ERROR_FAILURE);  // bail if we don't get a window.
       }
     }
 
     if (!mQuitForced)
     {
       nsCOMPtr<nsISupportsPRBool> stopShutdown = do_QueryInterface(aSubject);
-      stopShutdown->SetData(PR_TRUE);
+      stopShutdown->SetData(true);
 
       // If the attempted quit was a restart, be sure to restart the app once
       // the tasks have been run. This is usually the case when addons or
       // updates are going to be installed.
       if (aData && nsDependentString(aData).EqualsLiteral("restart"))
         mQuitMode |= nsIAppStartup::eRestart;
     }
 
     mMsgProgress->OpenProgressDialog(internalDomWin, topMsgWindow, 
                                      "chrome://messenger/content/shutdownWindow.xul", 
-                                     PR_FALSE, nsnull);
+                                     false, nsnull);
 
     if (mQuitForced)
     {
       nsCOMPtr<nsIThread> thread(do_GetCurrentThread());
 
-      mReadyToQuit = PR_FALSE;
+      mReadyToQuit = false;
       while (!mReadyToQuit)
       {
         PR_CEnterMonitor(this);
         // Waiting for 50 milliseconds
         PR_CWait(this, PR_MicrosecondsToInterval(50000UL));
         PR_CExitMonitor(this);
         NS_ProcessPendingEvents(thread);
       }
--- a/mailnews/base/src/nsMsgOfflineManager.cpp
+++ b/mailnews/base/src/nsMsgOfflineManager.cpp
@@ -61,22 +61,22 @@ static NS_DEFINE_CID(kMsgSendLaterCID, N
 NS_IMPL_THREADSAFE_ISUPPORTS5(nsMsgOfflineManager,
                               nsIMsgOfflineManager,
                               nsIMsgSendLaterListener,
                               nsIObserver,
                               nsISupportsWeakReference,
                               nsIUrlListener)
 
 nsMsgOfflineManager::nsMsgOfflineManager() :
-  m_inProgress (PR_FALSE),
-  m_sendUnsentMessages(PR_FALSE),
-  m_downloadNews(PR_FALSE),
-  m_downloadMail(PR_FALSE),
-  m_playbackOfflineImapOps(PR_FALSE),
-  m_goOfflineWhenDone(PR_FALSE),
+  m_inProgress (false),
+  m_sendUnsentMessages(false),
+  m_downloadNews(false),
+  m_downloadMail(false),
+  m_playbackOfflineImapOps(false),
+  m_goOfflineWhenDone(false),
   m_curState(eNoState),
   m_curOperation(eNoOp)
 {
 }
 
 nsMsgOfflineManager::~nsMsgOfflineManager()
 {
 }
@@ -110,17 +110,17 @@ NS_IMETHODIMP nsMsgOfflineManager::GetIn
 NS_IMETHODIMP nsMsgOfflineManager::SetInProgress(bool aInProgress)
 {
   m_inProgress = aInProgress;
   return NS_OK;
 }
 
 nsresult nsMsgOfflineManager::StopRunning(nsresult exitStatus)
 {
-  m_inProgress = PR_FALSE;
+  m_inProgress = false;
   return exitStatus;
 }
 
 nsresult nsMsgOfflineManager::AdvanceToNextState(nsresult exitStatus)
 {
   // NS_BINDING_ABORTED is used for the user pressing stop, which
   // should cause us to abort the offline process. Other errors
   // should allow us to continue.
@@ -149,34 +149,34 @@ nsresult nsMsgOfflineManager::AdvanceToN
         return SynchronizeOfflineImapChanges();
       else
         AdvanceToNextState(NS_OK); // recurse to next state.
       break;
     case eSynchronizingOfflineImapChanges:
       m_curState = eDone;
       return StopRunning(exitStatus);
       default:
-        NS_ASSERTION(PR_FALSE, "unhandled current state when going online");
+        NS_ASSERTION(false, "unhandled current state when going online");
     }
   }
   else if (m_curOperation == eDownloadingForOffline)
   {
     switch (m_curState)
     {
       case eNoState:
         m_curState = eDownloadingNews;
         if (m_downloadNews)
           DownloadOfflineNewsgroups();
         else
           AdvanceToNextState(NS_OK);
         break;
       case eSendingUnsent:
         if (m_goOfflineWhenDone)
         {
-          SetOnlineState(PR_FALSE);
+          SetOnlineState(false);
         }
         break;
       case eDownloadingNews:
         m_curState = eDownloadingMail;
         if (m_downloadMail)
           DownloadMail();
         else
           AdvanceToNextState(NS_OK);
@@ -184,17 +184,17 @@ nsresult nsMsgOfflineManager::AdvanceToN
       case eDownloadingMail:
         m_curState = eSendingUnsent;
         if (m_sendUnsentMessages)
           SendUnsentMessages();
         else
           AdvanceToNextState(NS_OK);
         break;
       default:
-        NS_ASSERTION(PR_FALSE, "unhandled current state when downloading for offline");
+        NS_ASSERTION(false, "unhandled current state when downloading for offline");
     }
 
   }
   return NS_OK;
 }
 
 nsresult nsMsgOfflineManager::SynchronizeOfflineImapChanges()
 {
@@ -238,17 +238,17 @@ nsresult nsMsgOfflineManager::SendUnsent
 
     if (NS_SUCCEEDED(rv) && thisIdentity)
     {
       nsCOMPtr <nsIMsgFolder> outboxFolder;
       pMsgSendLater->GetUnsentMessagesFolder(thisIdentity, getter_AddRefs(outboxFolder));
       if (outboxFolder)
       {
         PRInt32 numMessages;
-        outboxFolder->GetTotalMessages(PR_FALSE, &numMessages);
+        outboxFolder->GetTotalMessages(false, &numMessages);
         if (numMessages > 0)
         {
           identityToUse = thisIdentity;
           break;
         }
       }
     }
   }
@@ -324,17 +324,17 @@ nsresult nsMsgOfflineManager::DownloadMa
 /* void goOnline (in boolean sendUnsentMessages, in boolean playbackOfflineImapOperations, in nsIMsgWindow aMsgWindow); */
 NS_IMETHODIMP nsMsgOfflineManager::GoOnline(bool sendUnsentMessages, bool playbackOfflineImapOperations, nsIMsgWindow *aMsgWindow)
 {
   m_sendUnsentMessages = sendUnsentMessages;
   m_playbackOfflineImapOps = playbackOfflineImapOperations;
   m_curOperation = eGoingOnline;
   m_curState = eNoState;
   SetWindow(aMsgWindow);
-  SetOnlineState(PR_TRUE);
+  SetOnlineState(true);
   if (!m_sendUnsentMessages && !playbackOfflineImapOperations)
     return NS_OK;
   else
     AdvanceToNextState(NS_OK);
   return NS_OK;
 }
 
 /* void synchronizeForOffline (in boolean downloadNews, in boolean downloadMail, in boolean sendUnsentMessages, in boolean goOfflineWhenDone, in nsIMsgWindow aMsgWindow); */
@@ -345,17 +345,17 @@ NS_IMETHODIMP nsMsgOfflineManager::Synch
   m_downloadMail = downloadMail;
   m_sendUnsentMessages = sendUnsentMessages;
   SetWindow(aMsgWindow);
   m_goOfflineWhenDone = goOfflineWhenDone;
   m_curState = eNoState;
   if (!downloadNews && !downloadMail && !sendUnsentMessages)
   {
     if (goOfflineWhenDone)
-      return SetOnlineState(PR_FALSE);
+      return SetOnlineState(false);
   }
   else
     return AdvanceToNextState(NS_OK);
   return NS_OK;
 }
 
 nsresult nsMsgOfflineManager::SetOnlineState(bool online)
 {
--- a/mailnews/base/src/nsMsgPrintEngine.cpp
+++ b/mailnews/base/src/nsMsgPrintEngine.cpp
@@ -78,17 +78,17 @@
 
 static const char* kPrintingPromptService = "@mozilla.org/embedcomp/printingprompt-service;1";
 
 /////////////////////////////////////////////////////////////////////////
 // nsMsgPrintEngine implementation
 /////////////////////////////////////////////////////////////////////////
 
 nsMsgPrintEngine::nsMsgPrintEngine() :
-  mIsDoingPrintPreview(PR_FALSE),
+  mIsDoingPrintPreview(false),
   mMsgInx(nsIMsgPrintEngine::MNAB_START)
 {
   mCurrentlyPrintingURI = -1;
 }
 
 
 nsMsgPrintEngine::~nsMsgPrintEngine()
 {
@@ -270,18 +270,18 @@ nsMsgPrintEngine::SetWindow(nsIDOMWindow
 
   nsCOMPtr<nsIDocShellTreeItem> rootAsItem;
   docShellAsItem->GetSameTypeRootTreeItem(getter_AddRefs(rootAsItem));
 
   nsCOMPtr<nsIDocShellTreeNode> rootAsNode(do_QueryInterface(rootAsItem));
   NS_ENSURE_TRUE(rootAsNode, NS_ERROR_FAILURE);
 
   nsCOMPtr<nsIDocShellTreeItem> childItem;
-  rootAsNode->FindChildWithName(NS_LITERAL_STRING("content").get(), PR_TRUE,
-				PR_FALSE, nsnull, nsnull,
+  rootAsNode->FindChildWithName(NS_LITERAL_STRING("content").get(), true,
+				false, nsnull, nsnull,
 				getter_AddRefs(childItem));
 
   mDocShell = do_QueryInterface(childItem);
 
   if(mDocShell)
     SetupObserver();
 
   return NS_OK;
@@ -362,17 +362,17 @@ nsMsgPrintEngine::StartPrintOperation(ns
 nsresult
 nsMsgPrintEngine::ShowProgressDialog(bool aIsForPrinting, bool& aDoNotify)
 {
   nsresult rv;
 
   // default to not notifying, that if something here goes wrong
   // or we aren't going to show the progress dialog we can straight into 
   // reflowing the doc for printing.
-  aDoNotify = PR_FALSE;
+  aDoNotify = false;
 
   // Assume we can't do progress and then see if we can
   bool showProgressDialog = false;
 
   // if it is already being shown then don't bother to find out if it should be
   // so skip this and leave mShowProgressDialog set to FALSE
   nsCOMPtr<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
   if (NS_SUCCEEDED(rv)) 
--- a/mailnews/base/src/nsMsgProgress.cpp
+++ b/mailnews/base/src/nsMsgProgress.cpp
@@ -59,18 +59,18 @@ NS_INTERFACE_MAP_BEGIN(nsMsgProgress)
   NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
   NS_INTERFACE_MAP_ENTRY(nsIProgressEventSink)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
 NS_INTERFACE_MAP_END_THREADSAFE
 
 
 nsMsgProgress::nsMsgProgress()
 {
-  m_closeProgress = PR_FALSE;
-  m_processCanceled = PR_FALSE;
+  m_closeProgress = false;
+  m_processCanceled = false;
   m_pendingStateFlags = -1;
   m_pendingStateValue = 0;
 }
 
 nsMsgProgress::~nsMsgProgress()
 {
   (void)ReleaseListeners();
 }
@@ -118,17 +118,17 @@ NS_IMETHODIMP nsMsgProgress::OpenProgres
                             NS_LITERAL_STRING("_blank"),
                             chromeOptions,
                             array, getter_AddRefs(newWindow));
 }
 
 /* void closeProgressDialog (in boolean forceClose); */
 NS_IMETHODIMP nsMsgProgress::CloseProgressDialog(bool forceClose)
 {
-  m_closeProgress = PR_TRUE;
+  m_closeProgress = true;
   return OnStateChange(nsnull, nsnull, nsIWebProgressListener::STATE_STOP, forceClose ? NS_ERROR_FAILURE : NS_OK);
 }
 
 /* attribute boolean processCanceledByUser; */
 NS_IMETHODIMP nsMsgProgress::GetProcessCanceledByUser(bool *aProcessCanceledByUser)
 {
   NS_ENSURE_ARG_POINTER(aProcessCanceledByUser);
   *aProcessCanceledByUser = m_processCanceled;
--- a/mailnews/base/src/nsMsgPurgeService.cpp
+++ b/mailnews/base/src/nsMsgPurgeService.cpp
@@ -69,17 +69,17 @@ NS_IMPL_ISUPPORTS2(nsMsgPurgeService, ns
 void OnPurgeTimer(nsITimer *timer, void *aPurgeService)
 {
   nsMsgPurgeService *purgeService = (nsMsgPurgeService*)aPurgeService;
   purgeService->PerformPurge();
 }
 
 nsMsgPurgeService::nsMsgPurgeService()
 {
-  mHaveShutdown = PR_FALSE;
+  mHaveShutdown = false;
   mMinDelayBetweenPurges = 480;  // never purge a folder more than once every 8 hours (60 min/hour * 8 hours)
   mPurgeTimerInterval = 5;  // fire the purge timer every 5 minutes, starting 5 minutes after the service is created (when we load accounts)
 }
 
 nsMsgPurgeService::~nsMsgPurgeService()
 {
   if (mPurgeTimer)
     mPurgeTimer->Cancel();
@@ -113,29 +113,29 @@ NS_IMETHODIMP nsMsgPurgeService::Init()
   PR_LOG(MsgPurgeLogModule, PR_LOG_ALWAYS, ("mail.purge.min_delay=%d minutes",mMinDelayBetweenPurges));
   PR_LOG(MsgPurgeLogModule, PR_LOG_ALWAYS, ("mail.purge.timer_interval=%d minutes",mPurgeTimerInterval));
 
   // don't start purging right away.
   // because the accounts aren't loaded and because the user might be trying to sign in
   // or startup, etc.
   SetupNextPurge();
 
-  mHaveShutdown = PR_FALSE;
+  mHaveShutdown = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgPurgeService::Shutdown()
 {
   if (mPurgeTimer)
   {
     mPurgeTimer->Cancel();
     mPurgeTimer = nsnull;
   }
 
-  mHaveShutdown = PR_TRUE;
+  mHaveShutdown = true;
   return NS_OK;
 }
 
 nsresult nsMsgPurgeService::SetupNextPurge()
 {
   PR_LOG(MsgPurgeLogModule, PR_LOG_ALWAYS, ("setting to check again in %d minutes",mPurgeTimerInterval));
 
   // Convert mPurgeTimerInterval into milliseconds
@@ -226,17 +226,17 @@ nsresult nsMsgPurgeService::PerformPurge
               nsCString curFolderLastPurgeTimeString, curFolderUri;
               rv = childFolder->GetStringProperty("LastPurgeTime", curFolderLastPurgeTimeString);
               if (NS_FAILED(rv))
                 continue; // it is ok to fail, go on to next folder
 
               if (!curFolderLastPurgeTimeString.IsEmpty())
               {
                 PRInt64 theTime;
-                PR_ParseTimeString(curFolderLastPurgeTimeString.get(), PR_FALSE, &theTime);
+                PR_ParseTimeString(curFolderLastPurgeTimeString.get(), false, &theTime);
                 curFolderLastPurgeTime = theTime;
               }
 
               childFolder->GetURI(curFolderUri);
               PR_LOG(MsgPurgeLogModule, PR_LOG_ALWAYS, ("%s curFolderLastPurgeTime=%s (if blank, then never)", curFolderUri.get(), curFolderLastPurgeTimeString.get()));
 
               // check if this folder is due to purge
               // has to have been purged at least mMinDelayBetweenPurges minutes ago
@@ -249,32 +249,32 @@ nsresult nsMsgPurgeService::PerformPurge
                 PR_LOG(MsgPurgeLogModule, PR_LOG_ALWAYS, ("purging %s", curFolderUri.get()));
                 childFolder->ApplyRetentionSettings();
               }
               PRIntervalTime elapsedTime;
               LL_SUB(elapsedTime, PR_IntervalNow(), startTime);
               // check if more than 500 milliseconds have elapsed in this purge process
               if (PR_IntervalToMilliseconds(elapsedTime) > 500)
               {
-                keepApplyingRetentionSettings = PR_FALSE;
+                keepApplyingRetentionSettings = false;
                 break;
               }
             }
           }
         }
         nsCString type;
         nsresult rv = server->GetType(type);
         NS_ENSURE_SUCCESS(rv, rv);
 
         nsCAutoString contractid(NS_MSGPROTOCOLINFO_CONTRACTID_PREFIX);
         contractid.Append(type);
 
         nsCOMPtr<nsIMsgProtocolInfo> protocolInfo =
           do_GetService(contractid.get(), &rv);
-        NS_ENSURE_SUCCESS(rv, PR_FALSE);
+        NS_ENSURE_SUCCESS(rv, false);
 
         nsCString realHostName;
         server->GetRealHostName(realHostName);
         PR_LOG(MsgPurgeLogModule, PR_LOG_ALWAYS, ("[%d] %s (%s)", serverIndex, realHostName.get(), type.get()));
 
         nsCOMPtr <nsISpamSettings> spamSettings;
         rv = server->GetSpamSettings(getter_AddRefs(spamSettings));
         NS_ENSURE_SUCCESS(rv, rv);
@@ -318,17 +318,17 @@ nsresult nsMsgPurgeService::PerformPurge
         nsCString curJunkFolderLastPurgeTimeString;
         rv = junkFolder->GetStringProperty("curJunkFolderLastPurgeTime", curJunkFolderLastPurgeTimeString);
         if (NS_FAILED(rv))
           continue; // it is ok to fail, junk folder may not exist
 
         if (!curJunkFolderLastPurgeTimeString.IsEmpty())
         {
           PRInt64 theTime;
-          PR_ParseTimeString(curJunkFolderLastPurgeTimeString.get(), PR_FALSE, &theTime);
+          PR_ParseTimeString(curJunkFolderLastPurgeTimeString.get(), false, &theTime);
           curJunkFolderLastPurgeTime = theTime;
         }
 
         PR_LOG(MsgPurgeLogModule, PR_LOG_ALWAYS, ("[%d] %s curJunkFolderLastPurgeTime=%s (if blank, then never)", serverIndex, junkFolderURI.get(), curJunkFolderLastPurgeTimeString.get()));
 
         // check if this account is due to purge
         // has to have been purged at least mMinDelayBetweenPurges minutes ago
         // we don't want to purge the folders all the time
@@ -429,17 +429,17 @@ nsresult nsMsgPurgeService::SearchFolder
     nsCOMPtr<nsIMsgSearchValue> searchValue;
     searchTerm->GetValue(getter_AddRefs(searchValue));
     if (searchValue)
     {
       searchValue->SetAttrib(nsMsgSearchAttrib::AgeInDays);
       searchValue->SetAge((PRUint32) purgeInterval);
       searchTerm->SetValue(searchValue);
     }
-    searchTerm->SetBooleanAnd(PR_FALSE);
+    searchTerm->SetBooleanAnd(false);
     mSearchSession->AppendTerm(searchTerm);
   }
 
   // we are about to search
   // create mHdrsToDelete array (if not previously created)
   if (!mHdrsToDelete)
   {
     mHdrsToDelete = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
@@ -495,17 +495,17 @@ NS_IMETHODIMP nsMsgPurgeService::OnSearc
   PR_LOG(MsgPurgeLogModule, PR_LOG_ALWAYS, ("junkScore=%s (if empty or != nsIJunkMailPlugin::IS_SPAM_SCORE, don't add to list delete)", junkScoreStr.get()));
 
   // if "junkscore" is not set, don't delete the message
   if (junkScoreStr.IsEmpty())
     return NS_OK;
 
   if (atoi(junkScoreStr.get()) == nsIJunkMailPlugin::IS_SPAM_SCORE) {
     PR_LOG(MsgPurgeLogModule, PR_LOG_ALWAYS, ("added message to delete"));
-    return mHdrsToDelete->AppendElement(aMsgHdr, PR_FALSE);
+    return mHdrsToDelete->AppendElement(aMsgHdr, false);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgPurgeService::OnSearchDone(nsresult status)
 {
   nsresult rv = NS_OK;
   if (NS_SUCCEEDED(status))
@@ -513,17 +513,17 @@ NS_IMETHODIMP nsMsgPurgeService::OnSearc
     PRUint32 count;
     if (mHdrsToDelete)
       mHdrsToDelete->GetLength(&count);
     PR_LOG(MsgPurgeLogModule, PR_LOG_ALWAYS, ("%d messages to delete", count));
 
     if (count > 0) {
       PR_LOG(MsgPurgeLogModule, PR_LOG_ALWAYS, ("delete messages"));
       if (mSearchFolder)
-        rv = mSearchFolder->DeleteMessages(mHdrsToDelete, nsnull, PR_FALSE /*delete storage*/, PR_FALSE /*isMove*/, nsnull, PR_FALSE /*allowUndo*/);
+        rv = mSearchFolder->DeleteMessages(mHdrsToDelete, nsnull, false /*delete storage*/, false /*isMove*/, nsnull, false /*allowUndo*/);
     }
   }
   if (mHdrsToDelete)
     mHdrsToDelete->Clear();
   if (mSearchSession)
     mSearchSession->UnregisterListener(this);
   // don't cache the session
   // just create another search session next time we search, rather than clearing scopes, terms etc.
--- a/mailnews/base/src/nsMsgQuickSearchDBView.cpp
+++ b/mailnews/base/src/nsMsgQuickSearchDBView.cpp
@@ -47,18 +47,18 @@
 #include "nsIDBFolderInfo.h"
 #include "nsArrayEnumerator.h"
 #include "nsMsgMessageFlags.h"
 #include "nsIMutableArray.h"
 #include "nsMsgUtils.h"
 
 nsMsgQuickSearchDBView::nsMsgQuickSearchDBView()
 {
-  m_usingCachedHits = PR_FALSE;
-  m_cacheEmpty = PR_TRUE;
+  m_usingCachedHits = false;
+  m_cacheEmpty = true;
 }
 
 nsMsgQuickSearchDBView::~nsMsgQuickSearchDBView()
 {
 }
 
 NS_IMPL_ISUPPORTS_INHERITED2(nsMsgQuickSearchDBView, nsMsgDBView, nsIMsgDBView, nsIMsgSearchNotify)
 
@@ -120,33 +120,33 @@ nsresult nsMsgQuickSearchDBView::DeleteM
   return nsMsgDBView::DeleteMessages(window, indices, numIndices, deleteStorage);
 }
 
 NS_IMETHODIMP nsMsgQuickSearchDBView::DoCommand(nsMsgViewCommandTypeValue aCommand)
 {
   if (aCommand == nsMsgViewCommandType::markAllRead)
   {
     nsresult rv = NS_OK;
-    m_folder->EnableNotifications(nsIMsgFolder::allMessageCountNotifications, PR_FALSE, PR_TRUE /*dbBatching*/);
+    m_folder->EnableNotifications(nsIMsgFolder::allMessageCountNotifications, false, true /*dbBatching*/);
 
     for (PRInt32 i=0;NS_SUCCEEDED(rv) && i < GetSize();i++)
     {
       nsCOMPtr<nsIMsgDBHdr> msgHdr;
       m_db->GetMsgHdrForKey(m_keys[i],getter_AddRefs(msgHdr)); 
-      rv = m_db->MarkHdrRead(msgHdr, PR_TRUE, nsnull);
+      rv = m_db->MarkHdrRead(msgHdr, true, nsnull);
     }
 
-    m_folder->EnableNotifications(nsIMsgFolder::allMessageCountNotifications, PR_TRUE, PR_TRUE /*dbBatching*/);
+    m_folder->EnableNotifications(nsIMsgFolder::allMessageCountNotifications, true, true /*dbBatching*/);
 
     nsCOMPtr<nsIMsgImapMailFolder> imapFolder = do_QueryInterface(m_folder);
     if (NS_SUCCEEDED(rv) && imapFolder)
-      rv = imapFolder->StoreImapFlags(kImapMsgSeenFlag, PR_TRUE, m_keys.Elements(), 
+      rv = imapFolder->StoreImapFlags(kImapMsgSeenFlag, true, m_keys.Elements(), 
                                       m_keys.Length(), nsnull);
 
-    m_db->SetSummaryValid(PR_TRUE);
+    m_db->SetSummaryValid(true);
     return rv;
   }
   else
     return nsMsgDBView::DoCommand(aCommand);
 }
 
 NS_IMETHODIMP nsMsgQuickSearchDBView::GetViewType(nsMsgViewTypeValue *aViewType)
 {
@@ -166,17 +166,17 @@ nsresult nsMsgQuickSearchDBView::AddHdr(
                     nsMsgViewSortOrder::ascending, nsMsgViewSortType::byId);
     m_origKeys.InsertElementAt(insertIndex, msgKey);
   }
   if (m_viewFlags & (nsMsgViewFlagsType::kGroupBySort|
                      nsMsgViewFlagsType::kThreadedDisplay))
   {
     nsMsgKey parentKey;
     msgHdr->GetThreadParent(&parentKey);
-    return nsMsgThreadedDBView::OnNewHeader(msgHdr, parentKey, PR_TRUE);
+    return nsMsgThreadedDBView::OnNewHeader(msgHdr, parentKey, true);
   }
   else
     return nsMsgDBView::AddHdr(msgHdr, resultIndex);
 }
 
 nsresult nsMsgQuickSearchDBView::OnNewHeader(nsIMsgDBHdr *newHdr, nsMsgKey aParentKey, bool ensureListed)
 {
   if (newHdr)
@@ -235,17 +235,17 @@ NS_IMETHODIMP nsMsgQuickSearchDBView::On
           if (!oldMatch && !newMatch)
           {
             nsCOMPtr <nsIMsgDatabase> virtDatabase;
             nsCOMPtr <nsIDBFolderInfo> dbFolderInfo;
 
             rv = m_viewFolder->GetDBFolderInfoAndDB(getter_AddRefs(dbFolderInfo), getter_AddRefs(virtDatabase));
             NS_ENSURE_SUCCESS(rv, rv);
             dbFolderInfo->ChangeNumUnreadMessages((aOldFlags & nsMsgMessageFlags::Read) ? 1 : -1);
-            m_viewFolder->UpdateSummaryTotals(PR_TRUE); // force update from db.
+            m_viewFolder->UpdateSummaryTotals(true); // force update from db.
             virtDatabase->Commit(nsMsgDBCommitType::kLargeCommit);
           }
         }
       }
     }
   }
   return rv;
 }
@@ -294,17 +294,17 @@ nsMsgQuickSearchDBView::OnHdrPropertyCha
     NoteChange(index, 1, nsMsgViewNotificationCode::changed);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgQuickSearchDBView::GetSearchSession(nsIMsgSearchSession* *aSession)
 {
-  NS_ASSERTION(PR_FALSE, "GetSearchSession method is not implemented");
+  NS_ASSERTION(false, "GetSearchSession method is not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 
 NS_IMETHODIMP
 nsMsgQuickSearchDBView::SetSearchSession(nsIMsgSearchSession *aSession)
 {
   m_searchSession = do_GetWeakReference(aSession);
@@ -319,17 +319,17 @@ nsMsgQuickSearchDBView::OnSearchHit(nsIM
     return NS_ERROR_NULL_POINTER;
   // remember search hit and when search is done, reconcile cache
   // with new hits;
   m_hdrHits.AppendObject(aMsgHdr);
   nsMsgKey key;
   aMsgHdr->GetMessageKey(&key);
   // Is FindKey going to be expensive here? A lot of hits could make
   // it a little bit slow to search through the view for every hit.
-  if (m_cacheEmpty || FindKey(key, PR_FALSE) == nsMsgViewIndex_None)
+  if (m_cacheEmpty || FindKey(key, false) == nsMsgViewIndex_None)
     return AddHdr(aMsgHdr); 
   else
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgQuickSearchDBView::OnSearchDone(nsresult status)
 {
@@ -383,17 +383,17 @@ nsMsgQuickSearchDBView::OnSearchDone(nsr
     }
     dbFolderInfo->SetNumUnreadMessages(numUnread);
     dbFolderInfo->SetNumMessages(numTotal);
     m_viewFolder->UpdateSummaryTotals(true); // force update from db.
     virtDatabase->Commit(nsMsgDBCommitType::kLargeCommit);
   }
   if (m_sortType != nsMsgViewSortType::byThread)//we do not find levels for the results.
   {
-    m_sortValid = PR_FALSE;       //sort the results 
+    m_sortValid = false;       //sort the results 
     Sort(m_sortType, m_sortOrder);
   }
   if (m_viewFolder && (m_viewFolder != m_folder))
     SetMRUTimeForFolder(m_viewFolder);
 
   return NS_OK;
 }
 
@@ -420,17 +420,17 @@ nsMsgQuickSearchDBView::OnNewSearch()
     nsCOMPtr<nsISimpleEnumerator> cachedHits;
     nsCString searchUri;
     m_viewFolder->GetURI(searchUri);
     m_db->GetCachedHits(searchUri.get(), getter_AddRefs(cachedHits));
     if (cachedHits)
     {
       bool hasMore;
 
-      m_usingCachedHits = PR_TRUE;
+      m_usingCachedHits = true;
       cachedHits->HasMoreElements(&hasMore);
       m_cacheEmpty = !hasMore;
       if (mTree)
         mTree->BeginUpdateBatch();
       while (hasMore)
       {
         nsCOMPtr <nsIMsgDBHdr> pHeader;
         nsresult rv = cachedHits->GetNext(getter_AddRefs(pHeader));
@@ -624,21 +624,21 @@ nsMsgQuickSearchDBView::ListCollapsedChi
     if (msgHdr)
     {
       nsMsgKey msgKey;
       msgHdr->GetMessageKey(&msgKey);
       if (msgKey != rootKey || (GroupViewUsesDummyRow() && rootKeySkipped))
       {
         // if this hdr is in the original view, add it to new view.
         if (m_origKeys.BinaryIndexOf(msgKey) != kNotFound)
-          messageArray->AppendElement(msgHdr, PR_FALSE);
+          messageArray->AppendElement(msgHdr, false);
       }
       else
       {
-        rootKeySkipped = PR_TRUE;
+        rootKeySkipped = true;
       }
     }
   }
   return NS_OK;
 }
 
 nsresult nsMsgQuickSearchDBView::ListIdsInThread(nsIMsgThread *threadHdr, nsMsgViewIndex startOfThreadViewIndex, PRUint32 *pNumListed)
 {
@@ -683,17 +683,17 @@ nsresult nsMsgQuickSearchDBView::ListIds
             m_flags[startOfThreadViewIndex] = rootFlags | MSG_VIEW_FLAG_HASCHILDREN;
 
           viewIndex++;
           (*pNumListed)++;
         }
       }
       else
       {
-        rootKeySkipped = PR_TRUE;
+        rootKeySkipped = true;
       }
     }
   }
   return NS_OK;
 }
 
 nsresult
 nsMsgQuickSearchDBView::ListIdsInThreadOrder(nsIMsgThread *threadHdr,
@@ -818,17 +818,17 @@ nsresult nsMsgQuickSearchDBView::Expansi
       if (msgKey != rootKey || (GroupViewUsesDummyRow() && rootKeySkipped))
       {
         // if this hdr is in the original view, add it to new view.
         if (m_origKeys.BinaryIndexOf(msgKey) != kNotFound)
           (*expansionDelta)++;
       }
       else
       {
-        rootKeySkipped = PR_TRUE;
+        rootKeySkipped = true;
       }
     }
   }
   if (! (flags & nsMsgMessageFlags::Elided))
     *expansionDelta = - (*expansionDelta);
   return NS_OK;
 }
 
--- a/mailnews/base/src/nsMsgRDFDataSource.cpp
+++ b/mailnews/base/src/nsMsgRDFDataSource.cpp
@@ -43,18 +43,18 @@
 #include "nsEnumeratorUtils.h"
 #include "nsIObserverService.h"
 #include "nsServiceManagerUtils.h"
 #include "nsMsgUtils.h"
 
 static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
 
 nsMsgRDFDataSource::nsMsgRDFDataSource():
-    m_shuttingDown(PR_FALSE),
-    mInitialized(PR_FALSE)
+    m_shuttingDown(false),
+    mInitialized(false)
 {
 }
 
 nsMsgRDFDataSource::~nsMsgRDFDataSource()
 {
   // final shutdown happens here
   NS_ASSERTION(!mInitialized, "Object going away without cleanup, possibly dangerous!");
   if (mInitialized) Cleanup();
@@ -67,33 +67,33 @@ nsresult
 nsMsgRDFDataSource::Init()
 {
   NS_ENSURE_TRUE(!mInitialized, NS_ERROR_ALREADY_INITIALIZED);
 
   nsresult rv;
   /* Add an observer to XPCOM shutdown */
   nsCOMPtr<nsIObserverService> obs = do_GetService("@mozilla.org/observer-service;1", &rv);
   NS_ENSURE_SUCCESS(rv, rv);
-  rv = obs->AddObserver(static_cast<nsIObserver*>(this), NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_TRUE);
+  rv = obs->AddObserver(static_cast<nsIObserver*>(this), NS_XPCOM_SHUTDOWN_OBSERVER_ID, true);
   NS_ENSURE_SUCCESS(rv, rv);
 
   getRDFService();
 
-  mInitialized=PR_TRUE;
+  mInitialized=true;
   return rv;
 }
 
 void nsMsgRDFDataSource::Cleanup()
 {
   mRDFService = nsnull;
 
   // release the window
   mWindow = nsnull;
 
-  mInitialized = PR_FALSE;
+  mInitialized = false;
 }
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(nsMsgRDFDataSource)
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsMsgRDFDataSource)
   NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMARRAY(mObservers)
   NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mWindow)
   NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mRDFService)
@@ -191,17 +191,17 @@ nsMsgRDFDataSource::Move(nsIRDFResource 
     return NS_RDF_NO_VALUE;
 }
 
 
 /* boolean HasAssertion (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */
 NS_IMETHODIMP
 nsMsgRDFDataSource::HasAssertion(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue, bool *_retval)
 {
-    *_retval = PR_FALSE;
+    *_retval = false;
     return NS_OK;
 }
 
 
 /* void AddObserver (in nsIRDFObserver aObserver); */
 NS_IMETHODIMP
 nsMsgRDFDataSource::AddObserver(nsIRDFObserver *aObserver)
 {
@@ -219,24 +219,24 @@ nsMsgRDFDataSource::RemoveObserver(nsIRD
   NS_ENSURE_ARG_POINTER(aObserver);
   mObservers.RemoveObject(aObserver);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgRDFDataSource::HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, bool *result)
 {
-  *result = PR_FALSE;
+  *result = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgRDFDataSource::HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc, bool *result)
 {
-  *result = PR_FALSE;
+  *result = false;
   return NS_OK;
 }
 
 /* nsISimpleEnumerator ArcLabelsIn (in nsIRDFNode aNode); */
 NS_IMETHODIMP
 nsMsgRDFDataSource::ArcLabelsIn(nsIRDFNode *aNode, nsISimpleEnumerator **_retval)
 {
   return NS_NewEmptyEnumerator(_retval);
@@ -297,17 +297,17 @@ nsMsgRDFDataSource::EndUpdateBatch()
 }
 
 
 /* XPCOM Shutdown observer */
 NS_IMETHODIMP
 nsMsgRDFDataSource::Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *someData )
 {
   if (!strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
-    m_shuttingDown = PR_TRUE;
+    m_shuttingDown = true;
     Cleanup();
   }
   return NS_OK;
 }
 
 
 NS_IMETHODIMP nsMsgRDFDataSource::GetWindow(nsIMsgWindow * *aWindow)
 {
@@ -339,17 +339,17 @@ nsMsgRDFDataSource::getRDFService()
 }
 
 nsresult nsMsgRDFDataSource::NotifyPropertyChanged(nsIRDFResource *resource,
                                                    nsIRDFResource *propertyResource,
                                                    nsIRDFNode *newNode,
                                                    nsIRDFNode *oldNode /* = nsnull */)
 {
 
-  NotifyObservers(resource, propertyResource, newNode, oldNode, PR_FALSE, PR_TRUE);
+  NotifyObservers(resource, propertyResource, newNode, oldNode, false, true);
   return NS_OK;
 
 }
 
 nsresult nsMsgRDFDataSource::NotifyObservers(nsIRDFResource *subject,
                                                 nsIRDFResource *property,
                                                 nsIRDFNode *newObject,
                                                 nsIRDFNode *oldObject,
@@ -370,39 +370,39 @@ nsresult nsMsgRDFDataSource::NotifyObser
 bool
 nsMsgRDFDataSource::assertEnumFunc(nsIRDFObserver *aObserver, void *aData)
 {
   nsMsgRDFNotification *note = (nsMsgRDFNotification *)aData;
   aObserver->OnAssert(note->datasource,
                      note->subject,
                      note->property,
                      note->newObject);
-  return PR_TRUE;
+  return true;
 }
 
 bool
 nsMsgRDFDataSource::unassertEnumFunc(nsIRDFObserver *aObserver, void *aData)
 {
   nsMsgRDFNotification* note = (nsMsgRDFNotification *)aData;
   aObserver->OnUnassert(note->datasource,
                        note->subject,
                        note->property,
                        note->newObject);
-  return PR_TRUE;
+  return true;
 }
 
 bool
 nsMsgRDFDataSource::changeEnumFunc(nsIRDFObserver *aObserver, void *aData)
 {
   nsMsgRDFNotification* note = (nsMsgRDFNotification *)aData;
   aObserver->OnChange(note->datasource,
                      note->subject,
                      note->property,
                      note->oldObject, note->newObject);
-  return PR_TRUE;
+  return true;
 }
 nsresult
 nsMsgRDFDataSource::GetTransactionManager(nsISupportsArray *aSources, nsITransactionManager **aTransactionManager)
 {
   if(!aTransactionManager)
     return NS_ERROR_NULL_POINTER;
 
   *aTransactionManager = nsnull;
--- a/mailnews/base/src/nsMsgSearchDBView.cpp
+++ b/mailnews/base/src/nsMsgSearchDBView.cpp
@@ -59,17 +59,17 @@
 #include "nsComponentManagerUtils.h"
 #include "nsServiceManagerUtils.h"
 
 static bool gReferenceOnlyThreading;
 
 nsMsgSearchDBView::nsMsgSearchDBView()
 {
   // don't try to display messages for the search pane.
-  mSuppressMsgDisplay = PR_TRUE;
+  mSuppressMsgDisplay = true;
   m_threadsTable.Init();
   m_hdrsTable.Init();
   m_totalMessagesInView = 0;
   m_nextThreadId = 1;
 }
 
 nsMsgSearchDBView::~nsMsgSearchDBView()
 {	
@@ -97,17 +97,17 @@ NS_IMETHODIMP nsMsgSearchDBView::Open(ns
                                     viewFlags, pCount);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
     NS_ENSURE_SUCCESS(rv, rv);
   prefBranch->GetBoolPref("mail.strict_threading", &gReferenceOnlyThreading);
 
   // our sort is automatically valid because we have no contents at this point!
-  m_sortValid = PR_TRUE;
+  m_sortValid = true;
 
     if (pCount)
       *pCount = 0;
     m_folder = nsnull;
     return rv;
 }
 
 
@@ -379,17 +379,17 @@ void nsMsgSearchDBView::SetMsgHdrAt(nsIM
   hdr->GetFolder(getter_AddRefs(folder));
   m_folders.ReplaceObjectAt(folder, index);
 }
 
 bool nsMsgSearchDBView::InsertEmptyRows(nsMsgViewIndex viewIndex, PRInt32 numRows)
 {
   for (PRInt32 i = 0; i < numRows; i++)
     if (!m_folders.InsertObjectAt(nsnull, viewIndex + i))
-      return PR_FALSE;
+      return false;
   return nsMsgDBView::InsertEmptyRows(viewIndex, numRows);
 }
 
 void nsMsgSearchDBView::RemoveRows(nsMsgViewIndex viewIndex, PRInt32 numRows)
 {
   nsMsgDBView::RemoveRows(viewIndex, numRows);
   for (PRInt32 i = 0; i < numRows; i++)
     m_folders.RemoveObjectAt(viewIndex);
@@ -428,17 +428,17 @@ nsresult nsMsgSearchDBView::GetDBForView
   nsresult rv = GetFolderForViewIndex(index, getter_AddRefs(aFolder));
   NS_ENSURE_SUCCESS(rv, rv);
   return aFolder->GetMsgDatabase(db);
 }
 
 nsresult nsMsgSearchDBView::AddHdrFromFolder(nsIMsgDBHdr *msgHdr, nsIMsgFolder *folder)
 {
   if (m_viewFlags & nsMsgViewFlagsType::kGroupBySort)
-    return nsMsgGroupView::OnNewHeader(msgHdr, nsMsgKey_None, PR_TRUE);
+    return nsMsgGroupView::OnNewHeader(msgHdr, nsMsgKey_None, true);
   nsMsgKey msgKey;
   PRUint32 msgFlags;
   msgHdr->GetMessageKey(&msgKey);
   msgHdr->GetFlags(&msgFlags);
 
   if (m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay)
   {
     nsCOMPtr<nsIMsgThread> thread;
@@ -466,17 +466,17 @@ nsresult nsMsgSearchDBView::AddHdrFromFo
     AddMsgToHashTables(msgHdr, thread);
     nsCOMPtr<nsIMsgDBHdr> parent;
     PRUint32 posInThread;
     // We need to move threads in order to keep ourselves sorted
     // correctly.  We want the index of the original thread...we can do this by
     // getting the root header before we add the new header, and finding that.
     if (newThread || !viewThread->MsgCount())
     {
-      viewThread->AddHdr(msgHdr, PR_FALSE, posInThread,
+      viewThread->AddHdr(msgHdr, false, posInThread,
                          getter_AddRefs(parent));
       nsMsgViewIndex insertIndex = GetIndexForThread(msgHdr);
       NS_ASSERTION(insertIndex == m_levels.Length() || !m_levels[insertIndex],
                     "inserting into middle of thread");
       if (insertIndex == nsMsgViewIndex_None)
         return NS_ERROR_FAILURE;
       if (!(m_viewFlags & nsMsgViewFlagsType::kExpandAll))
         msgFlags |= nsMsgMessageFlags::Elided;
@@ -581,17 +581,17 @@ nsresult nsMsgSearchDBView::AddHdrFromFo
 // This method removes the thread at threadIndex from the view 
 // and puts it back in its new position, determined by the sort order.
 // And, if the selection is affected, save and restore the selection.
 void nsMsgSearchDBView::MoveThreadAt(nsMsgViewIndex threadIndex)
 {
   bool updatesSuppressed = mSuppressChangeNotification;
   // Turn off tree notifications so that we don't reload the current message.
   if (!updatesSuppressed)
-    SetSuppressChangeNotifications(PR_TRUE);
+    SetSuppressChangeNotifications(true);
 
   nsCOMPtr<nsIMsgDBHdr> threadHdr;
   GetMsgHdrForViewIndex(threadIndex, getter_AddRefs(threadHdr));
 
   PRUint32 saveFlags = m_flags[threadIndex];
   bool threadIsExpanded = !(saveFlags & nsMsgMessageFlags::Elided);
   PRInt32 childCount = 0;
   nsMsgKey preservedKey;
@@ -656,17 +656,17 @@ void nsMsgSearchDBView::MoveThreadAt(nsM
     m_folders.InsertObjectsAt(threadFolders, newIndex + 1);
   }
   m_flags[newIndex] = saveFlags;
   // unfreeze selection.
   if (hasSelection)
     RestoreSelection(preservedKey, preservedSelection);
 
   if (!updatesSuppressed)
-    SetSuppressChangeNotifications(PR_FALSE);
+    SetSuppressChangeNotifications(false);
   nsMsgViewIndex lowIndex = threadIndex < newIndex ? threadIndex : newIndex;
   nsMsgViewIndex highIndex = lowIndex == threadIndex ? newIndex : threadIndex;
   NoteChange(lowIndex, highIndex - lowIndex + childCount + 1,
              nsMsgViewNotificationCode::changed);
 }
 
 nsresult
 nsMsgSearchDBView::GetMessageEnumerator(nsISimpleEnumerator **enumerator)
@@ -795,17 +795,17 @@ nsCOMArray<nsIMsgFolder>* nsMsgSearchDBV
 }
 
 NS_IMETHODIMP
 nsMsgSearchDBView::GetCommandStatus(nsMsgViewCommandTypeValue command, bool *selectable_p, nsMsgViewCommandCheckStateValue *selected_p)
 {
   if (command != nsMsgViewCommandType::runJunkControls)
     return nsMsgDBView::GetCommandStatus(command, selectable_p, selected_p);
 
-  *selectable_p = PR_FALSE;
+  *selectable_p = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP 
 nsMsgSearchDBView::DoCommandWithFolder(nsMsgViewCommandTypeValue command, nsIMsgFolder *destFolder)
 {
     mCommand = command;
     mDestFolder = destFolder;
@@ -898,19 +898,19 @@ nsresult nsMsgSearchDBView::RemoveByInde
     return nsMsgDBView::RemoveByIndex(index);
 }
 
 nsresult nsMsgSearchDBView::DeleteMessages(nsIMsgWindow *window, nsMsgViewIndex *indices, PRInt32 numIndices, bool deleteStorage)
 {
    nsresult rv = GetFoldersAndHdrsForSelection(indices, numIndices);
    NS_ENSURE_SUCCESS(rv, rv);
    if (mDeleteModel != nsMsgImapDeleteModels::MoveToTrash)
-     deleteStorage = PR_TRUE;
+     deleteStorage = true;
   if (mDeleteModel != nsMsgImapDeleteModels::IMAPDelete)
-    m_deletingRows = PR_TRUE;
+    m_deletingRows = true;
 
   // remember the deleted messages in case the user undoes the delete,
   // and we want to restore the hdr to the view, even if it no
   // longer matches the search criteria.
   for (nsMsgViewIndex i = 0; i < (nsMsgViewIndex) numIndices; i++) 
   {
     nsCOMPtr<nsIMsgDBHdr> msgHdr; 
     (void) GetMsgHdrForViewIndex(indices[i], getter_AddRefs(msgHdr));
@@ -919,17 +919,17 @@ nsresult nsMsgSearchDBView::DeleteMessag
     // if we are deleting rows, save off the view indices
     if (m_deletingRows)
       mIndicesToNoteChange.AppendElement(indices[i]);
 
   }
   rv = deleteStorage ? ProcessRequestsInAllFolders(window)
                      : ProcessRequestsInOneFolder(window);
   if (NS_FAILED(rv))
-    m_deletingRows = PR_FALSE;
+    m_deletingRows = false;
   return rv;
 }
 
 nsresult 
 nsMsgSearchDBView::CopyMessages(nsIMsgWindow *window, nsMsgViewIndex *indices, PRInt32 numIndices, bool isMove, nsIMsgFolder *destFolder)
 {
     GetFoldersAndHdrsForSelection(indices, numIndices);
     return ProcessRequestsInOneFolder(window);
@@ -1025,17 +1025,17 @@ nsMsgSearchDBView::GetFoldersAndHdrsForS
       nsCOMPtr<nsIMsgDBHdr> hdr = do_QueryElementAt(messages, i, &rv);
       if (hdr)
       {
         nsCOMPtr<nsIMsgFolder> msgFolder;
         hdr->GetFolder(getter_AddRefs(msgFolder));
         if (NS_SUCCEEDED(rv) && msgFolder && msgFolder == curFolder) 
         {
           nsCOMPtr<nsISupports> hdrSupports = do_QueryInterface(hdr);
-          msgHdrsForOneFolder->AppendElement(hdrSupports, PR_FALSE);
+          msgHdrsForOneFolder->AppendElement(hdrSupports, false);
         }
       }
     }
     nsCOMPtr<nsISupports> supports = do_QueryInterface(msgHdrsForOneFolder, &rv);
     if (NS_SUCCEEDED(rv) && supports)
       m_hdrsForEachFolder->AppendElement(supports);
   }
   return rv;
@@ -1106,29 +1106,29 @@ nsresult nsMsgSearchDBView::ProcessReque
     nsIMsgFolder *curFolder = m_uniqueFoldersSelected[mCurIndex];
     NS_ASSERTION(curFolder, "curFolder is null");
     nsCOMPtr<nsIMutableArray> messageArray =
         do_QueryElementAt(m_hdrsForEachFolder, mCurIndex);
     NS_ASSERTION(messageArray, "messageArray is null");
 
     // called for delete with trash, copy and move
     if (mCommand == nsMsgViewCommandType::deleteMsg)
-        curFolder->DeleteMessages(messageArray, window, PR_FALSE /* delete storage */, PR_FALSE /* is move*/, this, PR_TRUE /*allowUndo*/);
+        curFolder->DeleteMessages(messageArray, window, false /* delete storage */, false /* is move*/, this, true /*allowUndo*/);
     else 
     {
       NS_ASSERTION(!(curFolder == mDestFolder), "The source folder and the destination folder are the same");
       if (NS_SUCCEEDED(rv) && curFolder != mDestFolder)
       {
          nsCOMPtr<nsIMsgCopyService> copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv);
          if (NS_SUCCEEDED(rv))
          {
            if (mCommand == nsMsgViewCommandType::moveMessages)
-             copyService->CopyMessages(curFolder, messageArray, mDestFolder, PR_TRUE /* isMove */, this, window, PR_TRUE /*allowUndo*/);
+             copyService->CopyMessages(curFolder, messageArray, mDestFolder, true /* isMove */, this, window, true /*allowUndo*/);
            else if (mCommand == nsMsgViewCommandType::copyMessages)
-             copyService->CopyMessages(curFolder, messageArray, mDestFolder, PR_FALSE /* isMove */, this, window, PR_TRUE /*allowUndo*/);
+             copyService->CopyMessages(curFolder, messageArray, mDestFolder, false /* isMove */, this, window, true /*allowUndo*/);
          }
       }
     }
     return rv;
 }
 
 nsresult nsMsgSearchDBView::ProcessRequestsInAllFolders(nsIMsgWindow *window)
 {
@@ -1137,17 +1137,17 @@ nsresult nsMsgSearchDBView::ProcessReque
   {
     nsIMsgFolder *curFolder = m_uniqueFoldersSelected[folderIndex];
     NS_ASSERTION (curFolder, "curFolder is null");
 
     nsCOMPtr<nsIMutableArray> messageArray =
            do_QueryElementAt(m_hdrsForEachFolder, folderIndex);
     NS_ASSERTION(messageArray, "messageArray is null");
 
-    curFolder->DeleteMessages(messageArray, window, PR_TRUE /* delete storage */, PR_FALSE /* is move*/, nsnull/*copyServListener*/, PR_FALSE /*allowUndo*/ );
+    curFolder->DeleteMessages(messageArray, window, true /* delete storage */, false /* is move*/, nsnull/*copyServListener*/, false /*allowUndo*/ );
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgSearchDBView::SetCurCustomColumn(const nsAString& aColID)
 {
   m_curCustomColumn = aColID;
   return NS_OK;
--- a/mailnews/base/src/nsMsgServiceProvider.cpp
+++ b/mailnews/base/src/nsMsgServiceProvider.cpp
@@ -158,15 +158,15 @@ nsMsgServiceProviderService::LoadDataSou
 
   nsCOMPtr<nsIRDFRemoteDataSource> remote =
       do_QueryInterface(ds, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   
   rv = remote->Init(aURI);
   NS_ENSURE_SUCCESS(rv, rv);
   // for now load synchronously (async seems to be busted)
-  rv = remote->Refresh(PR_TRUE);
+  rv = remote->Refresh(true);
   NS_ASSERTION(NS_SUCCEEDED(rv), "failed refresh?\n");
 
   rv = mInnerDataSource->AddDataSource(ds);
 
   return rv;
 }
--- a/mailnews/base/src/nsMsgSpecialViews.cpp
+++ b/mailnews/base/src/nsMsgSpecialViews.cpp
@@ -65,17 +65,17 @@ bool nsMsgThreadsWithUnreadDBView::Wants
 
     threadHdr->GetNumUnreadChildren(&numNewChildren);
     if (numNewChildren > 0)
       return true;
     PRUint32 numChildren;
     threadHdr->GetNumChildren(&numChildren);
     m_totalUnwantedMessagesInView += numChildren;
   }
-  return PR_FALSE;
+  return false;
 }
 
 nsresult nsMsgThreadsWithUnreadDBView::AddMsgToThreadNotInView(nsIMsgThread *threadHdr, nsIMsgDBHdr *msgHdr, bool ensureListed)
 {
   nsresult rv = NS_OK;
 
   nsCOMPtr <nsIMsgDBHdr> parentHdr;
   PRUint32 msgFlags;
@@ -146,17 +146,17 @@ bool nsMsgWatchedThreadsWithUnreadDBView
     threadHdr->GetNumUnreadChildren(&numNewChildren);
     threadHdr->GetFlags(&threadFlags);
     if (numNewChildren > 0 && (threadFlags & nsMsgMessageFlags::Watched) != 0)
       return true;
     PRUint32 numChildren;
     threadHdr->GetNumChildren(&numChildren);
     m_totalUnwantedMessagesInView += numChildren;
   }
-  return PR_FALSE;
+  return false;
 }
 
 nsresult nsMsgWatchedThreadsWithUnreadDBView::AddMsgToThreadNotInView(nsIMsgThread *threadHdr, nsIMsgDBHdr *msgHdr, bool ensureListed)
 {
   nsresult rv = NS_OK;
   PRUint32 threadFlags;
   PRUint32 msgFlags;
   msgHdr->GetFlags(&msgFlags);
--- a/mailnews/base/src/nsMsgTagService.cpp
+++ b/mailnews/base/src/nsMsgTagService.cpp
@@ -287,25 +287,25 @@ NS_IMETHODIMP nsMsgTagService::AddTag(co
   nsAutoString transformedTag(tag);
   MsgReplaceChar(transformedTag, " ()/{%*<>\\\"", '_');
   nsCAutoString key;
   CopyUTF16toMUTF7(transformedTag, key);
   // We have an imap server that converts keys to upper case so we're going
   // to normalize all keys to lower case (upper case looks ugly in prefs.js)
   ToLowerCase(key);
   nsCAutoString prefName(key);
-  while (PR_TRUE)
+  while (true)
   {
     nsAutoString tagValue;
     nsresult rv = GetTagForKey(prefName, tagValue);
     if (NS_FAILED(rv) || tagValue.IsEmpty() || tagValue.Equals(tag))
       return AddTagForKey(prefName, tag, color, ordinal);
     prefName.Append('A');
   }
-  NS_ASSERTION(PR_FALSE, "can't get here");
+  NS_ASSERTION(false, "can't get here");
   return NS_ERROR_FAILURE;
 }
 
 /* long getColorForKey (in string key); */
 NS_IMETHODIMP nsMsgTagService::GetColorForKey(const nsACString &key, nsACString  &_retval)
 {
   nsCAutoString prefName(key);
   if (!gMigratingKeys)
@@ -502,17 +502,17 @@ nsresult nsMsgTagService::MigrateLabelsT
   nsCString prefString;
 
   PRInt32 prefVersion = 0;
   nsresult rv = m_tagPrefBranch->GetIntPref(TAG_PREF_VERSION, &prefVersion);
   if (NS_SUCCEEDED(rv) && prefVersion > 1)
     return rv;
   else if (prefVersion == 1)
   {
-    gMigratingKeys = PR_TRUE;
+    gMigratingKeys = true;
   // need to convert the keys to lower case
     nsIMsgTag **tagArray;
     PRUint32 numTags;
     GetAllTags(&numTags, &tagArray);
     for (PRUint32 tagIndex = 0; tagIndex < numTags; tagIndex++)
     {
       nsCAutoString key, color, ordinal;
       nsAutoString tagStr;
@@ -521,17 +521,17 @@ nsresult nsMsgTagService::MigrateLabelsT
       tag->GetTag(tagStr);
       tag->GetOrdinal(ordinal);
       tag->GetColor(color);
       DeleteKey(key);
       ToLowerCase(key);
       AddTagForKey(key, tagStr, color, ordinal);
     }
     NS_FREE_XPCOM_ISUPPORTS_POINTER_ARRAY(numTags, tagArray);
-    gMigratingKeys = PR_FALSE;
+    gMigratingKeys = false;
   }
   else 
   {
     nsCOMPtr<nsIPrefBranch> prefRoot(do_GetService(NS_PREFSERVICE_CONTRACTID));
     nsCOMPtr<nsIPrefLocalizedString> pls;
     nsString ucsval;
     nsCAutoString labelKey("$label1");
     for(PRInt32 i = 0; i < PREF_LABELS_MAX; )
--- a/mailnews/base/src/nsMsgThreadedDBView.cpp
+++ b/mailnews/base/src/nsMsgThreadedDBView.cpp
@@ -45,17 +45,17 @@
 
 #define MSGHDR_CACHE_LOOK_AHEAD_SIZE  25    // Allocate this more to avoid reallocation on new mail.
 #define MSGHDR_CACHE_MAX_SIZE         8192  // Max msghdr cache entries.
 #define MSGHDR_CACHE_DEFAULT_SIZE     100
 
 nsMsgThreadedDBView::nsMsgThreadedDBView()
 {
   /* member initializers and constructor code */
-  m_havePrevView = PR_FALSE;
+  m_havePrevView = false;
 }
 
 nsMsgThreadedDBView::~nsMsgThreadedDBView()
 {
   /* destructor code */
 }
 
 NS_IMETHODIMP nsMsgThreadedDBView::Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder, nsMsgViewFlagsTypeValue viewFlags, PRInt32 *pCount)
@@ -128,17 +128,17 @@ nsresult nsMsgThreadedDBView::InitThread
   nsresult rv;
   
   m_keys.Clear();
   m_flags.Clear();
   m_levels.Clear(); 
   m_prevKeys.Clear();
   m_prevFlags.Clear();
   m_prevLevels.Clear();
-  m_havePrevView = PR_FALSE;
+  m_havePrevView = false;
   nsresult getSortrv = NS_OK; // ### TODO m_db->GetSortInfo(&sortType, &sortOrder);
   
   // list all the ids into m_keys.
   nsMsgKey startMsg = 0; 
   do
   {
     const PRInt32 kIdChunkSize = 400;
     PRInt32  numListed = 0;
@@ -190,17 +190,17 @@ nsresult nsMsgThreadedDBView::SortThread
   }
   m_keys.SetLength(numThreads);
   m_flags.SetLength(numThreads);
   m_levels.SetLength(numThreads);
   //m_viewFlags &= ~nsMsgViewFlagsType::kThreadedDisplay;
   m_sortType = nsMsgViewSortType::byNone; // sort from scratch
   nsMsgDBView::Sort(sortType, sortOrder);
   m_viewFlags |= nsMsgViewFlagsType::kThreadedDisplay;
-  SetSuppressChangeNotifications(PR_TRUE);
+  SetSuppressChangeNotifications(true);
   // Loop through the original array, for each thread that's expanded, find it in the new array
   // and expand the thread. We have to update MSG_VIEW_FLAG_HAS_CHILDREN because
   // we may be going from a flat sort, which doesn't maintain that flag,
   // to a threaded sort, which requires that flag.
   for (PRUint32 j = 0; j < m_keys.Length(); j++)
   {
     PRUint32 flags = m_flags[j];
     if ((flags & (MSG_VIEW_FLAG_HASCHILDREN | nsMsgMessageFlags::Elided)) == MSG_VIEW_FLAG_HASCHILDREN)
@@ -225,17 +225,17 @@ nsresult nsMsgThreadedDBView::SortThread
           PRUint32 numChildren;
           pThread->GetNumChildren(&numChildren);
           if (numChildren > 1)
             m_flags[j] = flags | MSG_VIEW_FLAG_HASCHILDREN | nsMsgMessageFlags::Elided;
         }
       }
     }
   }
-  SetSuppressChangeNotifications(PR_FALSE);
+  SetSuppressChangeNotifications(false);
 
   return NS_OK;
 }
 
 nsresult nsMsgThreadedDBView::AddKeys(nsMsgKey *pKeys, PRInt32 *pFlags, const char *pLevels, nsMsgViewSortTypeValue sortType, PRInt32 numKeysToAdd)
 
 {
   PRInt32	numAdded = 0;
@@ -319,17 +319,17 @@ NS_IMETHODIMP nsMsgThreadedDBView::Sort(
       m_viewFlags |= nsMsgViewFlagsType::kThreadedDisplay;
       m_viewFlags &= nsMsgViewFlagsType::kGroupBySort;
       if ( m_havePrevView)
       {
         // restore saved id array and flags array
         m_keys = m_prevKeys;
         m_flags = m_prevFlags;
         m_levels = m_prevLevels;
-        m_sortValid = PR_TRUE;
+        m_sortValid = true;
         
         // the sort may have changed the number of rows
         // before we restore the selection, tell the tree
         // do this before we call restore selection
         // this is safe when there is no selection.
         rv = AdjustRowCount(rowCountBeforeSort, GetSize());
         
         RestoreSelection(preservedKey, preservedSelection);
@@ -368,17 +368,17 @@ NS_IMETHODIMP nsMsgThreadedDBView::Sort(
         m_prevFlags = m_flags;
         m_prevLevels = m_levels;
         // do this before we sort, so that we'll use the cheap method
         // of expanding.
         m_viewFlags &= ~(nsMsgViewFlagsType::kThreadedDisplay | nsMsgViewFlagsType::kGroupBySort);
         ExpandAll();
         //			m_idArray.RemoveAll();
         //			m_flags.Clear();
-        m_havePrevView = PR_TRUE;
+        m_havePrevView = true;
       }
     }
   }
   else if (m_sortOrder != sortOrder)// check for toggling the sort
   {
     nsMsgDBView::Sort(sortType, sortOrder);
   }
   if (!sortThreads)
@@ -535,30 +535,30 @@ void	nsMsgThreadedDBView::OnExtraFlagCha
         m_prevFlags[prevViewIndex] = extraFlag; // will this be right?
       }
     }
   }
   // we don't really know what's changed, but to be on the safe side, set the sort invalid
   // so that reverse sort will pick it up.
   if (m_sortType == nsMsgViewSortType::byStatus || m_sortType == nsMsgViewSortType::byFlagged || 
     m_sortType == nsMsgViewSortType::byUnread || m_sortType == nsMsgViewSortType::byPriority)
-    m_sortValid = PR_FALSE;
+    m_sortValid = false;
 }
 
 void nsMsgThreadedDBView::OnHeaderAddedOrDeleted()
 {
   ClearPrevIdArray();
 }
 
 void nsMsgThreadedDBView::ClearPrevIdArray()
 {
   m_prevKeys.Clear();
   m_prevLevels.Clear();
   m_prevFlags.Clear();
-  m_havePrevView = PR_FALSE;
+  m_havePrevView = false;
 }
 
 nsresult nsMsgThreadedDBView::InitSort(nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder)
 {
   if (m_viewFlags & nsMsgViewFlagsType::kGroupBySort)
     return NS_OK; // nothing to do.
 
   if (sortType == nsMsgViewSortType::byThread)
@@ -707,17 +707,17 @@ nsresult nsMsgThreadedDBView::OnNewHeade
   return rv;
 }
 
 
 NS_IMETHODIMP nsMsgThreadedDBView::OnParentChanged (nsMsgKey aKeyChanged, nsMsgKey oldParent, nsMsgKey newParent, nsIDBChangeListener *aInstigator)
 {
   // we need to adjust the level of the hdr whose parent changed, and invalidate that row,
   // iff we're in threaded mode.
-  if (PR_FALSE && m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay)
+  if (false && m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay)
   {
     nsMsgViewIndex childIndex = FindViewIndex(aKeyChanged);
     if (childIndex != nsMsgViewIndex_None)
     {
       nsMsgViewIndex parentIndex = FindViewIndex(newParent);
       PRInt32 newParentLevel = (parentIndex == nsMsgViewIndex_None) ? -1 : m_levels[parentIndex];
       nsMsgViewIndex oldParentIndex = FindViewIndex(oldParent);
       PRInt32 oldParentLevel = (oldParentIndex != nsMsgViewIndex_None || newParent == nsMsgKey_None) 
@@ -759,17 +759,17 @@ void nsMsgThreadedDBView::MoveThreadAt(n
 {
   // we need to check if the thread is collapsed or not...
   // We want to turn off tree notifications so that we don't
   // reload the current message.
   // We also need to invalidate the range between where the thread was
   // and where it ended up.
   bool changesDisabled = mSuppressChangeNotification;
   if (!changesDisabled)
-    SetSuppressChangeNotifications(PR_TRUE);
+    SetSuppressChangeNotifications(true);
 
   nsCOMPtr <nsIMsgDBHdr> threadHdr;
 
   GetMsgHdrForViewIndex(threadIndex, getter_AddRefs(threadHdr));
   PRInt32 childCount = 0;
 
   nsMsgKey preservedKey;
   nsAutoTArray<nsMsgKey, 1> preservedSelection;
@@ -830,17 +830,17 @@ void nsMsgThreadedDBView::MoveThreadAt(n
      newIndex = 0;
   }
   m_flags[newIndex] = saveFlags;
   // unfreeze selection.
   if (hasSelection)
     RestoreSelection(preservedKey, preservedSelection);
 
   if (!changesDisabled)
-    SetSuppressChangeNotifications(PR_FALSE);
+    SetSuppressChangeNotifications(false);
   nsMsgViewIndex lowIndex = threadIndex < newIndex ? threadIndex : newIndex;
   nsMsgViewIndex highIndex = lowIndex == threadIndex ? newIndex : threadIndex;
   NoteChange(lowIndex, highIndex - lowIndex + childCount + 1,
              nsMsgViewNotificationCode::changed);
 }
 nsresult nsMsgThreadedDBView::AddMsgToThreadNotInView(nsIMsgThread *threadHdr, nsIMsgDBHdr *msgHdr, bool ensureListed)
 {
   nsresult rv = NS_OK;
@@ -958,17 +958,17 @@ nsresult nsMsgThreadedDBView::RemoveByIn
       {
         flag |= MSG_VIEW_FLAG_HASCHILDREN;
         flag |= nsMsgMessageFlags::Elided;
       }
       m_flags[index] = flag;
       mIndicesToNoteChange.RemoveElement(index);
     }
     else
-      NS_ASSERTION(PR_FALSE, "couldn't find thread child");	
+      NS_ASSERTION(false, "couldn't find thread child");	
     NoteChange(index, 1, nsMsgViewNotificationCode::changed);	
   }
   else
   {
     // we may have deleted a whole, collapsed thread - if so,
     // ensure that the current index will be noted as changed.
     if (!mIndicesToNoteChange.Contains(index))
       mIndicesToNoteChange.AppendElement(index);
--- a/mailnews/base/src/nsMsgWindow.cpp
+++ b/mailnews/base/src/nsMsgWindow.cpp
@@ -74,18 +74,18 @@ static NS_DEFINE_CID(kTransactionManager
 
 NS_IMPL_THREADSAFE_ISUPPORTS3(nsMsgWindow,
                               nsIMsgWindow,
                               nsIURIContentListener,
                               nsISupportsWeakReference)
 
 nsMsgWindow::nsMsgWindow()
 {
-  mCharsetOverride = PR_FALSE;
-  m_stopped = PR_FALSE;
+  mCharsetOverride = false;
+  m_stopped = false;
 }
 
 nsMsgWindow::~nsMsgWindow()
 {
   CloseWindow();
 }
 
 nsresult nsMsgWindow::Init()
@@ -115,17 +115,17 @@ NS_IMETHODIMP nsMsgWindow::GetMessageWin
     // if we don't have a docshell, then we need to look up the message pane docshell
     nsCOMPtr<nsIDocShell> rootShell(do_QueryReferent(mRootDocShellWeak));
     if (rootShell)
     {
       nsCOMPtr<nsIDocShellTreeNode> rootAsNode(do_QueryInterface(rootShell));
       nsCOMPtr<nsIDocShellTreeItem> msgDocShellItem;
       if(rootAsNode)
          rootAsNode->FindChildWithName(NS_LITERAL_STRING("messagepane").get(),
-                                       PR_TRUE, PR_FALSE, nsnull, nsnull,
+                                       true, false, nsnull, nsnull,
                                        getter_AddRefs(msgDocShellItem));
       NS_ENSURE_TRUE(msgDocShellItem, NS_ERROR_FAILURE);
       docShell = do_QueryInterface(msgDocShellItem);
       // we don't own mMessageWindowDocShell so don't try to keep a reference to it!
       mMessageWindowDocShellWeak = do_GetWeakReference(docShell);
     }
   }
   docShell.swap(*aDocShell);
@@ -367,17 +367,17 @@ NS_IMETHODIMP nsMsgWindow::GetNotificati
 {
   NS_ENSURE_ARG_POINTER(aNotificationCallbacks);
   NS_IF_ADDREF(*aNotificationCallbacks = mNotificationCallbacks);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgWindow::StopUrls()
 {
-  m_stopped = PR_TRUE;
+  m_stopped = true;
   nsCOMPtr<nsIWebNavigation> webnav(do_QueryReferent(mRootDocShellWeak));
   return webnav ? webnav->Stop(nsIWebNavigation::STOP_NETWORK) : NS_ERROR_FAILURE;
 }
 
 // nsIURIContentListener support
 NS_IMETHODIMP nsMsgWindow::OnStartURIOpen(nsIURI* aURI, bool* aAbortOpen)
 {
   return NS_OK;
@@ -414,17 +414,17 @@ NS_IMETHODIMP nsMsgWindow::DoContent(con
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgWindow::IsPreferred(const char * aContentType,
                          char ** aDesiredContentType,
                          bool * aCanHandleContent)
 {
-  *aCanHandleContent = PR_FALSE;
+  *aCanHandleContent = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgWindow::CanHandleContent(const char * aContentType,
                                             bool aIsContentPreferred,
                                             char ** aDesiredContentType,
                                             bool * aCanHandleContent)
 
@@ -435,17 +435,17 @@ NS_IMETHODIMP nsMsgWindow::CanHandleCont
 
   nsCOMPtr<nsIDocShell> messageWindowDocShell;
   GetMessageWindowDocShell(getter_AddRefs(messageWindowDocShell));
   nsCOMPtr<nsIURIContentListener> ctnListener (do_GetInterface(messageWindowDocShell));
   if (ctnListener)
     return ctnListener->CanHandleContent(aContentType, aIsContentPreferred,
                                          aDesiredContentType, aCanHandleContent);
   else
-    *aCanHandleContent = PR_FALSE;
+    *aCanHandleContent = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgWindow::GetParentContentListener(nsIURIContentListener** aParent)
 {
   NS_ENSURE_ARG_POINTER(aParent);
   *aParent = nsnull;
   return NS_OK;
--- a/mailnews/base/src/nsMsgXFViewThread.cpp
+++ b/mailnews/base/src/nsMsgXFViewThread.cpp
@@ -80,23 +80,23 @@ NS_IMETHODIMP nsMsgXFViewThread::GetFlag
 NS_IMETHODIMP nsMsgXFViewThread::SetFlags(PRUint32 aFlags)
 {
   m_flags = aFlags;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgXFViewThread::SetSubject(const nsACString& aSubject)
 {
-  NS_ASSERTION(PR_FALSE, "shouldn't call this");
+  NS_ASSERTION(false, "shouldn't call this");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsMsgXFViewThread::GetSubject(nsACString& result)
 {
-  NS_ASSERTION(PR_FALSE, "shouldn't call this");
+  NS_ASSERTION(false, "shouldn't call this");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsMsgXFViewThread::GetNumChildren(PRUint32 *aNumChildren)
 {
   NS_ENSURE_ARG_POINTER(aNumChildren);
   *aNumChildren = m_keys.Length();
   return NS_OK;
@@ -109,17 +109,17 @@ NS_IMETHODIMP nsMsgXFViewThread::GetNumU
   return NS_OK;
 }
 
 NS_IMETHODIMP 
 nsMsgXFViewThread::AddChild(nsIMsgDBHdr *aNewHdr, nsIMsgDBHdr *aInReplyTo, 
                             bool aThreadInThread, nsIDBChangeAnnouncer *aAnnouncer)
 {
   PRUint32 whereInserted;
-  return AddHdr(aNewHdr, PR_FALSE, whereInserted, nsnull);
+  return AddHdr(aNewHdr, false, whereInserted, nsnull);
 }
 
 // Returns the parent of the newly added header. If reparentChildren
 // is true, we believe that the new header is a parent of an existing
 // header, and we should find it, and reparent it.
 nsresult nsMsgXFViewThread::AddHdr(nsIMsgDBHdr *newHdr,
                                    bool reparentChildren,
                                    PRUint32 &whereInserted,
@@ -362,23 +362,23 @@ NS_IMETHODIMP nsMsgXFViewThread::GetRoot
   NS_ENSURE_ARG_POINTER(aResult);
   if (aResultIndex)
     *aResultIndex = 0;
   return GetChildHdrAt(0, aResult);
 }
 
 NS_IMETHODIMP nsMsgXFViewThread::GetChildKeyAt(PRInt32 aIndex, nsMsgKey *aResult)
 {
-  NS_ASSERTION(PR_FALSE, "shouldn't call this");
+  NS_ASSERTION(false, "shouldn't call this");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsMsgXFViewThread::GetChild(nsMsgKey msgKey, nsIMsgDBHdr **aResult)
 {
-  NS_ASSERTION(PR_FALSE, "shouldn't call this");
+  NS_ASSERTION(false, "shouldn't call this");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 
 PRUint32 nsMsgXFViewThread::HdrIndex(nsIMsgDBHdr *hdr)
 {
   nsMsgKey msgKey;
   nsCOMPtr<nsIMsgFolder> folder;
@@ -412,26 +412,26 @@ bool nsMsgXFViewThread::IsHdrParentOf(ns
   nsCString messageId;
   possibleParent->GetMessageId(getter_Copies(messageId));
 
   while (referenceToCheck > 0)
   {
     possibleChild->GetStringReference(referenceToCheck - 1, reference);
 
     if (reference.Equals(messageId))
-      return PR_TRUE;
+      return true;
     // if reference didn't match, check if this ref is for a non-existent
     // header. If it is, continue looking at ancestors.
     nsCOMPtr<nsIMsgDBHdr> refHdr;
     m_view->GetMsgHdrFromHash(reference, getter_AddRefs(refHdr));
     if (refHdr)
       break;
     referenceToCheck--;
   }
-  return PR_FALSE;
+  return false;
 }
 
 NS_IMETHODIMP nsMsgXFViewThread::GetNewestMsgDate(PRUint32 *aResult) 
 {
   // if this hasn't been set, figure it out by enumerating the msgs in the thread.
   if (!m_newestMsgDate)
   {
     PRUint32 numChildren;
--- a/mailnews/base/src/nsMsgXFVirtualFolderDBView.cpp
+++ b/mailnews/base/src/nsMsgXFVirtualFolderDBView.cpp
@@ -49,19 +49,19 @@
 #include "nsITreeColumns.h"
 #include "nsIMsgSearchSession.h"
 #include "nsMsgDBCID.h"
 #include "nsMsgMessageFlags.h"
 #include "nsServiceManagerUtils.h"
 
 nsMsgXFVirtualFolderDBView::nsMsgXFVirtualFolderDBView()
 {
-  mSuppressMsgDisplay = PR_FALSE;
-  m_doingSearch = PR_FALSE;
-  m_doingQuickSearch = PR_FALSE;
+  mSuppressMsgDisplay = false;
+  m_doingSearch = false;
+  m_doingQuickSearch = false;
   m_totalMessagesInView = 0;
 }
 
 nsMsgXFVirtualFolderDBView::~nsMsgXFVirtualFolderDBView()
 {
 }
 
 NS_IMETHODIMP nsMsgXFVirtualFolderDBView::Open(nsIMsgFolder *folder, 
@@ -156,17 +156,17 @@ nsresult nsMsgXFVirtualFolderDBView::OnN
       searchSession->MatchHdr(newHdr, m_db, &match);
     if (!match)
       match = WasHdrRecentlyDeleted(newHdr);
     if (match)
     {
       nsCOMPtr <nsIMsgFolder> folder;
       newHdr->GetFolder(getter_AddRefs(folder));
       bool saveDoingSearch = m_doingSearch;
-      m_doingSearch = PR_FALSE;
+      m_doingSearch = false;
       OnSearchHit(newHdr, folder);
       m_doingSearch = saveDoingSearch;
     }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgXFVirtualFolderDBView::OnHdrPropertyChanged(nsIMsgDBHdr *aHdrChanged,
@@ -260,17 +260,17 @@ void nsMsgXFVirtualFolderDBView::UpdateC
     m_foldersSearchingOver.RemoveObject(m_curFolderGettingHits);
   }
 
   while (m_foldersSearchingOver.Count() > 0)
   {
     // this new folder has cached hits.
     if (m_foldersSearchingOver[0] == curSearchFolder)
     {
-      m_curFolderHasCachedHits = PR_TRUE;
+      m_curFolderHasCachedHits = true;
       m_foldersSearchingOver.RemoveObjectAt(0);
       break;
     }
     else
     {
       // this must be a folder that had no hits with the current search.
       // So all cached hits, if any, need to be removed.
       UpdateCacheAndViewForFolder(m_foldersSearchingOver[0], 0, nsnull);
@@ -285,17 +285,17 @@ nsMsgXFVirtualFolderDBView::OnSearchHit(
   NS_ENSURE_ARG(aFolder);
 
   nsCOMPtr<nsIMsgDatabase> dbToUse;
   nsCOMPtr<nsIDBFolderInfo> folderInfo;
   aFolder->GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), getter_AddRefs(dbToUse));
 
   if (m_curFolderGettingHits != aFolder && m_doingSearch && !m_doingQuickSearch)
   {
-    m_curFolderHasCachedHits = PR_FALSE;
+    m_curFolderHasCachedHits = false;
     // since we've gotten a hit for a new folder, the searches for
     // any previous folders are done, so deal with stale cached hits
     // for those folders now.
     UpdateCacheAndViewForPrevSearchedFolders(aFolder);
     m_curFolderGettingHits = aFolder;
     m_hdrHits.Clear();
     m_curFolderStartKeyIndex = m_keys.Length();
   }
@@ -304,17 +304,17 @@ nsMsgXFVirtualFolderDBView::OnSearchHit(
   if (!m_doingQuickSearch)
   {
     m_viewFolder->GetURI(searchUri);
     dbToUse->HdrIsInCache(searchUri.get(), aMsgHdr, &hdrInCache);    
   }
   if (!m_doingSearch || !m_curFolderHasCachedHits || !hdrInCache)
   {
     if (m_viewFlags & nsMsgViewFlagsType::kGroupBySort)
-      nsMsgGroupView::OnNewHeader(aMsgHdr, nsMsgKey_None, PR_TRUE);
+      nsMsgGroupView::OnNewHeader(aMsgHdr, nsMsgKey_None, true);
     else if (m_sortValid)
       InsertHdrFromFolder(aMsgHdr, aFolder);
     else
       AddHdrFromFolder(aMsgHdr, aFolder);
   }
   m_hdrHits.AppendObject(aMsgHdr);
   m_totalMessagesInView++;
 
@@ -323,17 +323,17 @@ nsMsgXFVirtualFolderDBView::OnSearchHit(
 
 NS_IMETHODIMP
 nsMsgXFVirtualFolderDBView::OnSearchDone(nsresult status)
 {
   // handle any non verified hits we haven't handled yet.
   if (NS_SUCCEEDED(status) && !m_doingQuickSearch && status != NS_MSG_SEARCH_INTERRUPTED)
     UpdateCacheAndViewForPrevSearchedFolders(nsnull);
 
-  m_doingSearch = PR_FALSE;
+  m_doingSearch = false;
   //we want to set imap delete model once the search is over because setting next
   //message after deletion will happen before deleting the message and search scope
   //can change with every search.
   mDeleteModel = nsMsgImapDeleteModels::MoveToTrash;  //set to default in case it is non-imap folder
   nsIMsgFolder *curFolder = m_folders.SafeObjectAt(0);
   if (curFolder)
     GetImapDeleteModel(curFolder);
 
@@ -364,32 +364,32 @@ nsMsgXFVirtualFolderDBView::OnSearchDone
     }
   dbFolderInfo->SetNumUnreadMessages(numUnread);
   dbFolderInfo->SetNumMessages(m_totalMessagesInView);
   m_viewFolder->UpdateSummaryTotals(true); // force update from db.
   virtDatabase->Commit(nsMsgDBCommitType::kLargeCommit);
   if (!m_sortValid && m_sortType != nsMsgViewSortType::byThread && 
       !(m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay))
   {
-    m_sortValid = PR_FALSE;       //sort the results
+    m_sortValid = false;       //sort the results
     Sort(m_sortType, m_sortOrder);
   }
   m_foldersSearchingOver.Clear();
   m_curFolderGettingHits = nsnull;
   return rv;
 }
 
 
 NS_IMETHODIMP
 nsMsgXFVirtualFolderDBView::OnNewSearch()
 {
   PRInt32 oldSize = GetSize();
 
   RemovePendingDBListeners();
-  m_doingSearch = PR_TRUE;
+  m_doingSearch = true;
   m_totalMessagesInView = 0;
   m_folders.Clear();
   m_keys.Clear();
   m_levels.Clear();
   m_flags.Clear();
 
   // needs to happen after we remove the keys, since RowCountChanged() will call our GetRowCount()
   if (mTree)
@@ -485,26 +485,26 @@ nsMsgXFVirtualFolderDBView::OnNewSearch(
       }
     }
   }
   if (mTree && !m_doingQuickSearch)
     mTree->EndUpdateBatch();
 
   m_curFolderStartKeyIndex = 0;
   m_curFolderGettingHits = nsnull;
-  m_curFolderHasCachedHits = PR_FALSE;
+  m_curFolderHasCachedHits = false;
 
   // if we have cached hits, sort them.
   if (GetSize() > 0)
   {
     // currently, we keep threaded views sorted while we build them.
     if (m_sortType != nsMsgViewSortType::byThread &&
       !(m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay))
     {
-      m_sortValid = PR_FALSE;       //sort the results
+      m_sortValid = false;       //sort the results
       Sort(m_sortType, m_sortOrder);
     }
   }
   return NS_OK;
 }
 
 
 NS_IMETHODIMP nsMsgXFVirtualFolderDBView::DoCommand(nsMsgViewCommandTypeValue command)
--- a/mailnews/base/src/nsSpamSettings.cpp
+++ b/mailnews/base/src/nsSpamSettings.cpp
@@ -67,25 +67,25 @@
 #include "nsAbBaseCID.h"
 #include "nsIAbManager.h"
 #include "nsIMsgAccountManager.h"
 #include "nsMsgBaseCID.h"
 
 nsSpamSettings::nsSpamSettings()
 {
   mLevel = 0;
-  mMoveOnSpam = PR_FALSE;
+  mMoveOnSpam = false;
   mMoveTargetMode = nsISpamSettings::MOVE_TARGET_MODE_ACCOUNT;
-  mPurge = PR_FALSE;
+  mPurge = false;
   mPurgeInterval = 14; // 14 days
 
   mServerFilterTrustFlags = 0;
 
-  mUseWhiteList = PR_FALSE;
-  mUseServerFilter = PR_FALSE;
+  mUseWhiteList = false;
+  mUseServerFilter = false;
 
   nsresult rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(mLogFile));
   if (NS_SUCCEEDED(rv))
     mLogFile->Append(NS_LITERAL_STRING("junklog.html"));
 }
 
 nsSpamSettings::~nsSpamSettings()
 {
@@ -819,17 +819,17 @@ NS_IMETHODIMP nsSpamSettings::OnStopRunn
   NS_ENSURE_SUCCESS(rv,rv);
   return rv;
 }
 
 NS_IMETHODIMP nsSpamSettings::CheckWhiteList(nsIMsgDBHdr *aMsgHdr, bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aMsgHdr);
   NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = PR_FALSE;  // default in case of error or no whitelisting
+  *aResult = false;  // default in case of error or no whitelisting
 
   if (!mUseWhiteList || (!mWhiteListDirArray.Count() &&
                           mTrustedMailDomains.IsEmpty()))
     return NS_OK;
 
   // do per-message processing
 
   nsCString author;
@@ -862,17 +862,17 @@ NS_IMETHODIMP nsSpamSettings::CheckWhite
     PRInt32 atPos = authorEmailAddress.FindChar('@');
     if (atPos >= 0)
       domain = Substring(authorEmailAddress, atPos + 1);
     if (!domain.IsEmpty())
     {
       if (!mTrustedMailDomains.IsEmpty() &&
           MsgHostDomainIsTrusted(domain, mTrustedMailDomains))
       {
-        *aResult = PR_TRUE;
+        *aResult = true;
         return NS_OK;
       }
 
       if (mInhibitWhiteListingIdentityDomain)
       {
         for (PRUint32 i = 0; i < mEmails.Length(); ++i)
         {
           nsCAutoString identityDomain;
@@ -895,14 +895,14 @@ NS_IMETHODIMP nsSpamSettings::CheckWhite
          index < mWhiteListDirArray.Count() && !cardForAddress;
          index++)
     {
       mWhiteListDirArray[index]->CardForEmailAddress(authorEmailAddress,
                                                      getter_AddRefs(cardForAddress));
     }
     if (cardForAddress)
     {
-      *aResult = PR_TRUE;
+      *aResult = true;
       return NS_OK;
     }
   }
   return NS_OK; // default return is false
 }
--- a/mailnews/base/src/nsStatusBarBiffManager.cpp
+++ b/mailnews/base/src/nsStatusBarBiffManager.cpp
@@ -57,17 +57,17 @@
 
 // QueryInterface, AddRef, and Release
 //
 NS_IMPL_ISUPPORTS2(nsStatusBarBiffManager, nsIStatusBarBiffManager, nsIFolderListener)
 
 nsIAtom * nsStatusBarBiffManager::kBiffStateAtom = nsnull;
 
 nsStatusBarBiffManager::nsStatusBarBiffManager()
-: mInitialized(PR_FALSE), mCurrentBiffState(nsIMsgFolder::nsMsgBiffState_Unknown)
+: mInitialized(false), mCurrentBiffState(nsIMsgFolder::nsMsgBiffState_Unknown)
 {
 }
 
 nsStatusBarBiffManager::~nsStatusBarBiffManager()
 {
     NS_IF_RELEASE(kBiffStateAtom);
 }
 
@@ -86,17 +86,17 @@ nsresult nsStatusBarBiffManager::Init()
 
   kBiffStateAtom = MsgNewAtom("BiffState");
 
   nsCOMPtr<nsIMsgMailSession> mailSession = 
     do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv); 
   if(NS_SUCCEEDED(rv))
     mailSession->AddFolderListener(this, nsIFolderListener::intPropertyChanged);
 
-  mInitialized = PR_TRUE;
+  mInitialized = true;
   return NS_OK;
 }
 
 nsresult nsStatusBarBiffManager::PlayBiffSound()
 {
   nsresult rv;
   nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
   NS_ENSURE_SUCCESS(rv,rv);
@@ -131,28 +131,28 @@ nsresult nsStatusBarBiffManager::PlayBif
           nsCOMPtr<nsIFile> soundFile;
           rv = soundURL->GetFile(getter_AddRefs(soundFile));
           if (NS_SUCCEEDED(rv)) {
             bool soundFileExists = false;
             rv = soundFile->Exists(&soundFileExists);
             if (NS_SUCCEEDED(rv) && soundFileExists) {
               rv = mSound->Play(soundURL);
               if (NS_SUCCEEDED(rv))
-                customSoundPlayed = PR_TRUE;
+                customSoundPlayed = true;
             }
           }
         }
       }
       else {
         // todo, see if we can create a nsIFile using the string as a native path.
         // if that fails, try playing a system sound
         NS_ConvertUTF8toUTF16 utf16SoundURLSpec(soundURLSpec);
         rv = mSound->PlaySystemSound(utf16SoundURLSpec);
         if (NS_SUCCEEDED(rv))
-          customSoundPlayed = PR_TRUE;
+          customSoundPlayed = true;
       }
     }
   }    
   
   // if nothing played, play the default system sound
   if (!customSoundPlayed) {
 #ifdef XP_MACOSX
     // Mac has no specific event sounds, so just beep instead.
--- a/mailnews/base/src/nsSubscribableServer.cpp
+++ b/mailnews/base/src/nsSubscribableServer.cpp
@@ -47,19 +47,19 @@
 #include "nsArrayEnumerator.h"
 #include "nsServiceManagerUtils.h"
 
 static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
 
 nsSubscribableServer::nsSubscribableServer(void)
 {
     mDelimiter = '.';
-    mShowFullName = PR_TRUE;
+    mShowFullName = true;
     mTreeRoot = nsnull;
-    mStopped = PR_FALSE;
+    mStopped = false;
 }
 
 nsresult
 nsSubscribableServer::Init()
 {
     nsresult rv;
 
     rv = EnsureRDFService();
@@ -122,18 +122,18 @@ nsSubscribableServer::SetAsSubscribed(co
 
     SubscribeTreeNode *node = nsnull;
     rv = FindAndCreateNode(path, &node);
     NS_ENSURE_SUCCESS(rv,rv);
 
     NS_ASSERTION(node,"didn't find the node");
     if (!node) return NS_ERROR_FAILURE;
 
-    node->isSubscribable = PR_TRUE;
-    node->isSubscribed = PR_TRUE;
+    node->isSubscribable = true;
+    node->isSubscribed = true;
 
     rv = NotifyChange(node, kNC_Subscribed, node->isSubscribed);
     NS_ENSURE_SUCCESS(rv,rv);
 
     return rv;
 }
 
 NS_IMETHODIMP
@@ -174,17 +174,17 @@ nsSubscribableServer::SetState(const nsA
                                bool *aStateChanged)
 {
     nsresult rv = NS_OK;
     NS_ASSERTION(!aPath.IsEmpty() && aStateChanged, "no path or stateChanged");
     if (aPath.IsEmpty() || !aStateChanged) return NS_ERROR_NULL_POINTER;
 
     NS_ASSERTION(MsgIsUTF8(aPath), "aPath is not in UTF-8");
 
-    *aStateChanged = PR_FALSE;
+    *aStateChanged = false;
 
     SubscribeTreeNode *node = nsnull;
     rv = FindAndCreateNode(aPath, &node);
     NS_ENSURE_SUCCESS(rv,rv);
 
     NS_ASSERTION(node,"didn't find the node");
     if (!node) return NS_ERROR_FAILURE;
 
@@ -193,17 +193,17 @@ nsSubscribableServer::SetState(const nsA
         return NS_OK;
     }
 
     if (node->isSubscribed == aState) {
         return NS_OK;
     }
     else {
         node->isSubscribed = aState;
-        *aStateChanged = PR_TRUE;
+        *aStateChanged = true;
         rv = NotifyChange(node, kNC_Subscribed, node->isSubscribed);
         NS_ENSURE_SUCCESS(rv,rv);
     }
 
     return rv;
 }
 
 void
@@ -252,17 +252,17 @@ nsSubscribableServer::NotifyAssert(Subsc
     rv = EnsureRDFService();
     NS_ENSURE_SUCCESS(rv,rv);
 
     rv = mRDFService->GetResource(subjectUri, getter_AddRefs(subject));
     NS_ENSURE_SUCCESS(rv,rv);
     rv = mRDFService->GetResource(objectUri, getter_AddRefs(object));
     NS_ENSURE_SUCCESS(rv,rv);
 
-    rv = Notify(subject, property, object, PR_TRUE, PR_FALSE);
+    rv = Notify(subject, property, object, true, false);
     NS_ENSURE_SUCCESS(rv,rv);
     return NS_OK;
 }
 
 nsresult
 nsSubscribableServer::EnsureRDFService()
 {
     nsresult rv;
@@ -297,20 +297,20 @@ nsSubscribableServer::NotifyChange(Subsc
 
     rv = EnsureRDFService();
     NS_ENSURE_SUCCESS(rv,rv);
 
     rv = mRDFService->GetResource(subjectUri, getter_AddRefs(subject));
     NS_ENSURE_SUCCESS(rv,rv);
 
     if (value) {
-        rv = Notify(subject,property,kTrueLiteral,PR_FALSE,PR_TRUE);
+        rv = Notify(subject,property,kTrueLiteral,false,true);
     }
     else {
-        rv = Notify(subject,property,kFalseLiteral,PR_FALSE,PR_TRUE);
+        rv = Notify(subject,property,kFalseLiteral,false,true);
     }
 
     NS_ENSURE_SUCCESS(rv,rv);
     return NS_OK;
 }
 
 nsresult
 nsSubscribableServer::EnsureSubscribeDS()
@@ -363,66 +363,66 @@ nsSubscribableServer::GetSubscribeListen
 			NS_ADDREF(*aListener);
 	}
 	return NS_OK;
 }
 
 NS_IMETHODIMP
 nsSubscribableServer::SubscribeCleanup()
 {
-	NS_ASSERTION(PR_FALSE,"override this.");
+	NS_ASSERTION(false,"override this.");
 	return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 nsSubscribableServer::StartPopulatingWithUri(nsIMsgWindow *aMsgWindow, bool aForceToServer, const char *uri)
 {
-    mStopped = PR_FALSE;
+    mStopped = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsSubscribableServer::StartPopulating(nsIMsgWindow *aMsgWindow, bool aForceToServer, bool aGetOnlyNew /*ignored*/)
 {
     nsresult rv = NS_OK;
 
-    mStopped = PR_FALSE;
+    mStopped = false;
 
     rv = FreeSubtree(mTreeRoot);
     mTreeRoot = nsnull;
     NS_ENSURE_SUCCESS(rv,rv);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsSubscribableServer::StopPopulating(nsIMsgWindow *aMsgWindow)
 {
-    mStopped = PR_TRUE;
+    mStopped = true;
     return NS_OK;
 }
 
 
 NS_IMETHODIMP
 nsSubscribableServer::UpdateSubscribed()
 {
-	NS_ASSERTION(PR_FALSE,"override this.");
+	NS_ASSERTION(false,"override this.");
 	return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 nsSubscribableServer::Subscribe(const PRUnichar *aName)
 {
-	NS_ASSERTION(PR_FALSE,"override this.");
+	NS_ASSERTION(false,"override this.");
 	return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 nsSubscribableServer::Unsubscribe(const PRUnichar *aName)
 {
-	NS_ASSERTION(PR_FALSE,"override this.");
+	NS_ASSERTION(false,"override this.");
 	return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 nsSubscribableServer::SetShowFullName(bool showFullName)
 {
 	mShowFullName = showFullName;
 	return NS_OK;
@@ -479,18 +479,18 @@ nsSubscribableServer::CreateNode(Subscri
     (*result)->name = strdup(name);
     if (!(*result)->name) return NS_ERROR_OUT_OF_MEMORY;
 
     (*result)->parent = parent;
     (*result)->prevSibling = nsnull;
     (*result)->nextSibling = nsnull;
     (*result)->firstChild = nsnull;
     (*result)->lastChild = nsnull;
-    (*result)->isSubscribed = PR_FALSE;
-    (*result)->isSubscribable = PR_FALSE;
+    (*result)->isSubscribed = false;
+    (*result)->isSubscribable = false;
 #ifdef HAVE_SUBSCRIBE_DESCRIPTION
     (*result)->description = nsnull;
 #endif
 #ifdef HAVE_SUBSCRIBE_MESSAGES
     (*result)->messages = 0;
 #endif
     (*result)->cachedChild = nsnull;
 
@@ -657,17 +657,17 @@ nsSubscribableServer::FindAndCreateNode(
 
 NS_IMETHODIMP
 nsSubscribableServer::HasChildren(const nsACString &aPath, bool *aHasChildren)
 {
     nsresult rv = NS_OK;
     NS_ASSERTION(aHasChildren, "no hasChildren");
     if (!aHasChildren) return NS_ERROR_NULL_POINTER;
 
-    *aHasChildren = PR_FALSE;
+    *aHasChildren = false;
 
     SubscribeTreeNode *node = nsnull;
     rv = FindAndCreateNode(aPath, &node);
     NS_ENSURE_SUCCESS(rv,rv);
 
     NS_ASSERTION(node,"didn't find the node");
     if (!node) return NS_ERROR_FAILURE;
 
@@ -677,17 +677,17 @@ nsSubscribableServer::HasChildren(const 
 
 
 NS_IMETHODIMP
 nsSubscribableServer::IsSubscribed(const nsACString &aPath,
                                    bool *aIsSubscribed)
 {
     NS_ENSURE_ARG_POINTER(aIsSubscribed);
 
-    *aIsSubscribed = PR_FALSE;
+    *aIsSubscribed = false;
 
     SubscribeTreeNode *node = nsnull;
     nsresult rv = FindAndCreateNode(aPath, &node);
     NS_ENSURE_SUCCESS(rv,rv);
 
     NS_ASSERTION(node,"didn't find the node");
     if (!node) return NS_ERROR_FAILURE;
 
@@ -696,17 +696,17 @@ nsSubscribableServer::IsSubscribed(const
 }
 
 NS_IMETHODIMP
 nsSubscribableServer::IsSubscribable(const nsACString &aPath,
                                      bool *aIsSubscribable)
 {
     NS_ENSURE_ARG_POINTER(aIsSubscribable);
 
-    *aIsSubscribable = PR_FALSE;
+    *aIsSubscribable = false;
 
     SubscribeTreeNode *node = nsnull;
     nsresult rv = FindAndCreateNode(aPath, &node);
     NS_ENSURE_SUCCESS(rv,rv);
 
     NS_ASSERTION(node,"didn't find the node");
     if (!node) return NS_ERROR_FAILURE;
 
@@ -813,17 +813,17 @@ nsSubscribableServer::GetChildren(const 
     }
 
     return NS_NewArrayEnumerator(aResult, result);
 }
 
 NS_IMETHODIMP
 nsSubscribableServer::CommitSubscribeChanges()
 {
-    NS_ASSERTION(PR_FALSE,"override this.");
+    NS_ASSERTION(false,"override this.");
     return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 nsSubscribableServer::SetSearchValue(const nsAString &aSearchValue)
 {
     return NS_ERROR_NOT_IMPLEMENTED;
 }
--- a/mailnews/base/src/nsSubscribeDataSource.cpp
+++ b/mailnews/base/src/nsSubscribeDataSource.cpp
@@ -457,54 +457,54 @@ nsSubscribeDataSource::HasAssertion(nsIR
 	NS_PRECONDITION(target != nsnull, "null ptr");
 	if (! target)
 		return NS_ERROR_NULL_POINTER;
 
 	NS_PRECONDITION(hasAssertion != nsnull, "null ptr");
 	if (! hasAssertion)
 		return NS_ERROR_NULL_POINTER;
 
-	*hasAssertion = PR_FALSE;
+	*hasAssertion = false;
 
   // we only have positive assertions in the subscribe data source.
 	if (!tv) return NS_OK;
 
 	if (property == kNC_Child.get()) {
     nsCOMPtr<nsISubscribableServer> server;
     nsCString relativePath;
 
     rv = GetServerAndRelativePathFromResource(source, getter_AddRefs(server), getter_Copies(relativePath));
     if (NS_FAILED(rv) || !server) {
-        *hasAssertion = PR_FALSE;
+        *hasAssertion = false;
         return NS_OK;
     }
 
         // not everything has children
         rv = server->HasChildren(relativePath, hasAssertion);
         NS_ENSURE_SUCCESS(rv,rv);
     }
     else if (property == kNC_Name.get()) {
         // everything has a name
-        *hasAssertion = PR_TRUE;
+        *hasAssertion = true;
     }
     else if (property == kNC_LeafName.get()) {
         // everything has a leaf name
-        *hasAssertion = PR_TRUE;
+        *hasAssertion = true;
     }
     else if (property == kNC_Subscribed.get()) {
         // everything is subscribed or not
-        *hasAssertion = PR_TRUE;
+        *hasAssertion = true;
     }
     else if (property == kNC_Subscribable.get()) {
         // everything is subscribable or not
-        *hasAssertion = PR_TRUE;
+        *hasAssertion = true;
     }
     else if (property == kNC_ServerType.get()) {
         // everything has a server type
-        *hasAssertion = PR_TRUE;
+        *hasAssertion = true;
     }
     else {
         // do nothing
     }
 
 	return NS_OK;
 }
 
@@ -521,36 +521,36 @@ nsSubscribeDataSource::HasArcOut(nsIRDFR
     nsresult rv = NS_OK;
 
     nsCOMPtr<nsISubscribableServer> server;
     nsCString relativePath;
 
     if (aArc == kNC_Child.get()) {
     rv = GetServerAndRelativePathFromResource(source, getter_AddRefs(server), getter_Copies(relativePath));
     if (NS_FAILED(rv) || !server) {
-	    *result = PR_FALSE;
+	    *result = false;
         return NS_OK;
     }
 
         bool hasChildren = false;
         rv = server->HasChildren(relativePath, &hasChildren);
         NS_ENSURE_SUCCESS(rv,rv);
         *result = hasChildren;
         return NS_OK;
     }
     else if ((aArc == kNC_Subscribed.get()) ||
              (aArc == kNC_Subscribable.get()) ||
              (aArc == kNC_LeafName.get()) ||
              (aArc == kNC_ServerType.get()) ||
              (aArc == kNC_Name.get())) {
-        *result = PR_TRUE;
+        *result = true;
         return NS_OK;
     }
 
-    *result = PR_FALSE;
+    *result = false;
     return NS_OK;
 }
 
 
 NS_IMETHODIMP
 nsSubscribeDataSource::ArcLabelsIn(nsIRDFNode *node,
                             nsISimpleEnumerator ** labels /* out */)
 {
@@ -646,17 +646,17 @@ nsSubscribeDataSource::RemoveObserver(ns
 NS_IMETHODIMP
 nsSubscribeDataSource::GetHasObservers(bool *hasObservers)
 {
     nsresult rv = NS_OK;
     NS_ASSERTION(hasObservers, "null ptr");
     if (!hasObservers) return NS_ERROR_NULL_POINTER;
     
     if (!mObservers) {
-        *hasObservers = PR_FALSE;
+        *hasObservers = false;
         return NS_OK;
     }
     
     PRUint32 count = 0;
     rv = mObservers->Count(&count);
     NS_ENSURE_SUCCESS(rv,rv);
 
     *hasObservers = (count > 0);
@@ -705,17 +705,17 @@ nsSubscribeDataSource::EndUpdateBatch()
         return NS_OK;
 }
 
 
 
 NS_IMETHODIMP 
 nsSubscribeDataSource::GetSources(nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue, nsISimpleEnumerator **_retval)
 {
-  NS_ASSERTION(PR_FALSE, "Not implemented");
+  NS_ASSERTION(false, "Not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 nsSubscribeDataSource::NotifyObservers(nsIRDFResource *subject,
                                                 nsIRDFResource *property,
                                                 nsIRDFNode *object,
                                                 bool assert, bool change)
@@ -741,36 +741,36 @@ nsSubscribeDataSource::changeEnumFunc(ns
 {
   nsSubscribeNotification* note = (nsSubscribeNotification*)aData;
   nsIRDFObserver* observer = (nsIRDFObserver *)aElement;
 
   observer->OnChange(note->datasource,
                      note->subject,
                      note->property,
                      nsnull, note->object);
-  return PR_TRUE;
+  return true;
 }
 
 bool
 nsSubscribeDataSource::assertEnumFunc(nsISupports *aElement, void *aData)
 {
   nsSubscribeNotification* note = (nsSubscribeNotification*)aData;
   nsIRDFObserver* observer = (nsIRDFObserver *)aElement;
 
   observer->OnAssert(note->datasource,
                      note->subject,
                      note->property,
                      note->object);
-  return PR_TRUE;
+  return true;
 }
 
 bool
 nsSubscribeDataSource::unassertEnumFunc(nsISupports *aElement, void *aData)
 {
   nsSubscribeNotification* note = (nsSubscribeNotification*)aData;
   nsIRDFObserver* observer = (nsIRDFObserver *)aElement;
 
   observer->OnUnassert(note->datasource,
                        note->subject,
                        note->property,
                        note->object);
-  return PR_TRUE;
+  return true;
 }
--- a/mailnews/base/test/TestMailCookie.cpp
+++ b/mailnews/base/test/TestMailCookie.cpp
@@ -100,19 +100,19 @@ SetACookieNoHttp(nsICookieService *aCook
     if (NS_FAILED(rv)) {
         sBuffer = PR_sprintf_append(sBuffer, "nothing\n");
     } else {
         sBuffer = PR_sprintf_append(sBuffer, "\"%s\"\n", aCookieString);
     }
     return rv;
 }
 
-// returns PR_TRUE if cookie(s) for the given host were found; else PR_FALSE.
+// returns true if cookie(s) for the given host were found; else false.
 // the cookie string is returned via aCookie.
-PRBool
+bool
 GetACookie(nsICookieService *aCookieService, const char *aSpec1, const char *aSpec2, char **aCookie)
 {
     nsCOMPtr<nsIURI> uri1, uri2;
     NS_NewURI(getter_AddRefs(uri1), aSpec1);
     if (aSpec2)
         NS_NewURI(getter_AddRefs(uri2), aSpec2);
 
     sBuffer = PR_sprintf_append(sBuffer, "             \"%s\": GOT ", aSpec1);
@@ -123,19 +123,19 @@ GetACookie(nsICookieService *aCookieServ
     if (!*aCookie) {
         sBuffer = PR_sprintf_append(sBuffer, "nothing\n");
     } else {
         sBuffer = PR_sprintf_append(sBuffer, "\"%s\"\n", *aCookie);
     }
     return *aCookie != nsnull;
 }
 
-// returns PR_TRUE if cookie(s) for the given host were found; else PR_FALSE.
+// returns true if cookie(s) for the given host were found; else false.
 // the cookie string is returned via aCookie.
-PRBool
+bool
 GetACookieNoHttp(nsICookieService *aCookieService, const char *aSpec, char **aCookie)
 {
     nsCOMPtr<nsIURI> uri;
     NS_NewURI(getter_AddRefs(uri), aSpec);
 
     sBuffer = PR_sprintf_append(sBuffer, "             \"%s\": GOT ", aSpec);
     nsresult rv = aCookieService->GetCookieString(uri, nsnull, aCookie);
     if (NS_FAILED(rv)) {
@@ -153,18 +153,18 @@ GetACookieNoHttp(nsICookieService *aCook
 #define MUST_BE_NULL     0
 #define MUST_EQUAL       1
 #define MUST_CONTAIN     2
 #define MUST_NOT_CONTAIN 3
 #define MUST_NOT_EQUAL   4
 
 // a simple helper function to improve readability:
 // takes one of the #defined rules above, and performs the appropriate test.
-// PR_TRUE means the test passed; PR_FALSE means the test failed.
-static inline PRBool
+// true means the test passed; false means the test failed.
+static inline bool
 CheckResult(const char *aLhs, PRUint32 aRule, const char *aRhs = nsnull)
 {
     switch (aRule) {
         case MUST_BE_NULL:
             return !aLhs || !*aLhs;
 
         case MUST_EQUAL:
             return !PL_strcmp(aLhs, aRhs);
@@ -174,31 +174,31 @@ CheckResult(const char *aLhs, PRUint32 a
 
         case MUST_CONTAIN:
             return PL_strstr(aLhs, aRhs) != nsnull;
 
         case MUST_NOT_CONTAIN:
             return PL_strstr(aLhs, aRhs) == nsnull;
 
         default:
-            return PR_FALSE; // failure
+            return false; // failure
     }
 }
 
 // helper function that ensures the first aSize elements of aResult are
-// PR_TRUE (i.e. all tests succeeded). prints the result of the tests (if any
+// true (i.e. all tests succeeded). prints the result of the tests (if any
 // tests failed, it prints the zero-based index of each failed test).
-PRBool
-PrintResult(const PRBool aResult[], PRUint32 aSize)
+bool
+PrintResult(const bool aResult[], PRUint32 aSize)
 {
-    PRBool failed = PR_FALSE;
+    bool failed = false;
     sBuffer = PR_sprintf_append(sBuffer, "*** tests ");
     for (PRUint32 i = 0; i < aSize; ++i) {
         if (!aResult[i]) {
-            failed = PR_TRUE;
+            failed = true;
             sBuffer = PR_sprintf_append(sBuffer, "%d ", i);
         }
     }
     if (failed) {
         sBuffer = PR_sprintf_append(sBuffer, "FAILED!\a\n");
     } else {
         sBuffer = PR_sprintf_append(sBuffer, "passed.\n");
     }
@@ -207,20 +207,20 @@ PrintResult(const PRBool aResult[], PRUi
 
 void
 InitPrefs(nsIPrefBranch *aPrefBranch)
 {
     // init some relevant prefs, so the tests don't go awry.
     // we use the most restrictive set of prefs we can;
     // however, we don't test third party blocking here.
     aPrefBranch->SetIntPref(kCookiesPermissions, 0); // accept all
-    aPrefBranch->SetBoolPref(kCookiesLifetimeEnabled, PR_TRUE);
+    aPrefBranch->SetBoolPref(kCookiesLifetimeEnabled, true);
     aPrefBranch->SetIntPref(kCookiesLifetimeCurrentSession, 0);
     aPrefBranch->SetIntPref(kCookiesLifetimeDays, 1);
-    aPrefBranch->SetBoolPref(kCookiesAskPermission, PR_FALSE);
+    aPrefBranch->SetBoolPref(kCookiesAskPermission, false);
     // Set the base domain limit to 50 so we have a known value.
     aPrefBranch->SetIntPref(kCookiesMaxPerHost, 50);
 }
 
 class ScopedXPCOM
 {
 public:
   ScopedXPCOM() : rv(NS_InitXPCOM2(nsnull, nsnull, nsnull)) { }
@@ -234,17 +234,17 @@ public:
 };
 
 int
 main(PRInt32 argc, char *argv[])
 {
     if (test_common_init(&argc, &argv) != 0)
         return -1;
 
-    PRBool allTestsPassed = PR_TRUE;
+    bool allTestsPassed = true;
 
     ScopedXPCOM xpcom;
     if (NS_FAILED(xpcom.rv))
       return -1;
 
     {
       nsresult rv0;
 
@@ -253,17 +253,17 @@ main(PRInt32 argc, char *argv[])
       if (NS_FAILED(rv0)) return -1;
 
       nsCOMPtr<nsIPrefBranch> prefBranch =
         do_GetService(kPrefServiceCID, &rv0);
       if (NS_FAILED(rv0)) return -1;
 
       InitPrefs(prefBranch);
 
-      PRBool rv[20];
+      bool rv[20];
       nsCString cookie;
 
       /* The basic idea behind these tests is the following:
        *
        * we set() some cookie, then try to get() it in various ways. we have
        * several possible tests we perform on the cookie string returned from
        * get():
        *
--- a/mailnews/base/test/TestMsgStripRE.cpp
+++ b/mailnews/base/test/TestMsgStripRE.cpp
@@ -107,26 +107,26 @@ int main(int argc, char** argv)
   // set localizedRe pref
   rv = prefBranch->SetComplexValue("mailnews.localizedRe", 
                                    NS_GET_IID(nsISupportsString), rePrefixes);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // run our tests 
   struct testInfo testInfoStructs[] = {
     {"SV: =?ISO-8859-1?Q?=C6blegr=F8d?=", "=?ISO-8859-1?Q?=C6blegr=F8d?=",
-     PR_TRUE},
+     true},
     {"=?ISO-8859-1?Q?SV=3A=C6blegr=F8d?=", "=?ISO-8859-1?Q?=C6blegr=F8d?=",
-     PR_TRUE},
+     true},
 
      // Note that in the next two tests, the only ISO-8859-1 chars are in the
      // localizedRe piece, so once they've been stripped, the re-encoding process 
      // simply writes out ASCII rather than an ISO-8859-1 encoded string with
      // no actual ISO-8859-1 special characters, which seems reasonable.
-    {"=?ISO-8859-1?Q?=C6=D8=C5=3A_Foo_bar?=", "Foo bar", PR_TRUE},
-    {"=?ISO-8859-1?Q?=C6=D8=C5=3AFoo_bar?=", "Foo bar", PR_TRUE}
+    {"=?ISO-8859-1?Q?=C6=D8=C5=3A_Foo_bar?=", "Foo bar", true},
+    {"=?ISO-8859-1?Q?=C6=D8=C5=3AFoo_bar?=", "Foo bar", true}
   };
 
   bool allTestsPassed = true;
   int result;
   for (unsigned int i = 0; i < NS_ARRAY_LENGTH(testInfoStructs); i++) {
     result = testStripRe(testInfoStructs[i].encodedInput,
                          testInfoStructs[i].expectedOutput,
                          testInfoStructs[i].expectedDidModify);
--- a/mailnews/base/util/nsImapMoveCoalescer.cpp
+++ b/mailnews/base/util/nsImapMoveCoalescer.cpp
@@ -52,26 +52,26 @@
 #include "nsComponentManagerUtils.h"
 
 NS_IMPL_ISUPPORTS1(nsImapMoveCoalescer, nsIUrlListener)
 
 nsImapMoveCoalescer::nsImapMoveCoalescer(nsIMsgFolder *sourceFolder, nsIMsgWindow *msgWindow)
 {
   m_sourceFolder = sourceFolder; 
   m_msgWindow = msgWindow;
-  m_hasPendingMoves = PR_FALSE;
+  m_hasPendingMoves = false;
 }
 
 nsImapMoveCoalescer::~nsImapMoveCoalescer()
 {
 }
 
 nsresult nsImapMoveCoalescer::AddMove(nsIMsgFolder *folder, nsMsgKey key)
 {
-  m_hasPendingMoves = PR_TRUE;
+  m_hasPendingMoves = true;
   PRInt32 folderIndex = m_destFolders.IndexOf(folder);
   nsTArray<nsMsgKey> *keysToAdd = nsnull;
 
   if (folderIndex >= 0)
     keysToAdd = &(m_sourceKeyArrays[folderIndex]);
   else
   {
     m_destFolders.AppendObject(folder);
@@ -89,17 +89,17 @@ nsresult nsImapMoveCoalescer::AddMove(ns
 nsresult nsImapMoveCoalescer::PlaybackMoves(bool doNewMailNotification /* = false */)
 {
   PRInt32 numFolders = m_destFolders.Count();
   // Nothing to do, so don't change the member variables.
   if (numFolders == 0)
     return NS_OK;
 
   nsresult rv = NS_OK;
-  m_hasPendingMoves = PR_FALSE;
+  m_hasPendingMoves = false;
   m_doNewMailNotification = doNewMailNotification;
   m_outstandingMoves = 0;
 
   for (PRInt32 i = 0; i < numFolders; ++i)
   {
     // XXX TODO
     // JUNK MAIL RELATED
     // is this the right place to make sure dest folder exists
@@ -113,34 +113,34 @@ nsresult nsImapMoveCoalescer::PlaybackMo
 
     nsCOMPtr<nsIMutableArray> messages(do_CreateInstance(NS_ARRAY_CONTRACTID));
     for (PRUint32 keyIndex = 0; keyIndex < keysToAdd.Length(); keyIndex++)
     {
       nsCOMPtr<nsIMsgDBHdr> mailHdr = nsnull;
       rv = m_sourceFolder->GetMessageHeader(keysToAdd.ElementAt(keyIndex), getter_AddRefs(mailHdr));
       if (NS_SUCCEEDED(rv) && mailHdr)
       {
-        messages->AppendElement(mailHdr, PR_FALSE);
+        messages->AppendElement(mailHdr, false);
         bool isRead = false;
         mailHdr->GetIsRead(&isRead);
         if (!isRead)
           numNewMessages++;
       }
     }
     PRUint32 destFlags;
     destFolder->GetFlags(&destFlags);
     if (! (destFlags & nsMsgFolderFlags::Junk)) // don't set has new on junk folder
     {
       destFolder->SetNumNewMessages(numNewMessages);
       if (numNewMessages > 0)
-        destFolder->SetHasNewMessages(PR_TRUE);
+        destFolder->SetHasNewMessages(true);
     }
     // adjust the new message count on the source folder
     PRInt32 oldNewMessageCount = 0;
-    m_sourceFolder->GetNumNewMessages(PR_FALSE, &oldNewMessageCount);
+    m_sourceFolder->GetNumNewMessages(false, &oldNewMessageCount);
     if (oldNewMessageCount >= numKeysToAdd)
       oldNewMessageCount -= numKeysToAdd;
     else
       oldNewMessageCount = 0;
 
     m_sourceFolder->SetNumNewMessages(oldNewMessageCount);
 
     nsCOMPtr <nsISupports> sourceSupports = do_QueryInterface(m_sourceFolder, &rv);
@@ -152,18 +152,18 @@ nsresult nsImapMoveCoalescer::PlaybackMo
     {
       nsCOMPtr <nsIMsgCopyServiceListener> listener;
       if (m_doNewMailNotification)
       {
         nsMoveCoalescerCopyListener *copyListener = new nsMoveCoalescerCopyListener(this, destFolder);
         if (copyListener)
           listener = do_QueryInterface(copyListener);
       }
-      rv = copySvc->CopyMessages(m_sourceFolder, messages, destFolder, PR_TRUE,
-                                 listener, m_msgWindow, PR_FALSE /*allowUndo*/);
+      rv = copySvc->CopyMessages(m_sourceFolder, messages, destFolder, true,
+                                 listener, m_msgWindow, false /*allowUndo*/);
       if (NS_SUCCEEDED(rv))
         m_outstandingMoves++;
     }
   }
   return rv;
 }
 
 NS_IMETHODIMP
--- a/mailnews/base/util/nsMsgCompressIStream.cpp
+++ b/mailnews/base/util/nsMsgCompressIStream.cpp
@@ -3,17 +3,17 @@
 #include "prmem.h"
 #include "nsAlgorithm.h"
 
 #define BUFFER_SIZE 16384
 
 nsMsgCompressIStream::nsMsgCompressIStream() :
   m_dataptr(nsnull),
   m_dataleft(0),
-  m_inflateAgain(PR_FALSE)
+  m_inflateAgain(false)
 {
 }
 
 nsMsgCompressIStream::~nsMsgCompressIStream()
 {
   Close();
 }
 
@@ -70,17 +70,17 @@ nsresult nsMsgCompressIStream::DoInflati
   // otherwise it's an error
   if (zr != Z_OK) 
     return NS_ERROR_FAILURE;
 
   // http://www.zlib.net/manual.html says:
   // If inflate returns Z_OK and with zero avail_out, it must be called 
   // again after making room in the output buffer because there might be
   // more output pending. 
-  m_inflateAgain = m_zstream.avail_out ? PR_FALSE : PR_TRUE;
+  m_inflateAgain = m_zstream.avail_out ? false : true;
 
   // set the pointer to the start of the buffer, and the count to how
   // based on how many bytes are left unconsumed.
   m_dataptr = m_databuf;
   m_dataleft = BUFFER_SIZE - m_zstream.avail_out;
 
   return NS_OK;
 }
@@ -212,12 +212,12 @@ NS_IMETHODIMP nsMsgCompressIStream::Asyn
     return asyncInputStream->AsyncWait(callback, flags, amount, target);
 
   return NS_OK;
 }
 
 /* boolean isNonBlocking (); */
 NS_IMETHODIMP nsMsgCompressIStream::IsNonBlocking(bool *aNonBlocking)
 {
-  *aNonBlocking = PR_FALSE;
+  *aNonBlocking = false;
   return NS_OK;
 }
 
--- a/mailnews/base/util/nsMsgCompressOStream.cpp
+++ b/mailnews/base/util/nsMsgCompressOStream.cpp
@@ -130,12 +130,12 @@ NS_IMETHODIMP
 nsMsgCompressOStream::WriteSegments(nsReadSegmentFun reader, void * closure, PRUint32 count, PRUint32 *_retval)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 /* boolean isNonBlocking (); */
 NS_IMETHODIMP nsMsgCompressOStream::IsNonBlocking(bool *aNonBlocking)
 {
-  *aNonBlocking = PR_FALSE;
+  *aNonBlocking = false;
   return NS_OK;
 }
 
--- a/mailnews/base/util/nsMsgDBFolder.cpp
+++ b/mailnews/base/util/nsMsgDBFolder.cpp
@@ -152,36 +152,36 @@ NS_IMPL_ISUPPORTS_INHERITED6(nsMsgDBFold
 const nsStaticAtom nsMsgDBFolder::folder_atoms[] = {
 #define MSGDBFOLDER_ATOM(name_, value_) NS_STATIC_ATOM(name_##_buffer, &nsMsgDBFolder::name_),
 #include "nsMsgDBFolderAtomList.h"
 #undef MSGDBFOLDER_ATOM
 };
 #endif
 
 nsMsgDBFolder::nsMsgDBFolder(void)
-: mAddListener(PR_TRUE),
-  mNewMessages(PR_FALSE),
-  mGettingNewMessages(PR_FALSE),
+: mAddListener(true),
+  mNewMessages(false),
+  mGettingNewMessages(false),
   mLastMessageLoaded(nsMsgKey_None),
   mFlags(0),
   mNumUnreadMessages(-1),
   mNumTotalMessages(-1),
-  mNotifyCountChanges(PR_TRUE),
+  mNotifyCountChanges(true),
   mExpungedBytes(0),
-  mInitializedFromCache(PR_FALSE),
+  mInitializedFromCache(false),
   mSemaphoreHolder(nsnull),
   mNumPendingUnreadMessages(0),
   mNumPendingTotalMessages(0),
   mFolderSize(0),
   mNumNewBiffMessages(0),
-  mIsCachable(PR_TRUE),
-  mHaveParsedURI(PR_FALSE),
-  mIsServerIsValid(PR_FALSE),
-  mIsServer(PR_FALSE),
-  mInVFEditSearchScope (PR_FALSE)
+  mIsCachable(true),
+  mHaveParsedURI(false),
+  mIsServerIsValid(false),
+  mIsServer(false),
+  mInVFEditSearchScope (false)
 {
   if (mInstanceCount++ <=0) {
 #ifdef MOZILLA_INTERNAL_API //FIXME NS_RegisterStaticAtoms
     NS_RegisterStaticAtoms(folder_atoms, NS_ARRAY_LENGTH(folder_atoms));
 #else
 #define MSGDBFOLDER_ATOM(name_, value_) name_ = MsgNewPermanentAtom(value_);
 #include "nsMsgDBFolderAtomList.h"
 #undef MSGDBFOLDER_ATOM
@@ -220,17 +220,17 @@ nsMsgDBFolder::~nsMsgDBFolder(void)
     NS_Free(kLocalizedJunkName);
     NS_Free(kLocalizedArchivesName);
     NS_Free(kLocalizedBrandShortName);
 #ifdef MSG_FASTER_URI_PARSING
     mParsingURL = nsnull;
 #endif
   }
   //shutdown but don't shutdown children.
-  Shutdown(PR_FALSE);
+  Shutdown(false);
 }
 
 NS_IMETHODIMP nsMsgDBFolder::Shutdown(bool shutdownChildren)
 {
   if(mDatabase)
   {
     mDatabase->RemoveListener(this);
     mDatabase->ForceClosed();
@@ -242,22 +242,22 @@ NS_IMETHODIMP nsMsgDBFolder::Shutdown(bo
     }
   }
 
   if(shutdownChildren)
   {
     PRInt32 count = mSubFolders.Count();
 
     for (PRInt32 i = 0; i < count; i++)
-      mSubFolders[i]->Shutdown(PR_TRUE);
+      mSubFolders[i]->Shutdown(true);
 
     // Reset incoming server pointer and pathname.
     mServer = nsnull;
     mPath = nsnull;
-    mHaveParsedURI = PR_FALSE;
+    mHaveParsedURI = false;
     mName.Truncate();
     mSubFolders.Clear();
   }
   return NS_OK;
 }
 
 
 NS_IMETHODIMP nsMsgDBFolder::ForceDBClosed()
@@ -305,17 +305,17 @@ NS_IMETHODIMP nsMsgDBFolder::CloseAndBac
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (mBackupDatabase)
   {
     mBackupDatabase->ForceClosed();
     mBackupDatabase = nsnull;
   }
 
-  backupDBFile->Remove(PR_FALSE);
+  backupDBFile->Remove(false);
   bool backupExists;
   backupDBFile->Exists(&backupExists);
   NS_ASSERTION(!backupExists, "Couldn't delete database backup");
   if (backupExists)
     return NS_ERROR_FAILURE;
 
   if (!newName.IsEmpty())
   {
@@ -351,17 +351,17 @@ NS_IMETHODIMP nsMsgDBFolder::OpenBackupM
   NS_ENSURE_SUCCESS(rv, rv);
   rv = backupDBDummyFolder->Append(folderName);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIMsgDBService> msgDBService =
       do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   rv = msgDBService->OpenMailDBFromFile(
-      backupDBDummyFolder, this, PR_FALSE, PR_TRUE,
+      backupDBDummyFolder, this, false, true,
       getter_AddRefs(mBackupDatabase));
   // we add a listener so that we can close the db during OnAnnouncerGoingAway. There should
   // not be any other calls to the listener with the backup database
   if (NS_SUCCEEDED(rv) && mBackupDatabase)
     mBackupDatabase->AddListener(this);
 
   if (rv == NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE)
     // this is normal in reparsing
@@ -396,33 +396,33 @@ NS_IMETHODIMP nsMsgDBFolder::RemoveBacku
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (mBackupDatabase)
   {
     mBackupDatabase->ForceClosed();
     mBackupDatabase = nsnull;
   }
 
-  return backupDBFile->Remove(PR_FALSE);
+  return backupDBFile->Remove(false);
 }  
 
 NS_IMETHODIMP nsMsgDBFolder::StartFolderLoading(void)
 {
   if(mDatabase)
     mDatabase->RemoveListener(this);
-  mAddListener = PR_FALSE;
+  mAddListener = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::EndFolderLoading(void)
 {
   if(mDatabase)
     mDatabase->AddListener(this);
-  mAddListener = PR_TRUE;
-  UpdateSummaryTotals(PR_TRUE);
+  mAddListener = true;
+  UpdateSummaryTotals(true);
 
   //GGGG       check for new mail here and call SetNewMessages...?? -- ONE OF THE 2 PLACES
   if(mDatabase)
     m_newMsgs.Clear();
 
   return NS_OK;
 }
 
@@ -439,17 +439,17 @@ nsMsgDBFolder::GetExpungedBytes(PRUint32
     if (NS_FAILED(rv)) return rv;
     rv = folderInfo->GetExpungedBytes((PRInt32 *) count);
     if (NS_SUCCEEDED(rv))
       mExpungedBytes = *count; // sync up with the database
     return rv;
   }
   else
   {
-    ReadDBFolderInfo(PR_FALSE);
+    ReadDBFolderInfo(false);
     *count = mExpungedBytes;
   }
   return NS_OK;
 }
 
 
 NS_IMETHODIMP nsMsgDBFolder::GetCharset(nsACString& aCharset)
 {
@@ -575,17 +575,17 @@ NS_IMETHODIMP nsMsgDBFolder::ClearNewMes
     PRUint32 *newMessageKeys;
     rv = mDatabase->GetNewList(&numNewKeys, &newMessageKeys);
     if (NS_SUCCEEDED(rv) && newMessageKeys)
     {
       m_saveNewMsgs.Clear();
       m_saveNewMsgs.AppendElements(newMessageKeys, numNewKeys);
       NS_Free(newMessageKeys);
     }
-    mDatabase->ClearNewList(PR_TRUE);
+    mDatabase->ClearNewList(true);
   }
   if (!dbWasCached)
     SetMsgDatabase(nsnull);
 
   m_newMsgs.Clear();
   mNumNewBiffMessages = 0;
   return rv;
 }
@@ -600,17 +600,17 @@ void nsMsgDBFolder::UpdateNewMessages()
       bool containsKey = false;
       mDatabase->ContainsKey(m_newMsgs[keyIndex], &containsKey);
       if (!containsKey)
         continue;
       bool isRead = false;
       nsresult rv2 = mDatabase->IsRead(m_newMsgs[keyIndex], &isRead);
       if (NS_SUCCEEDED(rv2) && !isRead)
       {
-        hasNewMessages = PR_TRUE;
+        hasNewMessages = true;
         mDatabase->AddToNewList(m_newMsgs[keyIndex]);
       }
     }
     SetHasNewMessages(hasNewMessages);
   }
 }
 
 // helper function that gets the cache element that corresponds to the passed in file spec.
@@ -630,17 +630,17 @@ nsresult nsMsgDBFolder::GetFolderCacheEl
     do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &result);
   if(NS_SUCCEEDED(result))
   {
     result = accountMgr->GetFolderCache(getter_AddRefs(folderCache));
     if (NS_SUCCEEDED(result) && folderCache)
     {
       nsCString persistentPath;
       file->GetPersistentDescriptor(persistentPath);
-      result = folderCache->GetCacheElement(persistentPath, PR_FALSE, cacheElement);
+      result = folderCache->GetCacheElement(persistentPath, false, cacheElement);
     }
   }
   return result;
 }
 
 nsresult nsMsgDBFolder::ReadDBFolderInfo(bool force)
 {
   // Since it turns out to be pretty expensive to open and close
@@ -648,45 +648,45 @@ nsresult nsMsgDBFolder::ReadDBFolderInfo
   // we might need while we're here
   nsresult result = NS_OK;
 
   // don't need to reload from cache if we've already read from cache,
   // and, we might get stale info, so don't do it.
   if (!mInitializedFromCache)
   {
     nsCOMPtr <nsILocalFile> dbPath;
-    result = GetFolderCacheKey(getter_AddRefs(dbPath), PR_TRUE /* createDBIfMissing */);
+    result = GetFolderCacheKey(getter_AddRefs(dbPath), true /* createDBIfMissing */);
     if (dbPath)
     {
       nsCOMPtr <nsIMsgFolderCacheElement> cacheElement;
       result = GetFolderCacheElemFromFile(dbPath, getter_AddRefs(cacheElement));
       if (NS_SUCCEEDED(result) && cacheElement)
         result = ReadFromFolderCacheElem(cacheElement);
     }
   }
 
   if (force || !mInitializedFromCache)
   {
     nsCOMPtr<nsIDBFolderInfo> folderInfo;
     nsCOMPtr<nsIMsgDatabase> db;
     result = GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), getter_AddRefs(db));
     if(NS_SUCCEEDED(result))
     {
-      mIsCachable = PR_TRUE;
+      mIsCachable = true;
       if (folderInfo)
       {
         if (!mInitializedFromCache)
         {
           folderInfo->GetFlags((PRInt32 *)&mFlags);
 #ifdef DEBUG_bienvenu1
           nsString name;
           GetName(name);
           NS_ASSERTION(Compare(name, kLocalizedTrashName) || (mFlags & nsMsgFolderFlags::Trash), "lost trash flag");
 #endif
-          mInitializedFromCache = PR_TRUE;
+          mInitializedFromCache = true;
         }
 
         folderInfo->GetNumMessages(&mNumTotalMessages);
         folderInfo->GetNumUnreadMessages(&mNumUnreadMessages);
         folderInfo->GetExpungedBytes((PRInt32 *)&mExpungedBytes);
 
         nsCString utf8Name;
         folderInfo->GetFolderName(utf8Name);
@@ -709,20 +709,20 @@ nsresult nsMsgDBFolder::ReadDBFolderInfo
             ClearFlag(nsMsgFolderFlags::GotNew);
         }
       }
     }
     else {
       // we tried to open DB but failed - don't keep trying.
       // If a DB is created, we will call this method with force == TRUE,
       // and read from the db that way.
-      mInitializedFromCache = PR_TRUE;
+      mInitializedFromCache = true;
     }
     if (db)
-      db->Close(PR_FALSE);
+      db->Close(false);
   }
   return result;
 }
 
 nsresult nsMsgDBFolder::SendFlagNotifications(nsIMsgDBHdr *item, PRUint32 oldFlags, PRUint32 newFlags)
 {
   nsresult rv = NS_OK;
   PRUint32 changedFlags = oldFlags ^ newFlags;
@@ -737,23 +737,23 @@ nsresult nsMsgDBFolder::SendFlagNotifica
     rv = NotifyPropertyFlagChanged(item, kStatusAtom, oldFlags, newFlags);
   else if((changedFlags & nsMsgMessageFlags::Marked))
     rv = NotifyPropertyFlagChanged(item, kFlaggedAtom, oldFlags, newFlags);
   return rv;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::DownloadMessagesForOffline(nsIArray *messages, nsIMsgWindow *)
 {
-  NS_ASSERTION(PR_FALSE, "imap and news need to override this");
+  NS_ASSERTION(false, "imap and news need to override this");
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::DownloadAllForOffline(nsIUrlListener *listener, nsIMsgWindow *msgWindow)
 {
-  NS_ASSERTION(PR_FALSE, "imap and news need to override this");
+  NS_ASSERTION(false, "imap and news need to override this");
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::GetMsgStore(nsIMsgPluggableStore **aStore)
 {
   NS_ENSURE_ARG_POINTER(aStore);
   nsCOMPtr<nsIMsgIncomingServer> server;
   nsresult rv = GetServer(getter_AddRefs(server));
@@ -789,19 +789,19 @@ bool nsMsgDBFolder::VerifyOfflineMessage
     PRUint32 bytesRead = 0;
     PRUint32 bytesToRead = sizeof(startOfMsg) - 1;
     if (NS_SUCCEEDED(rv))
       rv = fileStream->Read(startOfMsg, bytesToRead, &bytesRead);
     startOfMsg[bytesRead] = '\0';
     // check if message starts with From, or is a draft and starts with FCC
     if (NS_FAILED(rv) || bytesRead != bytesToRead ||
       (strncmp(startOfMsg, "From ", 5) && (! (mFlags & nsMsgFolderFlags::Drafts) || strncmp(startOfMsg, "FCC", 3))))
-      return PR_FALSE;
+      return false;
   }
-  return PR_TRUE;
+  return true;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::GetOfflineFileStream(nsMsgKey msgKey, PRInt64 *offset, PRUint32 *size, nsIInputStream **aFileStream)
 {
   NS_ENSURE_ARG(aFileStream);
 
   *offset = *size = 0;
 
@@ -864,17 +864,17 @@ NS_IMETHODIMP nsMsgDBFolder::GetOfflineF
             *size -= msgOffset;
           }
           else
           {
             rv = NS_ERROR_FAILURE;
           }
         }
     if (NS_FAILED(rv) && mDatabase)
-      mDatabase->MarkOffline(msgKey, PR_FALSE, nsnull);
+      mDatabase->MarkOffline(msgKey, false, nsnull);
   }
   return rv;
 }
 
 NS_IMETHODIMP
 nsMsgDBFolder::GetOfflineStoreOutputStream(nsIMsgDBHdr *aHdr,
                                            nsIOutputStream **aOutputStream)
       {
@@ -1039,37 +1039,37 @@ nsMsgDBFolder::OnHdrPropertyChanged(nsIM
 
 // 1.  When the status of a message changes.
 NS_IMETHODIMP nsMsgDBFolder::OnHdrFlagsChanged(nsIMsgDBHdr *aHdrChanged, PRUint32 aOldFlags, PRUint32 aNewFlags,
                                          nsIDBChangeListener * aInstigator)
 {
   if(aHdrChanged)
   {
     SendFlagNotifications(aHdrChanged, aOldFlags, aNewFlags);
-    UpdateSummaryTotals(PR_TRUE);
+    UpdateSummaryTotals(true);
   }
 
   // The old state was new message state
   // We check and see if this state has changed
   if(aOldFlags & nsMsgMessageFlags::New)
   {
     // state changing from new to something else
     if (!(aNewFlags  & nsMsgMessageFlags::New))
-      CheckWithNewMessagesStatus(PR_FALSE);
+      CheckWithNewMessagesStatus(false);
   }
 
   return NS_OK;
 }
 
 nsresult nsMsgDBFolder::CheckWithNewMessagesStatus(bool messageAdded)
 {
   nsresult rv;
   bool hasNewMessages;
   if (messageAdded)
-    SetHasNewMessages(PR_TRUE);
+    SetHasNewMessages(true);
   else // message modified or deleted
   {
     if(mDatabase)
     {
       rv = mDatabase->HasNew(&hasNewMessages);
       SetHasNewMessages(hasNewMessages);
     }
   }
@@ -1080,58 +1080,58 @@ nsresult nsMsgDBFolder::CheckWithNewMess
 // 3.  When a message gets deleted, we need to see if it was new
 //     When we lose a new message we need to check if there are still new messages
 NS_IMETHODIMP nsMsgDBFolder::OnHdrDeleted(nsIMsgDBHdr *aHdrChanged, nsMsgKey  aParentKey, PRInt32 aFlags,
                           nsIDBChangeListener * aInstigator)
 {
   // check to see if a new message is being deleted
   // as in this case, if there is only one new message and it's being deleted
   // the folder newness has to be cleared.
-  CheckWithNewMessagesStatus(PR_FALSE);
+  CheckWithNewMessagesStatus(false);
   // Remove all processing flags.  This is generally a good thing although
   // undo-ing a message back into position will not re-gain the flags.
   nsMsgKey msgKey;
   aHdrChanged->GetMessageKey(&msgKey);
   AndProcessingFlags(msgKey, 0);
-  return OnHdrAddedOrDeleted(aHdrChanged, PR_FALSE);
+  return OnHdrAddedOrDeleted(aHdrChanged, false);
 }
 
 // 2.  When a new messages gets added, we need to see if it's new.
 NS_IMETHODIMP nsMsgDBFolder::OnHdrAdded(nsIMsgDBHdr *aHdrChanged, nsMsgKey  aParentKey , PRInt32 aFlags,
                         nsIDBChangeListener * aInstigator)
 {
   if(aFlags & nsMsgMessageFlags::New)
-    CheckWithNewMessagesStatus(PR_TRUE);
-  return OnHdrAddedOrDeleted(aHdrChanged, PR_TRUE);
+    CheckWithNewMessagesStatus(true);
+  return OnHdrAddedOrDeleted(aHdrChanged, true);
 }
 
 nsresult nsMsgDBFolder::OnHdrAddedOrDeleted(nsIMsgDBHdr *aHdrChanged, bool added)
 {
   if(added)
     NotifyItemAdded(aHdrChanged);
   else
     NotifyItemRemoved(aHdrChanged);
-  UpdateSummaryTotals(PR_TRUE);
+  UpdateSummaryTotals(true);
   return NS_OK;
 
 }
 
 NS_IMETHODIMP nsMsgDBFolder::OnParentChanged(nsMsgKey aKeyChanged, nsMsgKey oldParent, nsMsgKey newParent,
             nsIDBChangeListener * aInstigator)
 {
   nsCOMPtr<nsIMsgDBHdr> hdrChanged;
   mDatabase->GetMsgHdrForKey(aKeyChanged, getter_AddRefs(hdrChanged));
   //In reality we probably want to just change the parent because otherwise we will lose things like
   //selection.
   if (hdrChanged)
   {
     //First delete the child from the old threadParent
-    OnHdrAddedOrDeleted(hdrChanged, PR_FALSE);
+    OnHdrAddedOrDeleted(hdrChanged, false);
     //Then add it to the new threadParent
-    OnHdrAddedOrDeleted(hdrChanged, PR_TRUE);
+    OnHdrAddedOrDeleted(hdrChanged, true);
   }
   return NS_OK;
 }
 
 
 NS_IMETHODIMP nsMsgDBFolder::OnAnnouncerGoingAway(nsIDBChangeAnnouncer *instigator)
 {
   if (mBackupDatabase && instigator == mBackupDatabase)
@@ -1154,21 +1154,21 @@ NS_IMETHODIMP nsMsgDBFolder::OnEvent(nsI
 
 NS_IMETHODIMP nsMsgDBFolder::GetManyHeadersToDownload(bool *retval)
 {
   NS_ENSURE_ARG_POINTER(retval);
   PRInt32 numTotalMessages;
 
   // is there any reason to return false?
   if (!mDatabase)
-    *retval = PR_TRUE;
-  else if (NS_SUCCEEDED(GetTotalMessages(PR_FALSE, &numTotalMessages)) && numTotalMessages <= 0)
-    *retval = PR_TRUE;
+    *retval = true;
+  else if (NS_SUCCEEDED(GetTotalMessages(false, &numTotalMessages)) && numTotalMessages <= 0)
+    *retval = true;
   else
-    *retval = PR_FALSE;
+    *retval = false;
   return NS_OK;
 }
 
 nsresult nsMsgDBFolder::MsgFitsDownloadCriteria(nsMsgKey msgKey, bool *result)
 {
   if(!mDatabase)
     return NS_ERROR_FAILURE;
 
@@ -1180,17 +1180,17 @@ nsresult nsMsgDBFolder::MsgFitsDownloadC
 
   if (hdr)
   {
     PRUint32 msgFlags = 0;
     hdr->GetFlags(&msgFlags);
     // check if we already have this message body offline
     if (! (msgFlags & nsMsgMessageFlags::Offline))
     {
-      *result = PR_TRUE;
+      *result = true;
       // check against the server download size limit .
       nsCOMPtr <nsIMsgIncomingServer> incomingServer;
       rv = GetServer(getter_AddRefs(incomingServer));
       if (NS_SUCCEEDED(rv) && incomingServer)
       {
         bool limitDownloadSize = false;
         rv = incomingServer->GetLimitOfflineMessageSize(&limitDownloadSize);
         NS_ENSURE_SUCCESS(rv, rv);
@@ -1198,30 +1198,30 @@ nsresult nsMsgDBFolder::MsgFitsDownloadC
         {
           PRInt32 maxDownloadMsgSize = 0;
           PRUint32 msgSize;
           hdr->GetMessageSize(&msgSize);
           rv = incomingServer->GetMaxMessageSize(&maxDownloadMsgSize);
           NS_ENSURE_SUCCESS(rv, rv);
           maxDownloadMsgSize *= 1024;
           if (msgSize > (PRUint32) maxDownloadMsgSize)
-            *result = PR_FALSE;
+            *result = false;
         }
       }
     }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::GetSupportsOffline(bool *aSupportsOffline)
 {
   NS_ENSURE_ARG_POINTER(aSupportsOffline);
   if (mFlags & nsMsgFolderFlags::Virtual)
   {
-    *aSupportsOffline = PR_FALSE;
+    *aSupportsOffline = false;
     return NS_OK;
   }
 
   nsCOMPtr<nsIMsgIncomingServer> server;
   nsresult rv = GetServer(getter_AddRefs(server));
   NS_ENSURE_SUCCESS(rv,rv);
   if (!server)
     return NS_ERROR_FAILURE;
@@ -1233,50 +1233,50 @@ NS_IMETHODIMP nsMsgDBFolder::GetSupports
   *aSupportsOffline = (offlineSupportLevel >= OFFLINE_SUPPORT_LEVEL_REGULAR);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::ShouldStoreMsgOffline(nsMsgKey msgKey, bool *result)
 {
   NS_ENSURE_ARG(result);
   PRUint32 flags = 0;
-  *result = PR_FALSE;
+  *result = false;
   GetFlags(&flags);
   return flags & nsMsgFolderFlags::Offline ? MsgFitsDownloadCriteria(msgKey, result) : NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::HasMsgOffline(nsMsgKey msgKey, bool *result)
 {
   NS_ENSURE_ARG(result);
-  *result = PR_FALSE;
+  *result = false;
   GetDatabase();
   if(!mDatabase)
     return NS_ERROR_FAILURE;
 
   nsresult rv;
   nsCOMPtr<nsIMsgDBHdr> hdr;
   rv = mDatabase->GetMsgHdrForKey(msgKey, getter_AddRefs(hdr));
   if(NS_FAILED(rv))
     return rv;
 
   if (hdr)
   {
     PRUint32 msgFlags = 0;
     hdr->GetFlags(&msgFlags);
     // check if we already have this message body offline
     if ((msgFlags & nsMsgMessageFlags::Offline))
-      *result = PR_TRUE;
+      *result = true;
   }
   return NS_OK;
 }
 
 
 NS_IMETHODIMP nsMsgDBFolder::GetFlags(PRUint32 *_retval)
 {
-  ReadDBFolderInfo(PR_FALSE);
+  ReadDBFolderInfo(false);
   *_retval = mFlags;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::ReadFromFolderCacheElem(nsIMsgFolderCacheElement *element)
 {
   nsresult rv = NS_OK;
   nsCString charset;
@@ -1290,17 +1290,17 @@ NS_IMETHODIMP nsMsgDBFolder::ReadFromFol
   element->GetInt32Property("folderSize", (PRInt32 *) &mFolderSize);
   element->GetStringProperty("charset", mCharset);
 
 #ifdef DEBUG_bienvenu1
   nsCString uri;
   GetURI(uri);
   printf("read total %ld for %s\n", mNumTotalMessages, uri.get());
 #endif
-  mInitializedFromCache = PR_TRUE;
+  mInitializedFromCache = true;
   return rv;
 }
 
 nsresult nsMsgDBFolder::GetFolderCacheKey(nsILocalFile **aFile, bool createDBIfMissing /* = false */)
 {
   nsresult rv;
   nsCOMPtr <nsILocalFile> path;
   rv = GetFilePath(getter_AddRefs(path));
@@ -1339,17 +1339,17 @@ nsresult nsMsgDBFolder::FlushToFolderCac
   nsresult rv;
   nsCOMPtr<nsIMsgAccountManager> accountManager =
            do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
   if (NS_SUCCEEDED(rv) && accountManager)
   {
     nsCOMPtr<nsIMsgFolderCache> folderCache;
     rv = accountManager->GetFolderCache(getter_AddRefs(folderCache));
     if (NS_SUCCEEDED(rv) && folderCache)
-      rv = WriteToFolderCache(folderCache, PR_FALSE);
+      rv = WriteToFolderCache(folderCache, false);
   }
   return rv;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::WriteToFolderCache(nsIMsgFolderCache *folderCache, bool deep)
 {
   nsresult rv = NS_OK;
 
@@ -1361,17 +1361,17 @@ NS_IMETHODIMP nsMsgDBFolder::WriteToFold
 #ifdef DEBUG_bienvenu1
     bool exists;
     NS_ASSERTION(NS_SUCCEEDED(dbPath->Exists(&exists)) && exists, "file spec we're adding to cache should exist");
 #endif
     if (NS_SUCCEEDED(rv) && dbPath)
     {
       nsCString persistentPath;
       dbPath->GetPersistentDescriptor(persistentPath);
-      rv = folderCache->GetCacheElement(persistentPath, PR_TRUE, getter_AddRefs(cacheElement));
+      rv = folderCache->GetCacheElement(persistentPath, true, getter_AddRefs(cacheElement));
       if (NS_SUCCEEDED(rv) && cacheElement)
         rv = WriteToFolderCacheElem(cacheElement);
     }
   }
 
   if (!deep)
     return rv;
 
@@ -1387,17 +1387,17 @@ NS_IMETHODIMP nsMsgDBFolder::WriteToFold
     enumerator->GetNext(getter_AddRefs(item));
 
     nsCOMPtr<nsIMsgFolder> msgFolder(do_QueryInterface(item));
     if (!msgFolder)
       continue;
 
     if (folderCache)
     {
-      rv = msgFolder->WriteToFolderCache(folderCache, PR_TRUE);
+      rv = msgFolder->WriteToFolderCache(folderCache, true);
       if (NS_FAILED(rv))
         break;
     }
   }
   return rv;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::WriteToFolderCacheElem(nsIMsgFolderCacheElement *element)
@@ -1428,19 +1428,19 @@ nsMsgDBFolder::AddMessageDispositionStat
 
   nsresult rv = GetDatabase();
   NS_ENSURE_SUCCESS(rv, NS_OK);
 
   nsMsgKey msgKey;
   aMessage->GetMessageKey(&msgKey);
 
   if (aDispositionFlag == nsIMsgFolder::nsMsgDispositionState_Replied)
-    mDatabase->MarkReplied(msgKey, PR_TRUE, nsnull);
+    mDatabase->MarkReplied(msgKey, true, nsnull);
   else if (aDispositionFlag == nsIMsgFolder::nsMsgDispositionState_Forwarded)
-    mDatabase->MarkForwarded(msgKey, PR_TRUE, nsnull);
+    mDatabase->MarkForwarded(msgKey, true, nsnull);
   return NS_OK;
 }
 
 nsresult nsMsgDBFolder::AddMarkAllReadUndoAction(nsIMsgWindow *msgWindow,
                                                  nsMsgKey *thoseMarked,
                                                  PRUint32 numMarked)
 {
   nsRefPtr<nsMsgReadStateTxn> readStateTxn = new nsMsgReadStateTxn();
@@ -1465,30 +1465,30 @@ nsresult nsMsgDBFolder::AddMarkAllReadUn
 NS_IMETHODIMP
 nsMsgDBFolder::MarkAllMessagesRead(nsIMsgWindow *aMsgWindow)
 {
   nsresult rv = GetDatabase();
   m_newMsgs.Clear();
 
   if (NS_SUCCEEDED(rv))
   {
-    EnableNotifications(allMessageCountNotifications, PR_FALSE, PR_TRUE /*dbBatching*/);
+    EnableNotifications(allMessageCountNotifications, false, true /*dbBatching*/);
     nsMsgKey *thoseMarked;
     PRUint32 numMarked;
     rv = mDatabase->MarkAllRead(&numMarked, &thoseMarked);
     NS_ENSURE_SUCCESS(rv, rv);
-    EnableNotifications(allMessageCountNotifications, PR_TRUE, PR_TRUE /*dbBatching*/);
+    EnableNotifications(allMessageCountNotifications, true, true /*dbBatching*/);
 
     // Setup a undo-state
     if (aMsgWindow)
       rv = AddMarkAllReadUndoAction(aMsgWindow, thoseMarked, numMarked);
     nsMemory::Free(thoseMarked);
   }
 
-  SetHasNewMessages(PR_FALSE);
+  SetHasNewMessages(false);
   return rv;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::MarkThreadRead(nsIMsgThread *thread)
 {
   nsresult rv = GetDatabase();
   if(NS_SUCCEEDED(rv))
   {
@@ -1536,17 +1536,17 @@ nsMsgDBFolder::GetRetentionSettings(nsIM
     GetStringProperty(kUseServerRetentionProp, useServerRetention);
     if (useServerRetention.EqualsLiteral("1"))
     {
       nsCOMPtr <nsIMsgIncomingServer> incomingServer;
       rv = GetServer(getter_AddRefs(incomingServer));
       if (NS_SUCCEEDED(rv) && incomingServer)
       {
         rv = incomingServer->GetRetentionSettings(settings);
-        useServerDefaults = PR_TRUE;
+        useServerDefaults = true;
       }
     }
     else
     {
       GetDatabase();
       if (mDatabase)
       {
         // get the settings from the db - if the settings from the db say the folder
@@ -1646,17 +1646,17 @@ NS_IMETHODIMP nsMsgDBFolder::SetDownload
 {
   m_downloadSettings = settings;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::IsCommandEnabled(const nsACString& command, bool *result)
 {
   NS_ENSURE_ARG_POINTER(result);
-  *result = PR_TRUE;
+  *result = true;
   return NS_OK;
 }
 
 nsresult nsMsgDBFolder::WriteStartOfNewLocalMessage()
 {
   nsCAutoString result;
   PRUint32 writeCount;
   time_t now = time ((time_t*) 0);
@@ -1723,17 +1723,17 @@ nsresult nsMsgDBFolder::EndNewOfflineMes
   NS_ENSURE_SUCCESS(rv, rv);
 
   m_offlineHeader->GetMessageKey(&messageKey);
   if (m_tempMessageStream)
     seekable = do_QueryInterface(m_tempMessageStream);
 
   if (seekable)
   {
-    mDatabase->MarkOffline(messageKey, PR_TRUE, nsnull);
+    mDatabase->MarkOffline(messageKey, true, nsnull);
     m_tempMessageStream->Flush();
     PRInt64 tellPos;
     seekable->Tell(&tellPos);
     curStorePos = tellPos;
 
     // N.B. This only works if we've set the offline flag for the message,
     // so be careful about moving the call to MarkOffline above.
     m_offlineHeader->GetMessageOffset(&messageOffset);
@@ -1746,17 +1746,17 @@ nsresult nsMsgDBFolder::EndNewOfflineMes
     if (MSG_LINEBREAK_LEN == 1)
       messageSize -= m_numOfflineMsgLines;
 
     // We clear the offline flag on the message if the size
     // looks wrong. Check if we're off by more than one byte per line.
     if (messageSize > (PRUint32) curStorePos &&
        (messageSize - (PRUint32) curStorePos) > (PRUint32) m_numOfflineMsgLines)
     {
-       mDatabase->MarkOffline(messageKey, PR_FALSE, nsnull);
+       mDatabase->MarkOffline(messageKey, false, nsnull);
        // we should truncate the offline store at messgeOffset
        nsCOMPtr <nsILocalFile> localStore;
        rv = GetFilePath(getter_AddRefs(localStore));
        if (NS_SUCCEEDED(rv))
        {
          m_tempMessageStream->Close();
          m_tempMessageStream = nsnull;
          ReleaseSemaphore(static_cast<nsIMsgFolder*>(this));
@@ -1789,17 +1789,17 @@ nsresult nsMsgDBFolder::EndNewOfflineMes
   return NS_OK;
 }
 
 nsresult nsMsgDBFolder::CompactOfflineStore(nsIMsgWindow *inWindow, nsIUrlListener *aListener)
 {
   nsresult rv;
   nsCOMPtr <nsIMsgFolderCompactor> folderCompactor =  do_CreateInstance(NS_MSGOFFLINESTORECOMPACTOR_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
-  return folderCompactor->Compact(this, PR_TRUE, aListener, inWindow);
+  return folderCompactor->Compact(this, true, aListener, inWindow);
 }
 
 class AutoCompactEvent : public nsRunnable
 {
 public:
   AutoCompactEvent(nsIMsgWindow *aMsgWindow, nsMsgDBFolder *aFolder)
     : mMsgWindow(aMsgWindow), mFolder(aFolder)
   {}
@@ -1868,30 +1868,30 @@ nsresult nsMsgDBFolder::HandleAutoCompac
             {
               nsCOMPtr<nsIMsgFolder> folder = do_QueryElementAt(allDescendents, i);
               expungedBytes = 0;
               folder->GetFlags(&flags);
               if (flags & nsMsgFolderFlags::Offline)
                 folder->GetExpungedBytes(&expungedBytes);
               if (expungedBytes > 0 )
               {
-                offlineFolderArray->AppendElement(folder, PR_FALSE);
+                offlineFolderArray->AppendElement(folder, false);
                 offlineExpungedBytes += expungedBytes;
               }
             }
           }
           else  //pop or local
           {
             for (PRUint32 i = 0; i < cnt; i++)
             {
               nsCOMPtr<nsIMsgFolder> folder = do_QueryElementAt(allDescendents, i);
               folder->GetExpungedBytes(&expungedBytes);
               if (expungedBytes > 0 )
               {
-                folderArray->AppendElement(folder, PR_FALSE);
+                folderArray->AppendElement(folder, false);
                 localExpungedBytes += expungedBytes;
               }
             }
           }
         }
         server = do_QueryElementAt(allServers, serverIndex);
       }
       while (++serverIndex < numServers);
@@ -1938,19 +1938,19 @@ nsresult nsMsgDBFolder::HandleAutoCompac
             (nsIPrompt::BUTTON_TITLE_IS_STRING * nsIPrompt::BUTTON_POS_0) +
             (nsIPrompt::BUTTON_TITLE_CANCEL * nsIPrompt::BUTTON_POS_1);
           rv = dialog->ConfirmEx(dialogTitle.get(), confirmString.get(), buttonFlags,
                                  buttonCompactNowText.get(), nsnull, nsnull,
                                  checkboxText.get(), &alwaysAsk, &buttonPressed);
           NS_ENSURE_SUCCESS(rv, rv);
           if (!buttonPressed)
           {
-            okToCompact = PR_TRUE;
+            okToCompact = true;
             if (!alwaysAsk) // [ ] Always ask me before compacting folders automatically
-              branch->SetBoolPref(PREF_MAIL_PURGE_ASK, PR_FALSE);
+              branch->SetBoolPref(PREF_MAIL_PURGE_ASK, false);
           }
         }
         else
           okToCompact = aWindow || !askBeforePurge;
 
         if (okToCompact)
         {
           nsCOMPtr <nsIAtom> aboutToCompactAtom = MsgGetAtom("AboutToCompact");
@@ -2016,17 +2016,17 @@ nsMsgDBFolder::GetPromptPurgeThreshold(b
   NS_ENSURE_ARG(aPrompt);
   nsresult rv;
   nsCOMPtr<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
   if (NS_SUCCEEDED(rv) && prefBranch)
   {
     rv = prefBranch->GetBoolPref(PREF_MAIL_PROMPT_PURGE_THRESHOLD, aPrompt);
     if (NS_FAILED(rv))
     {
-      *aPrompt = PR_FALSE;
+      *aPrompt = false;
       rv = NS_OK;
     }
   }
   return rv;
 }
 
 nsresult
 nsMsgDBFolder::GetPurgeThreshold(PRInt32 *aThreshold)
@@ -2044,17 +2044,17 @@ nsMsgDBFolder::GetPurgeThreshold(PRInt32
     {
       *aThreshold = 20480;
       (void) prefBranch->GetIntPref(PREF_MAIL_PURGE_THRESHOLD, aThreshold);
       if (*aThreshold/1024 != thresholdMB)
       {
         thresholdMB = NS_MAX(1, *aThreshold/1024);
         prefBranch->SetIntPref(PREF_MAIL_PURGE_THRESHOLD_MB, thresholdMB);
       }
-      prefBranch->SetBoolPref(PREF_MAIL_PURGE_MIGRATED, PR_TRUE);
+      prefBranch->SetBoolPref(PREF_MAIL_PURGE_MIGRATED, true);
     }
     *aThreshold = thresholdMB * 1024;
   }
   return rv;
 }
 
 NS_IMETHODIMP //called on the folder that is renamed or about to be deleted
 nsMsgDBFolder::MatchOrChangeFilterDestination(nsIMsgFolder *newFolder, bool caseInsensitive, bool *found)
@@ -2130,17 +2130,17 @@ nsMsgDBFolder::SetDBTransferInfo(nsIDBFo
   nsCOMPtr <nsIDBFolderInfo> dbFolderInfo;
   nsCOMPtr <nsIMsgDatabase> db;
   GetMsgDatabase(getter_AddRefs(db));
   if (db)
   {
     db->GetDBFolderInfo(getter_AddRefs(dbFolderInfo));
     if(dbFolderInfo)
       dbFolderInfo->InitFromTransferInfo(aTransferInfo);
-    db->SetSummaryValid(PR_TRUE);
+    db->SetSummaryValid(true);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgDBFolder::GetStringProperty(const char *propertyName, nsACString& propertyValue)
 {
   NS_ENSURE_ARG_POINTER(propertyName);
@@ -2348,17 +2348,17 @@ nsMsgDBFolder::OnMessageClassified(const
       // a filter moved it.
       rv = mDatabase->ContainsKey(msgKey, &hasKey);
       if (!NS_SUCCEEDED(rv) || !hasKey)
         continue;
       nsCOMPtr <nsIMsgDBHdr> msgHdr;
       rv = mDatabase->GetMsgHdrForKey(msgKey, getter_AddRefs(msgHdr));
       if (!NS_SUCCEEDED(rv))
         continue;
-      classifiedMsgHdrs->AppendElement(msgHdr, PR_FALSE);
+      classifiedMsgHdrs->AppendElement(msgHdr, false);
     }
 
     // only generate the notification if there are some classified messages
     if (NS_SUCCEEDED(classifiedMsgHdrs->GetLength(&length)) && length)
       notifier->NotifyMsgsClassified(classifiedMsgHdrs,
                                      mBayesJunkClassifying,
                                      mBayesTraitClassifying);
     mClassifiedMsgKeys.Clear();
@@ -2414,17 +2414,17 @@ nsMsgDBFolder::OnMessageClassified(const
           rv = mDatabase->MarkRead(msgKey, true, this);
           if (!NS_SUCCEEDED(rv))
             NS_WARNING("failed marking spam message as read");
         }
       }
       // mail folders will log junk hits with move info. Perhaps we should
       // add a log here for non-mail folders as well, that don't override
       // onMessageClassified
-      //rv = spamSettings->LogJunkHit(msgHdr, PR_FALSE);
+      //rv = spamSettings->LogJunkHit(msgHdr, false);
       //NS_ENSURE_SUCCESS(rv,rv);
     }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgDBFolder::OnMessageTraitsClassified(const char *aMsgURI,
@@ -2471,17 +2471,17 @@ nsMsgDBFolder::OnMessageTraitsClassified
 
 /**
  * Call the filter plugins (XXX currently just one)
  */
 NS_IMETHODIMP
 nsMsgDBFolder::CallFilterPlugins(nsIMsgWindow *aMsgWindow, bool *aFiltersRun)
 {
   NS_ENSURE_ARG_POINTER(aFiltersRun);
-  *aFiltersRun = PR_FALSE;
+  *aFiltersRun = false;
   nsCOMPtr<nsIMsgIncomingServer> server;
   nsCOMPtr<nsISpamSettings> spamSettings;
   PRInt32 spamLevel = 0;
 
   nsresult rv = GetServer(getter_AddRefs(server));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCString serverType;
@@ -2521,44 +2521,44 @@ nsMsgDBFolder::CallFilterPlugins(nsIMsgW
   bool filterForJunk = true;
   if (serverType.EqualsLiteral("rss") ||
       (mFlags & (nsMsgFolderFlags::Junk | nsMsgFolderFlags::Trash |
                  nsMsgFolderFlags::SentMail | nsMsgFolderFlags::Queue |
                  nsMsgFolderFlags::Drafts | nsMsgFolderFlags::Templates |
                  nsMsgFolderFlags::ImapPublic | nsMsgFolderFlags::Newsgroup |
                  nsMsgFolderFlags::ImapOtherUser) &&
        !(mFlags & nsMsgFolderFlags::Inbox)))
-    filterForJunk = PR_FALSE;
+    filterForJunk = false;
 
   spamSettings->GetLevel(&spamLevel);
   if (!spamLevel)
-    filterForJunk = PR_FALSE;
+    filterForJunk = false;
 
   /*
    * We'll use inherited folder properties for the junk trait to override the
    * standard server-based activation of junk processing. This provides a
    * hook for extensions to customize the application of junk filtering.
    * Set inherited property "dobayes.mailnews@mozilla.org#junk" to "true"
    * to force junk processing, and "false" to skip junk processing.
    */
 
   nsCAutoString junkEnableOverride;
   GetInheritedStringProperty("dobayes.mailnews@mozilla.org#junk", junkEnableOverride);
   if (junkEnableOverride.EqualsLiteral("true"))
-    filterForJunk = PR_TRUE;
+    filterForJunk = true;
   else if (junkEnableOverride.EqualsLiteral("false"))
-    filterForJunk = PR_FALSE;
+    filterForJunk = false;
 
   bool userHasClassified = false;
   // if the user has not classified any messages yet, then we shouldn't bother
   // running the junk mail controls. This creates a better first use experience.
   // See Bug #250084.
   junkMailPlugin->GetUserHasClassified(&userHasClassified);
   if (!userHasClassified)
-    filterForJunk = PR_FALSE;
+    filterForJunk = false;
 
   if (!mDatabase)
   {
     rv = GetDatabase();
     NS_ENSURE_SUCCESS(rv, rv);
     NS_ENSURE_TRUE(mDatabase, NS_ERROR_NOT_AVAILABLE);
   }
 
@@ -2581,25 +2581,25 @@ nsMsgDBFolder::CallFilterPlugins(nsIMsgW
       // set "dobayes." + trait proID as an inherited folder property with
       // the string value "false"
       //
       // If any non-junk traits are active on the folder, then the bayes
       // processing will calculate probabilities for all enabled traits.
 
       if (proIndices[i] != nsIJunkMailPlugin::JUNK_TRAIT)
       {
-        filterForOther = PR_TRUE;
+        filterForOther = true;
         nsCAutoString traitId;
         nsCAutoString property("dobayes.");
         traitService->GetId(proIndices[i], traitId);
         property.Append(traitId);
         nsCAutoString isEnabledOnFolder;
         GetInheritedStringProperty(property.get(), isEnabledOnFolder);
         if (isEnabledOnFolder.EqualsLiteral("false"))
-          filterForOther = PR_FALSE;
+          filterForOther = false;
         // We might have to allow a "true" override in the future, but
         // for now there is no way for that to affect the processing
         break;
       }
     }
     NS_Free(proIndices);
     NS_Free(antiIndices);
   }
@@ -2621,17 +2621,17 @@ nsMsgDBFolder::CallFilterPlugins(nsIMsgW
       nsMsgFilterTypeType filterType;
       filter->GetFilterType(&filterType);
       if (!(filterType & nsMsgFilterType::PostPlugin))
         continue;
       bool enabled = false;
       filter->GetEnabled(&enabled);
       if (!enabled)
         continue;
-      filterPostPlugin = PR_TRUE;
+      filterPostPlugin = true;
     }
   }
 
   // If there is nothing to do, leave now but let NotifyHdrsNotBeingClassified
   // generate the msgsClassified notification for all newly added messages as
   // tracked by the NotReportedClassified processing flag.
   if (!filterForOther && !filterForJunk && !filterPostPlugin)
   {
@@ -2686,17 +2686,17 @@ nsMsgDBFolder::CallFilterPlugins(nsIMsgW
         // mark this msg as non-junk, because we whitelisted it.
 
         nsCAutoString msgJunkScore;
         msgJunkScore.AppendInt(nsIJunkMailPlugin::IS_HAM_SCORE);
         mDatabase->SetStringProperty(msgKey, "junkscore", msgJunkScore.get());
         mDatabase->SetStringProperty(msgKey, "junkscoreorigin", "whitelist");
         break; // skip this msg since it's in the white list
       }
-      filterMessageForJunk = PR_TRUE;
+      filterMessageForJunk = true;
 
       OrProcessingFlags(msgKey, nsMsgProcessingFlags::ClassifyJunk);
       // Since we are junk processing, we want to defer the msgsClassified
       // notification until the junk classification has occurred.  The event
       // is sufficiently reliable that we know this will be handled in
       // OnMessageClassified at the end of the batch.  We clear the
       // NotReportedClassified flag since we know the message is in good hands.
       AndProcessingFlags(msgKey, ~nsMsgProcessingFlags::NotReportedClassified);
@@ -2709,17 +2709,17 @@ nsMsgDBFolder::CallFilterPlugins(nsIMsgW
     bool filterMessageForOther = false;
     // trait processing
     if (!(processingFlags & nsMsgProcessingFlags::TraitsDone))
     {
       // don't do trait processing on this message again
       OrProcessingFlags(msgKey, nsMsgProcessingFlags::TraitsDone);
       if (filterForOther)
       {
-        filterMessageForOther = PR_TRUE;
+        filterMessageForOther = true;
         OrProcessingFlags(msgKey, nsMsgProcessingFlags::ClassifyTraits);
       }
     }
 
     if (filterMessageForJunk || filterMessageForOther)
       classifyMsgKeys.AppendElement(newMessageKeys[i]);
 
     // Set messages to filter post-bayes.
@@ -2730,17 +2730,17 @@ nsMsgDBFolder::CallFilterPlugins(nsIMsgW
       {
         // Don't do filters on this message again.
         // (Only set this if we are actually filtering since this is
         // tantamount to a memory leak.)
         OrProcessingFlags(msgKey, nsMsgProcessingFlags::FiltersDone);
         // Lazily create the array.
         if (!mPostBayesMessagesToFilter)
           mPostBayesMessagesToFilter = do_CreateInstance(NS_ARRAY_CONTRACTID);
-        mPostBayesMessagesToFilter->AppendElement(msgHdr, PR_FALSE);
+        mPostBayesMessagesToFilter->AppendElement(msgHdr, false);
       }
     }
   }
 
   NotifyHdrsNotBeingClassified();
   // If there weren't any new messages, just return.
   if (newMessageKeys.IsEmpty())
     return NS_OK;
@@ -2767,17 +2767,17 @@ nsMsgDBFolder::CallFilterPlugins(nsIMsgW
       nsCString tmpStr;
       rv = GenerateMessageURI(classifyMsgKeys[msgIndex], tmpStr);
       messageURIs[msgIndex] = ToNewCString(tmpStr);
       if (NS_FAILED(rv))
           NS_WARNING("nsMsgDBFolder::CallFilterPlugins(): could not"
                      " generate URI for message");
     }
     // filterMsgs
-    *aFiltersRun = PR_TRUE;
+    *aFiltersRun = true;
     rv = SpamFilterClassifyMessages((const char **) messageURIs, numMessagesToClassify, aMsgWindow, junkMailPlugin);
     for ( PRUint32 freeIndex=0 ; freeIndex < numMessagesToClassify ; ++freeIndex )
       PR_Free(messageURIs[freeIndex]);
     PR_Free(messageURIs);
   }
   else if (filterPostPlugin)
   {
     // Nothing to classify, so need to end batch ourselves. We do this so that
@@ -2814,17 +2814,17 @@ nsresult nsMsgDBFolder::NotifyHdrsNotBei
       // we clear the set by deleting and recreating it.
       delete mProcessingFlag[5].keys;
       mProcessingFlag[5].keys = nsMsgKeySetU::Create();
       nsCOMPtr<nsIMsgFolderNotificationService>
         notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
       if (notifier)
         notifier->NotifyMsgsClassified(msgHdrsNotBeingClassified,
                                        // no classification is being performed
-                                       PR_FALSE, PR_FALSE);
+                                       false, false);
     }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgDBFolder::GetLastMessageLoaded(nsMsgKey *aMsgKey)
 {
@@ -2842,70 +2842,70 @@ nsMsgDBFolder::SetLastMessageLoaded(nsMs
 
 // Returns true if: a) there is no need to prompt or b) the user is already
 // logged in or c) the user logged in successfully.
 bool nsMsgDBFolder::PromptForMasterPasswordIfNecessary()
 {
   nsresult rv;
   nsCOMPtr<nsIMsgAccountManager> accountManager =
     do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   bool userNeedsToAuthenticate = false;
   // if we're PasswordProtectLocalCache, then we need to find out if the server
   // is authenticated.
   (void) accountManager->GetUserNeedsToAuthenticate(&userNeedsToAuthenticate);
   if (!userNeedsToAuthenticate)
-    return PR_TRUE;
+    return true;
 
   // Do we have a master password?
   nsCOMPtr<nsIPK11TokenDB> tokenDB =
     do_GetService(NS_PK11TOKENDB_CONTRACTID, &rv);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   nsCOMPtr<nsIPK11Token> token;
   rv = tokenDB->GetInternalKeyToken(getter_AddRefs(token));
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   bool result;
   rv = token->CheckPassword(EmptyString().get(), &result);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   if (result)
   {
     // We don't have a master password, so this function isn't supported,
     // therefore just tell account manager we've authenticated and return true.
-    accountManager->SetUserNeedsToAuthenticate(PR_FALSE);
-    return PR_TRUE;
+    accountManager->SetUserNeedsToAuthenticate(false);
+    return true;
   }
 
   // We have a master password, so try and login to the slot.
-  rv = token->Login(PR_FALSE);
+  rv = token->Login(false);
   if (NS_FAILED(rv))
     // Login failed, so we didn't get a password (e.g. prompt cancelled).
-    return PR_FALSE;
+    return false;
 
   // Double-check that we are now logged in
   rv = token->IsLoggedIn(&result);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   accountManager->SetUserNeedsToAuthenticate(!result);
   return result;
 }
 
 // this gets called after the last junk mail classification has run.
 nsresult nsMsgDBFolder::PerformBiffNotifications(void)
 {
   nsCOMPtr<nsIMsgIncomingServer> server;
   nsresult rv = GetServer(getter_AddRefs(server));
   NS_ENSURE_SUCCESS(rv, rv);
   PRInt32  numBiffMsgs = 0;
   nsCOMPtr<nsIMsgFolder> root;
   rv = GetRootFolder(getter_AddRefs(root));
-  root->GetNumNewMessages(PR_TRUE, &numBiffMsgs);
+  root->GetNumNewMessages(true, &numBiffMsgs);
   if (numBiffMsgs > 0)
   {
     server->SetPerformingBiff(true);
     SetBiffState(nsIMsgFolder::nsMsgBiffState_NewMail);
     server->SetPerformingBiff(false);
   }
   return NS_OK;
 }
@@ -3061,18 +3061,18 @@ NS_IMETHODIMP nsMsgDBFolder::SetParent(n
   mParent = do_GetWeakReference(aParent);
   if (aParent)
   {
     nsresult rv;
     nsCOMPtr<nsIMsgFolder> parentMsgFolder = do_QueryInterface(aParent, &rv);
     if (NS_SUCCEEDED(rv))
     {
       // servers do not have parents, so we must not be a server
-      mIsServer = PR_FALSE;
-      mIsServerIsValid = PR_TRUE;
+      mIsServer = false;
+      mIsServerIsValid = true;
 
       // also set the server itself while we're here.
       nsCOMPtr<nsIMsgIncomingServer> server;
       rv = parentMsgFolder->GetServer(getter_AddRefs(server));
       if (NS_SUCCEEDED(rv) && server)
         mServer = do_GetWeakReference(server);
     }
   }
@@ -3112,29 +3112,29 @@ NS_IMETHODIMP nsMsgDBFolder::GetServer(n
 {
   NS_ENSURE_ARG_POINTER(aServer);
   nsresult rv;
   // short circut the server if we have it.
   nsCOMPtr<nsIMsgIncomingServer> server = do_QueryReferent(mServer, &rv);
   if (NS_FAILED(rv))
   {
     // try again after parsing the URI
-    rv = parseURI(PR_TRUE);
+    rv = parseURI(true);
     server = do_QueryReferent(mServer);
   }
   server.swap(*aServer);
   return *aServer ? NS_OK : NS_ERROR_FAILURE;
 }
 
 #ifdef MSG_FASTER_URI_PARSING
 class nsMsgAutoBool {
 public:
   nsMsgAutoBool() : mValue(nsnull) {}
   void autoReset(bool *aValue) { mValue = aValue; }
-  ~nsMsgAutoBool() { if (mValue) *mValue = PR_FALSE; }
+  ~nsMsgAutoBool() { if (mValue) *mValue = false; }
 private:
   bool *mValue;
 };
 #endif
 
 nsresult
 nsMsgDBFolder::parseURI(bool needServer)
 {
@@ -3143,34 +3143,34 @@ nsMsgDBFolder::parseURI(bool needServer)
 
 #ifdef MSG_FASTER_URI_PARSING
   nsMsgAutoBool parsingUrlState;
   if (mParsingURLInUse)
     url = do_CreateInstance(NS_STANDARDURL_CONTRACTID, &rv);
   else
   {
     url = mParsingURL;
-    mParsingURLInUse = PR_TRUE;
+    mParsingURLInUse = true;
     parsingUrlState.autoReset(&mParsingURLInUse);
   }
 #else
   url = do_CreateInstance(NS_STANDARDURL_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 #endif
 
   rv = url->SetSpec(mURI);
   NS_ENSURE_SUCCESS(rv, rv);
   // empty path tells us it's a server.
   if (!mIsServerIsValid)
   {
     nsCAutoString path;
     rv = url->GetPath(path);
     if (NS_SUCCEEDED(rv))
       mIsServer = path.EqualsLiteral("/");
-    mIsServerIsValid = PR_TRUE;
+    mIsServerIsValid = true;
   }
 
   // grab the name off the leaf of the server
   if (mName.IsEmpty())
   {
     // mName:
     // the name is the trailing directory in the path
     nsCAutoString fileName;
@@ -3210,17 +3210,17 @@ nsMsgDBFolder::parseURI(bool needServer)
       GetIncomingServerType(serverType);
       if (serverType.IsEmpty())
       {
         NS_WARNING("can't determine folder's server type");
         return NS_ERROR_FAILURE;
       }
 
       url->SetScheme(serverType);
-      rv = accountManager->FindServerByURI(url, PR_FALSE,
+      rv = accountManager->FindServerByURI(url, false,
                                       getter_AddRefs(server));
       NS_ENSURE_SUCCESS(rv, rv);
     }
     mServer = do_GetWeakReference(server);
   } /* !mServer */
 
   // now try to find the local path for this folder
   if (server)
@@ -3273,17 +3273,17 @@ nsMsgDBFolder::parseURI(bool needServer)
           return rv;
         }
       }
       mPath = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
       NS_ENSURE_SUCCESS(rv, rv);
       mPath->InitWithFile(serverPath);
     }
     // URI is completely parsed when we've attempted to get the server
-    mHaveParsedURI=PR_TRUE;
+    mHaveParsedURI=true;
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgDBFolder::GetIsServer(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
@@ -3298,47 +3298,47 @@ nsMsgDBFolder::GetIsServer(bool *aResult
   *aResult = mIsServer;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgDBFolder::GetNoSelect(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = PR_FALSE;
+  *aResult = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgDBFolder::GetImapShared(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
   return GetFlag(nsMsgFolderFlags::PersonalShared, aResult);
 }
 
 NS_IMETHODIMP
 nsMsgDBFolder::GetCanSubscribe(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
   // by default, you can't subscribe.
   // if otherwise, override it.
-  *aResult = PR_FALSE;
+  *aResult = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgDBFolder::GetCanFileMessages(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
 
   //varada - checking folder flag to see if it is the "Unsent Messages"
   //and if so return FALSE
   if (mFlags & (nsMsgFolderFlags::Queue | nsMsgFolderFlags::Virtual))
   {
-    *aResult = PR_FALSE;
+    *aResult = false;
     return NS_OK;
   }
 
   bool isServer = false;
   nsresult rv = GetIsServer(&isServer);
   if (NS_FAILED(rv)) return rv;
 
   // by default, you can't file messages into servers, only to folders
@@ -3346,36 +3346,36 @@ nsMsgDBFolder::GetCanFileMessages(bool *
   *aResult = !isServer;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgDBFolder::GetCanDeleteMessages(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = PR_TRUE;
+  *aResult = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgDBFolder::GetCanCreateSubfolders(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
 
   //Checking folder flag to see if it is the "Unsent Messages"
   //or a virtual folder, and if so return FALSE
   if (mFlags & (nsMsgFolderFlags::Queue | nsMsgFolderFlags::Virtual))
   {
-    *aResult = PR_FALSE;
+    *aResult = false;
     return NS_OK;
   }
 
   // by default, you can create subfolders on server and folders
   // if otherwise, override it.
-  *aResult = PR_TRUE;
+  *aResult = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgDBFolder::GetCanRename(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
 
@@ -3576,17 +3576,17 @@ NS_IMETHODIMP nsMsgDBFolder::GetPretties
     return NS_OK;
   return GetName(name);
 }
 
 
 NS_IMETHODIMP nsMsgDBFolder::GetShowDeletedMessages(bool *showDeletedMessages)
 {
   NS_ENSURE_ARG_POINTER(showDeletedMessages);
-  *showDeletedMessages = PR_FALSE;
+  *showDeletedMessages = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::Delete()
 {
   return NS_OK;
 }
 
@@ -3594,24 +3594,24 @@ NS_IMETHODIMP nsMsgDBFolder::DeleteSubFo
                                               nsIMsgWindow *msgWindow)
 {
   PRUint32 count;
   nsresult rv = folders->GetLength(&count);
   for(PRUint32 i = 0; i < count; i++)
   {
     nsCOMPtr<nsIMsgFolder> folder(do_QueryElementAt(folders, i, &rv));
     if (folder)
-      PropagateDelete(folder, PR_TRUE, msgWindow);
+      PropagateDelete(folder, true, msgWindow);
   }
   return rv;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::CreateStorageIfMissing(nsIUrlListener* /* urlListener */)
 {
-  NS_ASSERTION(PR_FALSE, "needs to be overridden");
+  NS_ASSERTION(false, "needs to be overridden");
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::PropagateDelete(nsIMsgFolder *folder, bool deleteStorage, nsIMsgWindow *msgWindow)
 {
   // first, find the folder we're looking to delete
   nsresult rv = NS_OK;
 
@@ -3639,17 +3639,17 @@ NS_IMETHODIMP nsMsgDBFolder::PropagateDe
       rv = child->PropagateDelete(folder, deleteStorage, msgWindow);
   }
 
   return rv;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::RecursiveDelete(bool deleteStorage, nsIMsgWindow *msgWindow)
 {
-  // If deleteStorage is PR_TRUE, recursively deletes disk storage for this folder
+  // If deleteStorage is true, recursively deletes disk storage for this folder
   // and all its subfolders.
   // Regardless of deleteStorage, always unlinks them from the children lists and
   // frees memory for the subfolders but NOT for _this_
 
   nsresult status = NS_OK;
   nsCOMPtr <nsILocalFile> dbPath;
 
   // first remove the deleted folder from the folder cache;
@@ -3753,17 +3753,17 @@ NS_IMETHODIMP nsMsgDBFolder::AddSubfolde
       uri += "Archives";
     else
       uri += escapedName.get();
   }
   else
     uri += escapedName.get();
 
   nsCOMPtr <nsIMsgFolder> msgFolder;
-  rv = GetChildWithURI(uri, PR_FALSE/*deep*/, PR_TRUE /*case Insensitive*/, getter_AddRefs(msgFolder));
+  rv = GetChildWithURI(uri, false/*deep*/, true /*case Insensitive*/, getter_AddRefs(msgFolder));
   if (NS_SUCCEEDED(rv) && msgFolder)
     return NS_MSG_FOLDER_EXISTS;
 
   nsCOMPtr<nsIRDFResource> res;
   rv = rdf->GetResource(uri, getter_AddRefs(res));
   if (NS_FAILED(rv))
     return rv;
 
@@ -3806,17 +3806,17 @@ NS_IMETHODIMP nsMsgDBFolder::AddSubfolde
 
 NS_IMETHODIMP nsMsgDBFolder::Compact(nsIUrlListener *aListener, nsIMsgWindow *aMsgWindow)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::CompactAll(nsIUrlListener *aListener, nsIMsgWindow *aMsgWindow, bool aCompactOfflineAlso)
 {
-  NS_ASSERTION(PR_FALSE, "should be overridden by child class");
+  NS_ASSERTION(false, "should be overridden by child class");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::EmptyTrash(nsIMsgWindow *msgWindow, nsIUrlListener *aListener)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
@@ -3878,17 +3878,17 @@ nsresult nsMsgDBFolder::CreateDirectoryF
   {
     //If the current path isn't a directory, add directory separator
     //and test it out.
     rv = AddDirectorySeparator(path);
     if(NS_FAILED(rv))
       return rv;
 
     //If that doesn't exist, then we have to create this directory
-    pathIsDirectory = PR_FALSE;
+    pathIsDirectory = false;
     path->IsDirectory(&pathIsDirectory);
     if(!pathIsDirectory)
     {
       bool pathExists;
       path->Exists(&pathExists);
       //If for some reason there's a file with the directory separator
       //then we are going to fail.
       rv = pathExists ? NS_MSG_COULD_NOT_CREATE_DIRECTORY : path->Create(nsIFile::DIRECTORY_TYPE, 0700);
@@ -4043,27 +4043,27 @@ NS_IMETHODIMP nsMsgDBFolder::Rename(cons
   if (parentSupport)
   {
     rv = parentFolder->AddSubfolder(aNewName, getter_AddRefs(newFolder));
     if (newFolder)
     {
       newFolder->SetPrettyName(aNewName);
       newFolder->SetFlags(mFlags);
       bool changed = false;
-      MatchOrChangeFilterDestination(newFolder, PR_TRUE /*caseInsenstive*/, &changed);
+      MatchOrChangeFilterDestination(newFolder, true /*caseInsenstive*/, &changed);
       if (changed)
         AlertFilterChanged(msgWindow);
 
       if (count > 0)
         newFolder->RenameSubFolders(msgWindow, this);
 
       if (parentFolder)
       {
         SetParent(nsnull);
-        parentFolder->PropagateDelete(this, PR_FALSE, msgWindow);
+        parentFolder->PropagateDelete(this, false, msgWindow);
         parentFolder->NotifyItemAdded(newFolder);
       }
       folderRenameAtom = MsgGetAtom("RenameCompleted");
       newFolder->NotifyFolderEvent(folderRenameAtom);
     }
   }
   return rv;
 }
@@ -4088,24 +4088,24 @@ NS_IMETHODIMP nsMsgDBFolder::IsAncestorO
   nsresult rv = NS_OK;
 
   PRInt32 count = mSubFolders.Count();
 
   for (PRInt32 i = 0; i < count; i++)
   {
     nsCOMPtr<nsIMsgFolder> folder(mSubFolders[i]);
     if (folder.get() == child)
-      *isAncestor = PR_TRUE;
+      *isAncestor = true;
     else
       folder->IsAncestorOf(child, isAncestor);
 
     if (*isAncestor)
       return NS_OK;
   }
-  *isAncestor = PR_FALSE;
+  *isAncestor = false;
   return rv;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::GenerateUniqueSubfolderName(const nsAString& prefix,
                                                          nsIMsgFolder *otherFolder,
                                                          nsAString& name)
 {
   /* only try 256 times */
@@ -4153,17 +4153,17 @@ NS_IMETHODIMP nsMsgDBFolder::UpdateSumma
 
     FlushToFolderCache();
   }
   return rv;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::SummaryChanged()
 {
-  UpdateSummaryTotals(PR_FALSE);
+  UpdateSummaryTotals(false);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::GetNumUnread(bool deep, PRInt32 *numUnread)
 {
   NS_ENSURE_ARG_POINTER(numUnread);
 
   PRInt32 total = mNumUnreadMessages + mNumPendingUnreadMessages;
@@ -4264,17 +4264,17 @@ void nsMsgDBFolder::ChangeNumPendingTota
 }
 
 NS_IMETHODIMP nsMsgDBFolder::SetFlag(PRUint32 flag)
 {
   // If calling this function causes us to open the db (i.e., it was not
   // open before), we're going to close the db before returning.
   bool dbWasOpen = mDatabase != nsnull;
 
-  ReadDBFolderInfo(PR_FALSE);
+  ReadDBFolderInfo(false);
   // OnFlagChange can be expensive, so don't call it if we don't need to
   bool flagSet;
   nsresult rv;
 
   if (NS_FAILED(rv = GetFlag(flag, &flagSet)))
     return rv;
 
   if (!flagSet)
@@ -4397,17 +4397,17 @@ NS_IMETHODIMP nsMsgDBFolder::GetFoldersW
   NS_ADDREF(*aResult = array);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::ListFoldersWithFlags(PRUint32 aFlags, nsIMutableArray* aFolders)
 {
   NS_ENSURE_ARG_POINTER(aFolders);
   if ((mFlags & aFlags) == aFlags)
-    aFolders->AppendElement(static_cast<nsRDFResource*>(this), PR_FALSE);
+    aFolders->AppendElement(static_cast<nsRDFResource*>(this), false);
 
   GetSubFolders(nsnull); // initialize mSubFolders
 
   PRInt32 count = mSubFolders.Count();
   for (PRInt32 i = 0; i < count; ++i)
     mSubFolders[i]->ListFoldersWithFlags(aFlags, aFolders);
 
   return NS_OK;
@@ -4422,17 +4422,17 @@ NS_IMETHODIMP nsMsgDBFolder::IsSpecialFo
   if ((mFlags & aFlags) == 0)
   {
     nsCOMPtr<nsIMsgFolder> parentMsgFolder;
     GetParent(getter_AddRefs(parentMsgFolder));
 
     if (parentMsgFolder && aCheckAncestors)
       parentMsgFolder->IsSpecialFolder(aFlags, aCheckAncestors, aIsSpecial);
     else
-      *aIsSpecial = PR_FALSE;
+      *aIsSpecial = false;
   }
   else
   {
     // The user can set their INBOX to be their SENT folder.
     // in that case, we want this folder to act like an INBOX,
     // and not a SENT folder
     *aIsSpecial = !((aFlags & nsMsgFolderFlags::SentMail) &&
                     (mFlags & nsMsgFolderFlags::Inbox));
@@ -4466,69 +4466,69 @@ NS_IMETHODIMP nsMsgDBFolder::GetExpansio
 
   return NS_OK;
 }
 
 
 NS_IMETHODIMP nsMsgDBFolder::GetDeletable(bool *deletable)
 {
   NS_ENSURE_ARG_POINTER(deletable);
-  *deletable = PR_FALSE;
+  *deletable = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::GetRequiresCleanup(bool *requiredCleanup)
 {
   NS_ENSURE_ARG_POINTER(requiredCleanup);
-  *requiredCleanup = PR_FALSE;
+  *requiredCleanup = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::ClearRequiresCleanup()
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::GetKnowsSearchNntpExtension(bool *knowsExtension)
 {
   NS_ENSURE_ARG_POINTER(knowsExtension);
-  *knowsExtension = PR_FALSE;
+  *knowsExtension = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::GetAllowsPosting(bool *allowsPosting)
 {
   NS_ENSURE_ARG_POINTER(allowsPosting);
-  *allowsPosting = PR_TRUE;
+  *allowsPosting = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::GetDisplayRecipients(bool *displayRecipients)
 {
   nsresult rv;
-  *displayRecipients = PR_FALSE;
+  *displayRecipients = false;
   if (mFlags & nsMsgFolderFlags::SentMail && !(mFlags & nsMsgFolderFlags::Inbox))
-    *displayRecipients = PR_TRUE;
+    *displayRecipients = true;
   else if (mFlags & nsMsgFolderFlags::Queue)
-    *displayRecipients = PR_TRUE;
+    *displayRecipients = true;
   else
   {
     // Only mail folders can be FCC folders
     if (mFlags & nsMsgFolderFlags::Mail || mFlags & nsMsgFolderFlags::ImapBox)
     {
       // There's one FCC folder for sent mail, and one for sent news
       nsIMsgFolder *fccFolders[2];
       int numFccFolders = 0;
       for (int i = 0; i < numFccFolders; i++)
       {
         bool isAncestor;
         if (NS_SUCCEEDED(rv = fccFolders[i]->IsAncestorOf(this, &isAncestor)))
         {
           if (isAncestor)
-            *displayRecipients = PR_TRUE;
+            *displayRecipients = true;
         }
         NS_RELEASE(fccFolders[i]);
       }
     }
   }
   return NS_OK;
 }
 
@@ -4715,17 +4715,17 @@ nsMsgDBFolder::GetFilePath(nsILocalFile 
 {
   NS_ENSURE_ARG_POINTER(aFile);
   nsresult rv;
   // make a new nsILocalFile object in case the caller
   // alters the underlying file object.
   nsCOMPtr <nsILocalFile> file = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   if (!mPath)
-    parseURI(PR_TRUE);
+    parseURI(true);
   rv = file->InitWithFile(mPath);
   file.swap(*aFile);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgDBFolder::MarkMessagesRead(nsIArray *messages, bool markRead)
 {
@@ -4812,17 +4812,17 @@ nsMsgDBFolder::SetJunkScoreForMessages(n
     }
   }
   return rv;
 }
 
 NS_IMETHODIMP
 nsMsgDBFolder::ApplyRetentionSettings()
 {
-  return ApplyRetentionSettings(PR_TRUE);
+  return ApplyRetentionSettings(true);
 }
 
 nsresult nsMsgDBFolder::ApplyRetentionSettings(bool deleteViaFolder)
 {
   if (mFlags & nsMsgFolderFlags::Virtual) // ignore virtual folders.
     return NS_OK;
   bool weOpenedDB = !mDatabase;
   nsCOMPtr<nsIMsgRetentionSettings> retentionSettings;
@@ -4876,17 +4876,17 @@ nsMsgDBFolder::CopyMessages(nsIMsgFolder
 }
 
 NS_IMETHODIMP
 nsMsgDBFolder::CopyFolder(nsIMsgFolder* srcFolder,
                         bool isMoveFolder,
                         nsIMsgWindow *window,
                         nsIMsgCopyServiceListener* listener)
 {
-  NS_ASSERTION(PR_FALSE, "should be overridden by child class");
+  NS_ASSERTION(false, "should be overridden by child class");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 nsMsgDBFolder::CopyFileMessage(nsIFile* aFile,
                              nsIMsgDBHdr* messageToReplace,
                              bool isDraftOrTemplate,
                              PRUint32 aNewMsgFlags,
@@ -5109,17 +5109,17 @@ NS_IMETHODIMP nsMsgDBFolder::EnableNotif
 
     if (dbBatching)  //only if we do dbBatching we need to get db
       GetMsgDatabase(getter_AddRefs(database));
 
     if (enable)
     {
       if (database)
         database->EndBatch();
-      UpdateSummaryTotals(PR_TRUE);
+      UpdateSummaryTotals(true);
     }
     else if (database)
       return database->StartBatch();
     return NS_OK;
   }
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
@@ -5303,32 +5303,32 @@ nsresult
 nsMsgDBFolder::GetWarnFilterChanged(bool *aVal)
 {
   NS_ENSURE_ARG(aVal);
   nsresult rv;
   nsCOMPtr<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   rv = prefBranch->GetBoolPref(PREF_MAIL_WARN_FILTER_CHANGED, aVal);
   if (NS_FAILED(rv))
-    *aVal = PR_FALSE;
+    *aVal = false;
   return NS_OK;
 }
 
 nsresult
 nsMsgDBFolder::SetWarnFilterChanged(bool aVal)
 {
   nsresult rv=NS_OK;
   nsCOMPtr<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   return prefBranch->SetBoolPref(PREF_MAIL_WARN_FILTER_CHANGED, aVal);
 }
 
 NS_IMETHODIMP nsMsgDBFolder::NotifyCompactCompleted()
 {
-  NS_ASSERTION(PR_FALSE, "should be overridden by child class");
+  NS_ASSERTION(false, "should be overridden by child class");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 nsresult nsMsgDBFolder::CloseDBIfFolderNotOpen()
 {
   nsresult rv;
   nsCOMPtr<nsIMsgMailSession> session =
            do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv);
@@ -5337,17 +5337,17 @@ nsresult nsMsgDBFolder::CloseDBIfFolderN
   session->IsFolderOpenInWindow(this, &folderOpen);
   if (!folderOpen && ! (mFlags & (nsMsgFolderFlags::Trash | nsMsgFolderFlags::Inbox)))
     SetMsgDatabase(nsnull);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::SetSortOrder(PRInt32 order)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented");
+  NS_ASSERTION(false, "not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::GetSortOrder(PRInt32 *order)
 {
   NS_ENSURE_ARG_POINTER(order);
 
   PRUint32 flags;
@@ -5504,70 +5504,70 @@ NS_IMETHODIMP nsMsgDBFolder::GetMsgTextF
     if (bytesRead > bytesToRead)
       break;
 
     // Process the headers, looking for things we need
     rv = mimeHeaders->Initialize(msgHeaders.get(), msgHeaders.Length());
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCAutoString contentTypeHdr;
-    mimeHeaders->ExtractHeader("Content-Type", PR_FALSE, getter_Copies(contentTypeHdr));
+    mimeHeaders->ExtractHeader("Content-Type", false, getter_Copies(contentTypeHdr));
 
     // Get the content type
     // If we don't have a content type, then we assign text/plain
     // this is in violation of the RFC for multipart/digest, though
     // Also, if we've just passed an end boundary, we're going to ignore this.
     if (!justPassedEndBoundary && contentTypeHdr.IsEmpty())
       contentType.Assign(NS_LITERAL_STRING("text/plain"));
     else
-      mimeHdrParam->GetParameter(contentTypeHdr, nsnull, EmptyCString(), PR_FALSE, nsnull, contentType);
-
-    justPassedEndBoundary = PR_FALSE;
+      mimeHdrParam->GetParameter(contentTypeHdr, nsnull, EmptyCString(), false, nsnull, contentType);
+
+    justPassedEndBoundary = false;
 
     // If we are multipart, then we need to get the boundary
     if (StringBeginsWith(contentType, NS_LITERAL_STRING("multipart/"), nsCaseInsensitiveStringComparator()))
     {
       nsAutoString boundaryParam;
-      mimeHdrParam->GetParameter(contentTypeHdr, "boundary", EmptyCString(), PR_FALSE, nsnull, boundaryParam);
+      mimeHdrParam->GetParameter(contentTypeHdr, "boundary", EmptyCString(), false, nsnull, boundaryParam);
       if (!boundaryParam.IsEmpty())
       {
         nsCAutoString boundary(NS_LITERAL_CSTRING("--"));
         boundary.Append(NS_ConvertUTF16toUTF8(boundaryParam));
         boundaryStack.AppendElement(boundary);
       }
     }
 
     // If we are message/rfc822, then there's another header block coming up
     else if (contentType.LowerCaseEqualsLiteral("message/rfc822"))
       continue;
 
     // If we are a text part, then we want it
     else if (StringBeginsWith(contentType, NS_LITERAL_STRING("text/"), nsCaseInsensitiveStringComparator()))
     {
-      inMsgBody = PR_TRUE;
+      inMsgBody = true;
 
       if (contentType.LowerCaseEqualsLiteral("text/html"))
-        msgBodyIsHtml = PR_TRUE;
+        msgBodyIsHtml = true;
 
       // Also get the charset if required
       if (charset.IsEmpty())
       {
         nsAutoString charsetW;
-        mimeHdrParam->GetParameter(contentTypeHdr, "charset", EmptyCString(), PR_FALSE, nsnull, charsetW);
+        mimeHdrParam->GetParameter(contentTypeHdr, "charset", EmptyCString(), false, nsnull, charsetW);
         charset.Assign(NS_ConvertUTF16toUTF8(charsetW));
       }
 
       // Finally, get the encoding
       nsCAutoString encodingHdr;
-      mimeHeaders->ExtractHeader("Content-Transfer-Encoding", PR_FALSE, getter_Copies(encodingHdr));
+      mimeHeaders->ExtractHeader("Content-Transfer-Encoding", false, getter_Copies(encodingHdr));
       if (!encodingHdr.IsEmpty())
-        mimeHdrParam->GetParameter(encodingHdr, nsnull, EmptyCString(), PR_FALSE, nsnull, encoding);
+        mimeHdrParam->GetParameter(encodingHdr, nsnull, EmptyCString(), false, nsnull, encoding);
 
       if (encoding.LowerCaseEqualsLiteral("base64"))
-        isBase64 = PR_TRUE;
+        isBase64 = true;
     }
 
     // We need to consume the rest, until the next headers
     PRUint32 count = boundaryStack.Length();
     nsCAutoString boundary;
     nsCAutoString endBoundary;
     if (count)
     {
@@ -5581,26 +5581,26 @@ NS_IMETHODIMP nsMsgDBFolder::GetMsgTextF
       NS_ENSURE_SUCCESS(rv, rv);
 
       if (count)
       {
         // If we've reached a MIME final delimiter, pop and break
         if (StringBeginsWith(curLine, endBoundary))
         {
           if (inMsgBody)
-            reachedEndBody = PR_TRUE;
+            reachedEndBody = true;
           boundaryStack.RemoveElementAt(count - 1);
-          justPassedEndBoundary = PR_TRUE;
+          justPassedEndBoundary = true;
           break;
         }
         // If we've reached the end of this MIME part, we can break
         if (StringBeginsWith(curLine, boundary))
         {
           if (inMsgBody)
-            reachedEndBody = PR_TRUE;
+            reachedEndBody = true;
           break;
         }
       }
 
       // Only append the text if we're actually in the message body
       if (inMsgBody)
       {
         msgText.Append(curLine);
@@ -5624,17 +5624,17 @@ NS_IMETHODIMP nsMsgDBFolder::GetMsgTextF
   nsString unicodeMsgBodyStr;
   ConvertToUnicode(charset.get(), msgText, unicodeMsgBodyStr);
 
   // now we've got a msg body. If it's html, convert it to plain text.
   if (msgBodyIsHtml && aStripHTMLTags)
     ConvertMsgSnippetToPlainText(unicodeMsgBodyStr, unicodeMsgBodyStr);
 
   // We want to remove any whitespace from the beginning and end of the string
-  unicodeMsgBodyStr.Trim(" \t\r\n", PR_TRUE, PR_TRUE);
+  unicodeMsgBodyStr.Trim(" \t\r\n", true, true);
 
   // step 3, optionally remove quoted text from the snippet
   nsString compressedQuotesMsgStr;
   if (aCompressQuotes)
     compressQuotesInMsgSnippet(unicodeMsgBodyStr, compressedQuotesMsgStr);
 
   // now convert back to utf-8 which is more convenient for storage
   CopyUTF16toUTF8(aCompressQuotes ? compressedQuotesMsgStr : unicodeMsgBodyStr, aMsgText);
@@ -5705,24 +5705,24 @@ void nsMsgDBFolder::compressQuotesInMsgS
       // tweaking later.
       // Try to strip the citation. If the current line ends with a ':' and the next line
       // looks like a quoted reply (starts with a ">") skip the current line
       if (StringBeginsWith(currentLine, NS_LITERAL_STRING(">")) ||
           (lineFeedPos + 1 < msgBodyStrLen  && lineFeedPos
           && aMsgSnippet[lineFeedPos - 1] == PRUnichar(':')
           && aMsgSnippet[lineFeedPos + 1] == PRUnichar('>')))
       {
-        lastLineWasAQuote = PR_TRUE;
+        lastLineWasAQuote = true;
       }
       else if (!currentLine.IsEmpty())
       {
         if (lastLineWasAQuote)
         {
           aCompressedQuotes += NS_LITERAL_STRING(" ... ");
-          lastLineWasAQuote = PR_FALSE;
+          lastLineWasAQuote = false;
         }
 
         aCompressedQuotes += currentLine;
         aCompressedQuotes += PRUnichar(' '); // don't forget to substitute a space for the line feed
       }
 
       offset = lineFeedPos + 1;
     }
@@ -5752,44 +5752,44 @@ NS_IMETHODIMP nsMsgDBFolder::ConvertMsgS
   NS_ENSURE_TRUE(textSink, NS_ERROR_FAILURE);
   PRUint32 flags = nsIDocumentEncoder::OutputLFLineBreak
                    | nsIDocumentEncoder::OutputNoScriptContent
                    | nsIDocumentEncoder::OutputNoFramesContent
                    | nsIDocumentEncoder::OutputBodyOnly;
 
   textSink->Initialize(&bodyText, flags, 80);
   parser->SetContentSink(sink);
-  rv = parser->Parse(aMessageText, 0, NS_LITERAL_CSTRING("text/html"), PR_TRUE);
+  rv = parser->Parse(aMessageText, 0, NS_LITERAL_CSTRING("text/html"), true);
   aOutText.Assign(bodyText);
   return rv;
 }
 
 nsresult nsMsgDBFolder::GetMsgPreviewTextFromStream(nsIMsgDBHdr *msgHdr, nsIInputStream *stream)
 {
   nsCString msgBody;
   nsCAutoString charset;
   msgHdr->GetCharset(getter_Copies(charset));
   nsCAutoString contentType;
-  nsresult rv = GetMsgTextFromStream(stream, charset, 4096, 255, PR_TRUE, PR_TRUE, contentType, msgBody);
+  nsresult rv = GetMsgTextFromStream(stream, charset, 4096, 255, true, true, contentType, msgBody);
   // replaces all tabs and line returns with a space, 
   // then trims off leading and trailing white space
   MsgCompressWhitespace(msgBody);
   msgHdr->SetStringProperty("preview", msgBody.get());
   return rv;
 }
 
 void nsMsgDBFolder::UpdateTimestamps(bool allowUndo)
 {
   if (!(mFlags & (nsMsgFolderFlags::Trash|nsMsgFolderFlags::Junk)))
   {
     SetMRUTime();
     if (allowUndo) // This is a proxy for a user-initiated act.
     {
       bool isArchive;
-      IsSpecialFolder(nsMsgFolderFlags::Archive, PR_TRUE, &isArchive);
+      IsSpecialFolder(nsMsgFolderFlags::Archive, true, &isArchive);
       if (!isArchive)
       {
         SetMRMTime();
         nsCOMPtr<nsIAtom> MRMTimeChangedAtom = MsgGetAtom("MRMTimeChanged");
         NotifyFolderEvent(MRMTimeChangedAtom);
       }
     }
   }
--- a/mailnews/base/util/nsMsgFileStream.cpp
+++ b/mailnews/base/util/nsMsgFileStream.cpp
@@ -25,17 +25,17 @@ ErrorAccordingToNSPR()
       case PR_NO_ACCESS_RIGHTS_ERROR:           return NS_ERROR_FILE_ACCESS_DENIED;
       default:                                  return NS_ERROR_FAILURE;
     }
 }
 
 nsMsgFileStream::nsMsgFileStream() 
 {
   mFileDesc = nsnull;
-  mSeekedToEnd = PR_FALSE;
+  mSeekedToEnd = false;
 }
 
 nsMsgFileStream::~nsMsgFileStream()
 {
   if (mFileDesc)
     PR_Close(mFileDesc);
 }
 
@@ -132,17 +132,17 @@ NS_IMETHODIMP nsMsgFileStream::Read(char
 NS_IMETHODIMP nsMsgFileStream::ReadSegments(nsWriteSegmentFun aWriter, void * aClosure, PRUint32 aCount, PRUint32 *_retval)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 /* boolean isNonBlocking (); */
 NS_IMETHODIMP nsMsgFileStream::IsNonBlocking(bool *aNonBlocking)
 {
-  *aNonBlocking = PR_FALSE;
+  *aNonBlocking = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgFileStream::Write(const char *buf, PRUint32 count, PRUint32 *result)
 {
   if (mFileDesc == nsnull)
     return NS_BASE_STREAM_CLOSED;
--- a/mailnews/base/util/nsMsgI18N.cpp
+++ b/mailnews/base/util/nsMsgI18N.cpp
@@ -228,17 +228,17 @@ void nsMsgI18NTextFileCharset(nsACString
     aCharset.Assign("ISO-8859-1");
 }
 
 // MIME encoder, output string should be freed by PR_FREE
 // XXX : fix callers later to avoid allocation and copy
 char * nsMsgI18NEncodeMimePartIIStr(const char *header, bool structured, const char *charset, PRInt32 fieldnamelen, bool usemime) 
 {
   // No MIME, convert to the outgoing mail charset.
-  if (PR_FALSE == usemime) {
+  if (false == usemime) {
     nsCAutoString convertedStr;
     if (NS_SUCCEEDED(ConvertFromUnicode(charset, NS_ConvertUTF8toUTF16(header),
                                         convertedStr)))
       return PL_strdup(convertedStr.get());
     else
       return PL_strdup(header);
   }
 
@@ -274,17 +274,17 @@ bool nsMsgI18Nmultibyte_charset(const ch
   }
 
   return result;
 }
 
 bool nsMsgI18Ncheck_data_in_charset_range(const char *charset, const PRUnichar* inString, char **fallbackCharset)
 {
   if (!charset || !*charset || !inString || !*inString)
-    return PR_TRUE;
+    return true;
 
   nsresult res;
   bool result = true;
   
   nsCOMPtr <nsICharsetConverterManager> ccm = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &res);
 
   if (NS_SUCCEEDED(res)) {
     nsCOMPtr <nsIUnicodeEncoder> encoder;
@@ -301,17 +301,17 @@ bool nsMsgI18Ncheck_data_in_charset_rang
       PRInt32 dstLength;
 
       // convert from unicode
       while (consumedLen < originalLen) {
         srcLen = originalLen - consumedLen;
         dstLength = 512;
         res = encoder->Convert(currentSrcPtr, &srcLen, localBuff, &dstLength);
         if (NS_ERROR_UENC_NOMAPPING == res) {
-          result = PR_FALSE;
+          result = false;
           break;
         }
         else if (NS_FAILED(res) || (0 == dstLength))
           break;
 
         currentSrcPtr += srcLen;
         consumedLen = currentSrcPtr - originalPtr; // src length used so far
       }
@@ -344,17 +344,17 @@ nsMsgI18NParseMetaCharset(nsILocalFile* 
     NS_ERROR("file is a directory");
     return charset; 
   }
 
   nsresult rv;
   nsCOMPtr <nsIFileInputStream> fileStream = do_CreateInstance(NS_LOCALFILEINPUTSTREAM_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, charset);
   
-  rv = fileStream->Init(file, PR_RDONLY, 0664, PR_FALSE);
+  rv = fileStream->Init(file, PR_RDONLY, 0664, false);
   nsCOMPtr <nsILineInputStream> lineStream = do_QueryInterface(fileStream, &rv);
 
   nsCString curLine;
   bool more = true;
   while (NS_SUCCEEDED(rv) && more) { 
     rv = lineStream->ReadLine(curLine, &more); 
     if (curLine.IsEmpty()) 
       continue; 
@@ -404,28 +404,28 @@ nsresult nsMsgI18NSaveAsCharset(const ch
   NS_ENSURE_ARG_POINTER(charset);
   NS_ENSURE_ARG_POINTER(inString);
   NS_ENSURE_ARG_POINTER(outString);
 
   *outString = nsnull;
 
   if (NS_IsAscii(inString)) {
     if (isAsciiOnly)
-      *isAsciiOnly = PR_TRUE;
+      *isAsciiOnly = true;
     *outString = ToNewCString(NS_LossyConvertUTF16toASCII(inString));
     return (nsnull != *outString) ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
   }
   if (isAsciiOnly)
-    *isAsciiOnly = PR_FALSE;
+    *isAsciiOnly = false;
 
   bool bTEXT_HTML = false;
   nsresult res;
 
   if (!PL_strcasecmp(contentType, TEXT_HTML)) {
-    bTEXT_HTML = PR_TRUE;
+    bTEXT_HTML = true;
   }
   else if (PL_strcasecmp(contentType, TEXT_PLAIN)) {
     return NS_ERROR_ILLEGAL_VALUE;  // not supported type
   }
 
   nsCOMPtr <nsICharsetAlias> calias =
     do_GetService(NS_CHARSETALIAS_CONTRACTID, &res);
   NS_ENSURE_SUCCESS(res, res);
--- a/mailnews/base/util/nsMsgI18N.h
+++ b/mailnews/base/util/nsMsgI18N.h
@@ -108,30 +108,30 @@ NS_MSG_BASE void nsMsgI18NTextFileCharse
  * @param inString    [IN] Unicode string to convert.
  * @param outString   [OUT] Converted output string.
  * @return            nsresult.
  */
 NS_MSG_BASE nsresult nsMsgI18NConvertFromUnicode(const char* aCharset,
                                                  const nsString& inString,
                                                  nsACString& outString,
                                                  bool aIsCharsetCanonical =
-                                                        PR_FALSE);
+                                                        false);
 /**
  * Convert from charset to unicode.
  *
  * @param charset     [IN] Charset name.
  * @param inString    [IN] Input string to convert.
  * @param outString   [OUT] Output unicode string.
  * @return            nsresult.
  */
 NS_MSG_BASE nsresult nsMsgI18NConvertToUnicode(const char* aCharset,
                                                const nsCString& inString,
                                                nsAString& outString,
                                                bool aIsCharsetCanonical =
-                                                      PR_FALSE);
+                                                      false);
 /**
  * Parse for META charset.
  *
  * @param file    [IN] A nsILocalFile.
  * @return            A charset name or empty string if not found.
  */
 NS_MSG_BASE const char *nsMsgI18NParseMetaCharset(nsILocalFile* file);
 
@@ -187,23 +187,23 @@ NS_MSG_BASE void nsMsgI18NConvertRawByte
 NS_MSG_BASE void nsMsgI18NConvertRawBytesToUTF8(const nsCString& inString, 
                                                 const char* charset,
                                                 nsACString& outString);
 
 // inline forwarders to avoid littering with 'x-imap4-.....'
 inline nsresult CopyUTF16toMUTF7(const nsString &aSrc, nsACString& aDest)
 {
     return nsMsgI18NConvertFromUnicode("x-imap4-modified-utf7", aSrc,
-                                       aDest, PR_TRUE);
+                                       aDest, true);
 }
 
 inline nsresult CopyMUTF7toUTF16(const nsCString& aSrc, nsAString& aDest)
 {
     return nsMsgI18NConvertToUnicode("x-imap4-modified-utf7", aSrc,
-                                     aDest, PR_TRUE);
+                                     aDest, true);
 }
 
 inline nsresult ConvertToUnicode(const char* charset,
                                  const nsCString &aSrc, nsAString& aDest)
 {
     return nsMsgI18NConvertToUnicode(charset, aSrc, aDest);
 }
 
--- a/mailnews/base/util/nsMsgIdentity.cpp
+++ b/mailnews/base/util/nsMsgIdentity.cpp
@@ -515,17 +515,17 @@ NS_IMETHODIMP nsMsgIdentity::SetBoolAttr
 }
 
 NS_IMETHODIMP nsMsgIdentity::GetBoolAttribute(const char *aName, bool *val)
 {
   NS_ENSURE_ARG_POINTER(val);
   if (!mPrefBranch)
     return NS_ERROR_NOT_INITIALIZED;
 
-  *val = PR_FALSE;
+  *val = false;
 
   if (NS_FAILED(mPrefBranch->GetBoolPref(aName, val)))
     mDefPrefBranch->GetBoolPref(aName, val);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgIdentity::SetIntAttribute(const char *aName, PRInt32 val)
--- a/mailnews/base/util/nsMsgIncomingServer.cpp
+++ b/mailnews/base/util/nsMsgIncomingServer.cpp
@@ -79,20 +79,20 @@
 #include "nsAppDirectoryServiceDefs.h"
 
 #define PORT_NOT_SET -1
 
 nsMsgIncomingServer::nsMsgIncomingServer():
     m_rootFolder(0),
     m_numMsgsDownloaded(0),
     m_biffState(nsIMsgFolder::nsMsgBiffState_Unknown),
-    m_serverBusy(PR_FALSE),
-    m_canHaveFilters(PR_TRUE),
-    m_displayStartupPage(PR_TRUE),
-    mPerformingBiff(PR_FALSE)
+    m_serverBusy(false),
+    m_canHaveFilters(true),
+    m_displayStartupPage(true),
+    mPerformingBiff(false)
 { 
   m_downloadedHdrs.Init(50);
 }
 
 nsMsgIncomingServer::~nsMsgIncomingServer()
 {
 }
 
@@ -223,17 +223,17 @@ NS_IMPL_GETSET(nsMsgIncomingServer, Biff
 
 NS_IMETHODIMP nsMsgIncomingServer::WriteToFolderCache(nsIMsgFolderCache *folderCache)
 {
   nsresult rv = NS_OK;
   if (m_rootFolder)
   {
     nsCOMPtr <nsIMsgFolder> msgFolder = do_QueryInterface(m_rootFolder, &rv);
     if (NS_SUCCEEDED(rv) && msgFolder)
-      rv = msgFolder->WriteToFolderCache(folderCache, PR_TRUE /* deep */);
+      rv = msgFolder->WriteToFolderCache(folderCache, true /* deep */);
   }
   return rv;
 }
 
 NS_IMETHODIMP
 nsMsgIncomingServer::Shutdown()
 {
   nsresult rv = CloseCachedConnections();
@@ -264,17 +264,17 @@ nsMsgIncomingServer::CloseCachedConnecti
   // derived class should override if they cache connections.
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgIncomingServer::GetDownloadMessagesAtStartup(bool *getMessagesAtStartup)
 {
   // derived class should override if they need to do this.
-  *getMessagesAtStartup = PR_FALSE;
+  *getMessagesAtStartup = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgIncomingServer::GetCanHaveFilters(bool *canHaveFilters)
 {
   NS_ENSURE_ARG_POINTER(canHaveFilters);
   *canHaveFilters = m_canHaveFilters;
@@ -287,62 +287,62 @@ nsMsgIncomingServer::SetCanHaveFilters(b
   m_canHaveFilters = aCanHaveFilters;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgIncomingServer::GetCanBeDefaultServer(bool *canBeDefaultServer)
 {
   // derived class should override if they need to do this.
-  *canBeDefaultServer = PR_FALSE;
+  *canBeDefaultServer = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgIncomingServer::GetCanSearchMessages(bool *canSearchMessages)
 {
   // derived class should override if they need to do this.
   NS_ENSURE_ARG_POINTER(canSearchMessages);
-  *canSearchMessages = PR_FALSE;
+  *canSearchMessages = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgIncomingServer::GetCanCompactFoldersOnServer(bool *canCompactFoldersOnServer)
 {
   // derived class should override if they need to do this.
   NS_ENSURE_ARG_POINTER(canCompactFoldersOnServer);
-  *canCompactFoldersOnServer = PR_TRUE;
+  *canCompactFoldersOnServer = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgIncomingServer::GetCanUndoDeleteOnServer(bool *canUndoDeleteOnServer)
 {
   // derived class should override if they need to do this.
   NS_ENSURE_ARG_POINTER(canUndoDeleteOnServer);
-  *canUndoDeleteOnServer = PR_TRUE;
+  *canUndoDeleteOnServer = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgIncomingServer::GetCanEmptyTrashOnExit(bool *canEmptyTrashOnExit)
 {
   // derived class should override if they need to do this.
   NS_ENSURE_ARG_POINTER(canEmptyTrashOnExit);
-  *canEmptyTrashOnExit = PR_TRUE;
+  *canEmptyTrashOnExit = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgIncomingServer::GetIsSecureServer(bool *isSecureServer)
 {
   // derived class should override if they need to do this.
   NS_ENSURE_ARG_POINTER(isSecureServer);
-  *isSecureServer = PR_TRUE;
+  *isSecureServer = true;
   return NS_OK;
 }
 
 // construct <localStoreType>://[<username>@]<hostname
 NS_IMETHODIMP
 nsMsgIncomingServer::GetServerURI(nsACString& aResult)
 {
   nsresult rv;
@@ -415,17 +415,17 @@ nsMsgIncomingServer::CreateRootFolder()
 NS_IMETHODIMP
 nsMsgIncomingServer::GetBoolValue(const char *prefname,
                                  bool *val)
 {
   if (!mPrefBranch)
     return NS_ERROR_NOT_INITIALIZED;
 
   NS_ENSURE_ARG_POINTER(val);
-  *val = PR_FALSE;
+  *val = false;
 
   if (NS_FAILED(mPrefBranch->GetBoolPref(prefname, val)))
     mDefPrefBranch->GetBoolPref(prefname, val);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
@@ -695,17 +695,17 @@ NS_IMETHODIMP nsMsgIncomingServer::GetPa
 {
   aPassword = m_password;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgIncomingServer::GetServerRequiresPasswordForBiff(bool *aServerRequiresPasswordForBiff)
 {
   NS_ENSURE_ARG_POINTER(aServerRequiresPasswordForBiff);
-  *aServerRequiresPasswordForBiff = PR_TRUE;
+  *aServerRequiresPasswordForBiff = true;
   return NS_OK;
 }
 
 // This sets m_password if we find a password in the pw mgr.
 nsresult nsMsgIncomingServer::GetPasswordWithoutUI()
 {
   nsresult rv;
   nsCOMPtr<nsILoginManager> loginMgr(do_GetService(NS_LOGINMANAGER_CONTRACTID,
@@ -1064,23 +1064,23 @@ nsMsgIncomingServer::RemoveFiles()
   // somewhere they didn't want deleted.
   // until we tell them, we shouldn't do the delete.
   nsCString deferredToAccount;
   GetCharValue("deferred_to_account", deferredToAccount);
   bool isDeferredTo = true;
   GetIsDeferredTo(&isDeferredTo);
   if (!deferredToAccount.IsEmpty() || isDeferredTo)
   {
-    NS_ASSERTION(PR_FALSE, "shouldn't remove files for a deferred account");
+    NS_ASSERTION(false, "shouldn't remove files for a deferred account");
     return NS_ERROR_FAILURE;
   }
   nsCOMPtr <nsILocalFile> localPath;
   nsresult rv = GetLocalPath(getter_AddRefs(localPath));
   NS_ENSURE_SUCCESS(rv, rv);
-  return localPath->Remove(PR_TRUE);
+  return localPath->Remove(true);
 }
 
 NS_IMETHODIMP
 nsMsgIncomingServer::SetFilterList(nsIMsgFilterList *aFilterList)
 {
   mFilterList = aFilterList;
   return NS_OK;
 }
@@ -1586,17 +1586,17 @@ NS_IMETHODIMP nsMsgIncomingServer::SetDo
   SetBoolValue("downloadByDate", downloadByDate);
   return SetIntValue("ageLimit", ageLimitOfMsgsToDownload);
 }
 
 NS_IMETHODIMP
 nsMsgIncomingServer::GetSupportsDiskSpace(bool *aSupportsDiskSpace)
 {
   NS_ENSURE_ARG_POINTER(aSupportsDiskSpace);
-  *aSupportsDiskSpace = PR_TRUE;
+  *aSupportsDiskSpace = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgIncomingServer::GetOfflineSupportLevel(PRInt32 *aSupportLevel)
 {
   NS_ENSURE_ARG_POINTER(aSupportLevel);
   nsresult rv;
@@ -1627,17 +1627,17 @@ NS_IMETHODIMP nsMsgIncomingServer::Displ
   rv = bundleService->CreateBundle(BASE_MSGS_URL, getter_AddRefs(bundle));
   NS_ENSURE_SUCCESS(rv, rv);
   if (bundle)
   {
     nsString errorMsgTitle;
     nsString errorMsgBody;
     bundle->GetStringFromName(NS_LITERAL_STRING("nocachedbodybody").get(), getter_Copies(errorMsgBody));
     bundle->GetStringFromName(NS_LITERAL_STRING("nocachedbodytitle").get(),  getter_Copies(errorMsgTitle));
-    aMsgWindow->DisplayHTMLInMessagePane(errorMsgTitle, errorMsgBody, PR_TRUE);
+    aMsgWindow->DisplayHTMLInMessagePane(errorMsgTitle, errorMsgBody, true);
   }
   
   return NS_OK;
 }
 
 // Called only during the migration process. A unique name is generated for the
 // migrated account.
 NS_IMETHODIMP
@@ -1767,17 +1767,17 @@ NS_IMETHODIMP nsMsgIncomingServer::SetSo
 }
 
 // Check if the password is available and return a boolean indicating whether
 // it is being authenticated or not.
 NS_IMETHODIMP
 nsMsgIncomingServer::GetPasswordPromptRequired(bool *aPasswordIsRequired)
 {
   NS_ENSURE_ARG_POINTER(aPasswordIsRequired);
-  *aPasswordIsRequired = PR_TRUE;
+  *aPasswordIsRequired = true;
 
   // If the password is not even required for biff we don't need to check any further
   nsresult rv = GetServerRequiresPasswordForBiff(aPasswordIsRequired);
   NS_ENSURE_SUCCESS(rv, rv);
   if (!*aPasswordIsRequired)
     return NS_OK;
 
   // If the password is empty, check to see if it is stored and to be retrieved
@@ -1853,17 +1853,17 @@ nsMsgIncomingServer::ConfigureTemporaryS
   nsCOMPtr <nsILocalFile> localFile = do_QueryInterface(file);
   rv = filterService->OpenFilterList(localFile, NULL, NULL, getter_AddRefs(serverFilterList));
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = serverFilterList->GetFilterNamed(yesFilterName,
                                   getter_AddRefs(newFilter));
   if (newFilter && serverFilterTrustFlags & nsISpamSettings::TRUST_POSITIVES)
   {
-    newFilter->SetTemporary(PR_TRUE);
+    newFilter->SetTemporary(true);
     // check if we're supposed to move junk mail to junk folder; if so,
     // add filter action to do so.
 
     /*
      * We don't want this filter to activate on messages that have
      *  been marked by the user as not spam. This occurs when messages that
      *  were marked as good are moved back into the inbox. But to
      *  do this with a filter, we have to add a boolean term. That requires
@@ -1877,33 +1877,33 @@ nsMsgIncomingServer::ConfigureTemporaryS
     PRUint32 count = 0;
     searchTerms->Count(&count);
     if (count > 1) // don't need to group a single term
     {
       // beginGrouping the first term, and endGrouping the last term
       nsCOMPtr<nsIMsgSearchTerm> firstTerm(do_QueryElementAt(searchTerms,
                                                              0, &rv));
       NS_ENSURE_SUCCESS(rv,rv);
-      firstTerm->SetBeginsGrouping(PR_TRUE);
+      firstTerm->SetBeginsGrouping(true);
 
       nsCOMPtr<nsIMsgSearchTerm> lastTerm(do_QueryElementAt(searchTerms,
                                                             count - 1, &rv));
       NS_ENSURE_SUCCESS(rv,rv);
-      lastTerm->SetEndsGrouping(PR_TRUE);
+      lastTerm->SetEndsGrouping(true);
     }
 
     // Create a new term, checking if the user set junk status. The term will
     // search for junkscoreorigin != "user"
     nsCOMPtr<nsIMsgSearchTerm> searchTerm;
     rv = newFilter->CreateTerm(getter_AddRefs(searchTerm));
     NS_ENSURE_SUCCESS(rv, rv);
 
     searchTerm->SetAttrib(nsMsgSearchAttrib::JunkScoreOrigin);
     searchTerm->SetOp(nsMsgSearchOp::Isnt);
-    searchTerm->SetBooleanAnd(PR_TRUE);
+    searchTerm->SetBooleanAnd(true);
 
     nsCOMPtr<nsIMsgSearchValue> searchValue;
     searchTerm->GetValue(getter_AddRefs(searchValue));
     NS_ENSURE_SUCCESS(rv, rv);
     searchValue->SetAttrib(nsMsgSearchAttrib::JunkScoreOrigin);
     searchValue->SetStr(NS_LITERAL_STRING("user"));
     searchTerm->SetValue(searchValue);
 
@@ -1940,17 +1940,17 @@ nsMsgIncomingServer::ConfigureTemporaryS
     }
     filterList->InsertFilterAt(0, newFilter);
   }
 
   rv = serverFilterList->GetFilterNamed(noFilterName,
                                   getter_AddRefs(newFilter));
   if (newFilter && serverFilterTrustFlags & nsISpamSettings::TRUST_NEGATIVES)
   {
-    newFilter->SetTemporary(PR_TRUE);
+    newFilter->SetTemporary(true);
     filterList->InsertFilterAt(0, newFilter);
   }
 
   return rv;
 }
 
 nsresult
 nsMsgIncomingServer::ConfigureTemporaryReturnReceiptsFilter(nsIMsgFilterList *filterList)
@@ -1995,37 +1995,37 @@ nsMsgIncomingServer::ConfigureTemporaryR
     nsCString actionTargetFolderUri;
     rv = identity->GetFccFolder(actionTargetFolderUri);
     if (!actionTargetFolderUri.IsEmpty())
     {
       filterList->CreateFilter(internalReturnReceiptFilterName,
                                getter_AddRefs(newFilter));
       if (newFilter)
       {
-        newFilter->SetEnabled(PR_TRUE);
+        newFilter->SetEnabled(true);
         // this internal filter is temporary
         // and should not show up in the UI or be written to disk
-        newFilter->SetTemporary(PR_TRUE);
+        newFilter->SetTemporary(true);
 
         nsCOMPtr<nsIMsgSearchTerm> term;
         nsCOMPtr<nsIMsgSearchValue> value;
 
         rv = newFilter->CreateTerm(getter_AddRefs(term));
         if (NS_SUCCEEDED(rv))
         {
           rv = term->GetValue(getter_AddRefs(value));
           if (NS_SUCCEEDED(rv))
           {
             // we need to use OtherHeader + 1 so nsMsgFilter::GetTerm will
             // return our custom header.
             value->SetAttrib(nsMsgSearchAttrib::OtherHeader + 1);
             value->SetStr(NS_LITERAL_STRING("multipart/report"));
             term->SetAttrib(nsMsgSearchAttrib::OtherHeader + 1);
             term->SetOp(nsMsgSearchOp::Contains);
-            term->SetBooleanAnd(PR_TRUE);
+            term->SetBooleanAnd(true);
             term->SetArbitraryHeader(NS_LITERAL_CSTRING("Content-Type"));
             term->SetValue(value);
             newFilter->AppendTerm(term);
           }
         }
         rv = newFilter->CreateTerm(getter_AddRefs(term));
         if (NS_SUCCEEDED(rv))
         {
@@ -2034,17 +2034,17 @@ nsMsgIncomingServer::ConfigureTemporaryR
           {
             // XXX todo
             // determine if ::OtherHeader is the best way to do this.
             // see nsMsgSearchOfflineMail::MatchTerms()
             value->SetAttrib(nsMsgSearchAttrib::OtherHeader + 1);
             value->SetStr(NS_LITERAL_STRING("disposition-notification"));
             term->SetAttrib(nsMsgSearchAttrib::OtherHeader + 1);
             term->SetOp(nsMsgSearchOp::Contains);
-            term->SetBooleanAnd(PR_TRUE);
+            term->SetBooleanAnd(true);
             term->SetArbitraryHeader(NS_LITERAL_CSTRING("Content-Type"));
             term->SetValue(value);
             newFilter->AppendTerm(term);
           }
         }
         nsCOMPtr<nsIMsgRuleAction> filterAction;
         rv = newFilter->CreateAction(getter_AddRefs(filterAction));
         if (NS_SUCCEEDED(rv))
@@ -2077,17 +2077,17 @@ nsMsgIncomingServer::ClearTemporaryRetur
 NS_IMETHODIMP
 nsMsgIncomingServer::GetMsgFolderFromURI(nsIMsgFolder *aFolderResource, const nsACString& aURI, nsIMsgFolder **aFolder)
 {
   nsCOMPtr<nsIMsgFolder> rootMsgFolder;
   nsresult rv = GetRootMsgFolder(getter_AddRefs(rootMsgFolder));
   NS_ENSURE_TRUE(rootMsgFolder, NS_ERROR_UNEXPECTED);
 
   nsCOMPtr <nsIMsgFolder> msgFolder;
-  rv = rootMsgFolder->GetChildWithURI(aURI, PR_TRUE, PR_TRUE /*caseInsensitive*/, getter_AddRefs(msgFolder));
+  rv = rootMsgFolder->GetChildWithURI(aURI, true, true /*caseInsensitive*/, getter_AddRefs(msgFolder));
   if (NS_FAILED(rv) || !msgFolder)
     msgFolder = aFolderResource;
   NS_IF_ADDREF(*aFolder = msgFolder);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgIncomingServer::GetSpamSettings(nsISpamSettings **aSpamSettings)
@@ -2193,25 +2193,25 @@ NS_IMETHODIMP nsMsgIncomingServer::GetIs
         {
           nsCOMPtr <nsIMsgIncomingServer> server (do_QueryElementAt(allServers, i));
           if (server)
           {
             nsCString deferredToAccount;
             server->GetCharValue("deferred_to_account", deferredToAccount);
             if (deferredToAccount.Equals(accountKey))
             {
-              *aIsDeferredTo = PR_TRUE;
+              *aIsDeferredTo = true;
               return NS_OK;
             }
           }
         }
       }
     }
   }
-  *aIsDeferredTo = PR_FALSE;
+  *aIsDeferredTo = false;
   return NS_OK;
 }
 
 const long kMaxDownloadTableSize = 500;
 
 // aClosure is the server, from that we get the cutoff point, below which we evict
 // aData is the arrival index of the msg.
 /* static */PLDHashOperator nsMsgIncomingServer::evictOldEntries(nsCStringHashKey::KeyType aKey, PRInt32 &aData, void *aClosure)
@@ -2224,30 +2224,30 @@ const long kMaxDownloadTableSize = 500;
 
 // hash the concatenation of the message-id and subject as the hash table key,
 // and store the arrival index as the value. To limit the size of the hash table,
 // we just throw out ones with a lower ordinal value than the cut-off point.
 NS_IMETHODIMP nsMsgIncomingServer::IsNewHdrDuplicate(nsIMsgDBHdr *aNewHdr, bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
   NS_ENSURE_ARG_POINTER(aNewHdr);
-  *aResult = PR_FALSE;
+  *aResult = false;
   nsCAutoString strHashKey;
   nsCString messageId, subject;
   aNewHdr->GetMessageId(getter_Copies(messageId));
   strHashKey.Append(messageId);
   aNewHdr->GetSubject(getter_Copies(subject));
   // err on the side of caution and ignore messages w/o subject or messageid.
   if (subject.IsEmpty() || messageId.IsEmpty())
     return NS_OK;
   strHashKey.Append(subject);
   PRInt32 hashValue = 0;
   m_downloadedHdrs.Get(strHashKey, &hashValue);
   if (hashValue)
-    *aResult = PR_TRUE;
+    *aResult = true;
   else
   {
     // we store the current size of the hash table as the hash
     // value - this allows us to delete older entries.
     m_downloadedHdrs.Put(strHashKey, ++m_numMsgsDownloaded);
     // Check if hash table is larger than some reasonable size
     // and if is it, iterate over hash table deleting messages
     // with an arrival index < number of msgs downloaded - half the reasonable size.
--- a/mailnews/base/util/nsMsgKeySet.cpp
+++ b/mailnews/base/util/nsMsgKeySet.cpp
@@ -119,20 +119,20 @@ nsMsgKeySet::~nsMsgKeySet()
 
 bool nsMsgKeySet::Grow()
 {
   PRInt32 new_size;
   PRInt32 *new_data;
   new_size = m_data_size * 2;
   new_data = (PRInt32 *) PR_REALLOC (m_data, sizeof (PRInt32) * new_size);
   if (! new_data)
-    return PR_FALSE;
+    return false;
   m_data_size = new_size;
   m_data = new_data;
-  return PR_TRUE;
+  return true;
 }
 
 
 nsMsgKeySet::nsMsgKeySet(const char* numbers /* , MSG_NewsHost* host */)
 {
   PRInt32 *head, *tail, *end;
     MOZ_COUNT_CTOR(nsMsgKeySet);
 
@@ -400,17 +400,17 @@ nsMsgKeySet::GetLastMember()
   else
     return 0;
 }
 
 void nsMsgKeySet::SetLastMember(PRInt32 newHighWaterMark)
 {
   if (newHighWaterMark < GetLastMember())
   {
-    while (PR_TRUE)
+    while (true)
     {
       if (m_length > 1)
       {
         PRInt32 nextToLast = m_data[m_length - 2];
         PRInt32 curHighWater;
         if (nextToLast < 0)  // is range at end?
         {
           PRInt32 rangeStart = m_data[m_length - 1];
@@ -484,17 +484,17 @@ nsMsgKeySet::GetFirstMember()
 
 /* Re-compresses a `nsMsgKeySet' object.
 
    The assumption is made that the `nsMsgKeySet' is syntactically correct
    (all ranges have a length of at least 1, and all values are non-
    decreasing) but will optimize the compression, for example, merging
    consecutive literals or ranges into one range.
 
-   Returns PR_TRUE if successful, PR_FALSE if there wasn't enough memory to
+   Returns true if successful, false if there wasn't enough memory to
    allocate scratch space.
 
    #### This should be changed to modify the buffer in place.
 
    Also note that we never call Optimize() unless we actually changed
    something, so it's a great place to tell the MSG_NewsHost* that something
    changed.
    */
@@ -508,17 +508,17 @@ nsMsgKeySet::Optimize()
   PRInt32 *output_tail;
   PRInt32 *input_end;
   PRInt32 *output_end;
 
   input_size = m_length;
   output_size = input_size + 1;
   input_tail = m_data;
   output_data = (PRInt32 *) PR_Malloc (sizeof (PRInt32) * output_size);
-  if (!output_data) return PR_FALSE;
+  if (!output_data) return false;
 
   output_tail = output_data;
   input_end = input_tail + input_size;
   output_end = output_data + output_size;
 
   /* We're going to modify the set, so invalidate the cache. */
   m_cached_value = -1;
 
@@ -540,33 +540,33 @@ nsMsgKeySet::Optimize()
       to = from;
 
       /* Copy it over */
       *output_tail++ = *input_tail++;
     }
     NS_ASSERTION(output_tail < output_end, "invalid end of output string");
     if (output_tail >= output_end) {
       PR_Free(output_data);
-      return PR_FALSE;
+      return false;
     }
 
     /* As long as this chunk is followed by consecutive chunks,
        keep extending it. */
     while (input_tail < input_end &&
          ((*input_tail > 0 && /* literal... */
          *input_tail == to + 1) || /* ...and consecutive, or */
         (*input_tail <= 0 && /* range... */
          input_tail[1] == to + 1)) /* ...and consecutive. */
          ) {
       if (! range_p) {
         /* convert the literal to a range. */
         output_tail++;
         output_tail [-2] = 0;
         output_tail [-1] = from;
-        range_p = PR_TRUE;
+        range_p = true;
       }
 
       if (*input_tail > 0) { /* literal */
         output_tail[-2]--; /* increase length by 1 */
         to++;
         input_tail++;
       } else {
         PRInt32 L2 = (- *input_tail) + 1;
@@ -597,17 +597,17 @@ nsMsgKeySet::Optimize()
       /* it's a literal */
       output_tail++;
     }
   }
 
 #ifdef NEWSRC_DOES_HOST_STUFF
   if (m_host) m_host->MarkDirty();
 #endif
-  return PR_TRUE;
+  return true;
 }
 
 
 
 bool
 nsMsgKeySet::IsMember(PRInt32 number)
 {
   bool value = false;
@@ -630,35 +630,35 @@ nsMsgKeySet::IsMember(PRInt32 number)
 
   while (tail < end) {
     if (*tail < 0) {
       /* it's a range */
       PRInt32 from = tail[1];
       PRInt32 to = from + (-(tail[0]));
       if (from > number) {
         /* This range begins after the number - we've passed it. */
-        value = PR_FALSE;
+        value = false;
         goto DONE;
       } else if (to >= number) {
         /* In range. */
-        value = PR_TRUE;
+        value = true;
         goto DONE;
       } else {
         tail += 2;
       }
     }
     else {
       /* it's a literal */
       if (*tail == number) {
         /* bang */
-        value = PR_TRUE;
+        value = true;
         goto DONE;
       } else if (*tail > number) {
         /* This literal is after the number - we've passed it. */
-        value = PR_FALSE;
+        value = false;
         goto DONE;
       } else {
         tail++;
       }
     }
   }
 
 DONE:
@@ -983,17 +983,17 @@ nsMsgKeySet::AddRange(PRInt32 start, PRI
     }
     if (start > b + 1) {
       // No overlap yet.
       EMIT(a, b);
     } else if (end < a - 1) {
       // No overlap, and we passed it.
       EMIT(start, end);
       EMIT(a, b);
-      didit = PR_TRUE;
+      didit = true;
       break;
     } else {
       // The ranges overlap.  Suck this range into our new range, and
       // keep looking for other ranges that might overlap.
       start = start < a ? start : a;
       end = end > b ? end : b;
     }
   }
@@ -1273,79 +1273,79 @@ nsMsgKeySet::test_adder (void)
 {
   const char *string;
   nsMsgKeySet *set;
   char *s;
   PRInt32 i;
 
   START("0-70,72-99,105,107,110-111,117-200");
 
-  FROB(205, PR_TRUE);
-  FROB(206, PR_TRUE);
-  FROB(207, PR_TRUE);
-  FROB(208, PR_TRUE);
-  FROB(208, PR_TRUE);
-  FROB(109, PR_TRUE);
-  FROB(72, PR_TRUE);
+  FROB(205, true);
+  FROB(206, true);
+  FROB(207, true);
+  FROB(208, true);
+  FROB(208, true);
+  FROB(109, true);
+  FROB(72, true);
 
-  FROB(205, PR_FALSE);
-  FROB(206, PR_FALSE);
-  FROB(207, PR_FALSE);
-  FROB(208, PR_FALSE);
-  FROB(208, PR_FALSE);
-  FROB(109, PR_FALSE);
-  FROB(72, PR_FALSE);
+  FROB(205, false);
+  FROB(206, false);
+  FROB(207, false);
+  FROB(208, false);
+  FROB(208, false);
+  FROB(109, false);
+  FROB(72, false);
 
-  FROB(72, PR_TRUE);
-  FROB(109, PR_TRUE);
-  FROB(208, PR_TRUE);
-  FROB(208, PR_TRUE);
-  FROB(207, PR_TRUE);
-  FROB(206, PR_TRUE);
-  FROB(205, PR_TRUE);
+  FROB(72, true);
+  FROB(109, true);
+  FROB(208, true);
+  FROB(208, true);
+  FROB(207, true);
+  FROB(206, true);
+  FROB(205, true);
 
-  FROB(205, PR_FALSE);
-  FROB(206, PR_FALSE);
-  FROB(207, PR_FALSE);
-  FROB(208, PR_FALSE);
-  FROB(208, PR_FALSE);
-  FROB(109, PR_FALSE);
-  FROB(72, PR_FALSE);
+  FROB(205, false);
+  FROB(206, false);
+  FROB(207, false);
+  FROB(208, false);
+  FROB(208, false);
+  FROB(109, false);
+  FROB(72, false);
 
-  FROB(100, PR_TRUE);
-  FROB(101, PR_TRUE);
-  FROB(102, PR_TRUE);
-  FROB(103, PR_TRUE);
-  FROB(106, PR_TRUE);
-  FROB(104, PR_TRUE);
-  FROB(109, PR_TRUE);
-  FROB(108, PR_TRUE);
+  FROB(100, true);
+  FROB(101, true);
+  FROB(102, true);
+  FROB(103, true);
+  FROB(106, true);
+  FROB(104, true);
+  FROB(109, true);
+  FROB(108, true);
   END();
 
-  START("1-6"); FROB(7, PR_FALSE); END();
-  START("1-6"); FROB(6, PR_FALSE); END();
-  START("1-6"); FROB(5, PR_FALSE); END();
-  START("1-6"); FROB(4, PR_FALSE); END();
-  START("1-6"); FROB(3, PR_FALSE); END();
-  START("1-6"); FROB(2, PR_FALSE); END();
-  START("1-6"); FROB(1, PR_FALSE); END();
-  START("1-6"); FROB(0, PR_FALSE); END();
+  START("1-6"); FROB(7, false); END();
+  START("1-6"); FROB(6, false); END();
+  START("1-6"); FROB(5, false); END();
+  START("1-6"); FROB(4, false); END();
+  START("1-6"); FROB(3, false); END();
+  START("1-6"); FROB(2, false); END();
+  START("1-6"); FROB(1, false); END();
+  START("1-6"); FROB(0, false); END();
 
-  START("1-3"); FROB(1, PR_FALSE); END();
-  START("1-3"); FROB(2, PR_FALSE); END();
-  START("1-3"); FROB(3, PR_FALSE); END();
+  START("1-3"); FROB(1, false); END();
+  START("1-3"); FROB(2, false); END();
+  START("1-3"); FROB(3, false); END();
 
-  START("1,3,5-7,9,10"); FROB(5, PR_FALSE); END();
-  START("1,3,5-7,9,10"); FROB(6, PR_FALSE); END();
-  START("1,3,5-7,9,10"); FROB(7, PR_FALSE); FROB(7, PR_TRUE); FROB(8, PR_TRUE);
-  FROB (4, PR_TRUE); FROB (2, PR_FALSE); FROB (2, PR_TRUE);
+  START("1,3,5-7,9,10"); FROB(5, false); END();
+  START("1,3,5-7,9,10"); FROB(6, false); END();
+  START("1,3,5-7,9,10"); FROB(7, false); FROB(7, true); FROB(8, true);
+  FROB (4, true); FROB (2, false); FROB (2, true);
 
-  FROB (4, PR_FALSE); FROB (5, PR_FALSE); FROB (6, PR_FALSE); FROB (7, PR_FALSE);
-  FROB (8, PR_FALSE); FROB (9, PR_FALSE); FROB (10, PR_FALSE); FROB (3, PR_FALSE);
-  FROB (2, PR_FALSE); FROB (1, PR_FALSE); FROB (1, PR_FALSE); FROB (0, PR_FALSE);
+  FROB (4, false); FROB (5, false); FROB (6, false); FROB (7, false);
+  FROB (8, false); FROB (9, false); FROB (10, false); FROB (3, false);
+  FROB (2, false); FROB (1, false); FROB (1, false); FROB (0, false);
   END();
 }
 
 #undef START
 #undef FROB
 #undef END
 
 
@@ -1532,16 +1532,16 @@ nsMsgKeySet::RunTests ()
   test_decoder ("0 - 268435455");
   /* This one overflows - we can't help it.
    test_decoder ("0 - 4294967295"); */
 
   test_adder ();
 
   test_ranges();
 
-  test_member (PR_FALSE);
-  test_member (PR_TRUE);
+  test_member (false);
+  test_member (true);
 
   // test_newsrc ("/u/montulli/.newsrc");
   /* test_newsrc ("/u/jwz/.newsrc");*/
 }
 
 #endif /* DEBUG */
--- a/mailnews/base/util/nsMsgLineBuffer.cpp
+++ b/mailnews/base/util/nsMsgLineBuffer.cpp
@@ -98,17 +98,17 @@ nsresult nsByteArray::AppendBuffer(const
   return ret;
 }
 
 nsMsgLineBuffer::nsMsgLineBuffer(nsMsgLineBufferHandler *handler, bool convertNewlinesP)
 {
   MOZ_COUNT_CTOR(nsMsgLineBuffer);
   m_handler = handler;
   m_convertNewlinesP = convertNewlinesP;
-  m_lookingForCRLF = PR_TRUE;
+  m_lookingForCRLF = true;
 }
 
 nsMsgLineBuffer::~nsMsgLineBuffer()
 {
   MOZ_COUNT_DTOR(nsMsgLineBuffer);
 }
 
 void
@@ -206,17 +206,17 @@ PRInt32  nsMsgLineBuffer::BufferInput(co
         net_buffer = newline;
         m_bufferPos = 0;
     }
     return 0;
 }
 
 PRInt32 nsMsgLineBuffer::HandleLine(char *line, PRUint32 line_length)
 {
-  NS_ASSERTION(PR_FALSE, "must override this method if you don't provide a handler");
+  NS_ASSERTION(false, "must override this method if you don't provide a handler");
   return 0;
 }
 
 PRInt32 nsMsgLineBuffer::ConvertAndSendBuffer()
 {
     /* Convert the line terminator to the native form.
      */
 
@@ -315,33 +315,33 @@ nsresult nsMsgLineStreamBuffer::GrowBuff
 
 void nsMsgLineStreamBuffer::ClearBuffer()
 {
   m_startPos = 0;
   m_numBytesInBuffer = 0;
 }
 
 // aInputStream - the input stream we want to read a line from
-// aPauseForMoreData is returned as PR_TRUE if the stream does not yet contain a line and we must wait for more
+// aPauseForMoreData is returned as true if the stream does not yet contain a line and we must wait for more
 // data to come into the stream.
 // Note to people wishing to modify this function: Be *VERY CAREFUL* this is a critical function used by all of
 // our mail protocols including imap, nntp, and pop. If you screw it up, you could break a lot of stuff.....
 
 char * nsMsgLineStreamBuffer::ReadNextLine(nsIInputStream * aInputStream, PRUint32 &aNumBytesInLine, bool &aPauseForMoreData, nsresult *prv, bool addLineTerminator)
 {
   // try to extract a line from m_inputBuffer. If we don't have an entire line, 
   // then read more bytes out from the stream. If the stream is empty then wait
   // on the monitor for more data to come in.
   
   NS_PRECONDITION(m_dataBuffer && m_dataBufferSize > 0, "invalid input arguments for read next line from input");
 
   if (prv)
     *prv = NS_OK;
   // initialize out values
-  aPauseForMoreData = PR_FALSE;
+  aPauseForMoreData = false;
   aNumBytesInLine = 0;
   char * endOfLine = nsnull;
   char * startOfLine = m_dataBuffer+m_startPos;
   
   if (m_numBytesInBuffer > 0) // any data in our internal buffer?
     endOfLine = PL_strchr(startOfLine, m_lineToken); // see if we already have a line ending...
   
   // it's possible that we got here before the first time we receive data from the server
@@ -429,17 +429,17 @@ char * nsMsgLineStreamBuffer::ReadNextLi
     if (m_eatCRLFs && aNumBytesInLine > 0 && startOfLine[aNumBytesInLine-1] == '\r') // Remove the CR in a CRLF sequence
       aNumBytesInLine--;
     
     // PR_CALLOC zeros out the allocated line
     char* newLine = (char*) PR_CALLOC(aNumBytesInLine + (addLineTerminator ? MSG_LINEBREAK_LEN : 0) + 1);
     if (!newLine)
     {
       aNumBytesInLine = 0;
-      aPauseForMoreData = PR_TRUE;
+      aPauseForMoreData = true;
       return nsnull;
     }
     
     memcpy(newLine, startOfLine, aNumBytesInLine); // copy the string into the new line buffer
     if (addLineTerminator)
     {
       memcpy(newLine + aNumBytesInLine, MSG_LINEBREAK, MSG_LINEBREAK_LEN);
       aNumBytesInLine += MSG_LINEBREAK_LEN;
@@ -453,17 +453,17 @@ char * nsMsgLineStreamBuffer::ReadNextLi
     if (m_numBytesInBuffer)
       m_startPos = endOfLine - m_dataBuffer;
     else
       m_startPos = 0;
     
     return newLine;
   }
   
-  aPauseForMoreData = PR_TRUE;
+  aPauseForMoreData = true;
   return nsnull; // if we somehow got here. we don't have another line in the buffer yet...need to wait for more data...
 }
 
 bool nsMsgLineStreamBuffer::NextLineAvailable()
 {
   return (m_numBytesInBuffer > 0 && PL_strchr(m_dataBuffer+m_startPos, m_lineToken));
 }
 
--- a/mailnews/base/util/nsMsgLineBuffer.h
+++ b/mailnews/base/util/nsMsgLineBuffer.h
@@ -101,21 +101,21 @@ class nsIInputStream;
 
 class NS_MSG_BASE nsMsgLineStreamBuffer
 {
 public:
   // aBufferSize -- size of the buffer you want us to use for buffering stream data
   // aEndOfLinetoken -- The delimiter string to be used for determining the end of line. This 
   //              allows us to parse platform specific end of line endings by making it
   //            a parameter.
-  // aAllocateNewLines -- PR_TRUE if you want calls to ReadNextLine to allocate new memory for the line. 
+  // aAllocateNewLines -- true if you want calls to ReadNextLine to allocate new memory for the line. 
   //            if false, the char * returned is just a ptr into the buffer. Subsequent calls to
   //            ReadNextLine will alter the data so your ptr only has a life time of a per call.
-  // aEatCRLFs  -- PR_TRUE if you don't want to see the CRLFs on the lines returned by ReadNextLine. 
-  //         PR_FALSE if you do want to see them.
+  // aEatCRLFs  -- true if you don't want to see the CRLFs on the lines returned by ReadNextLine. 
+  //         false if you do want to see them.
   // aLineToken -- Specify the line token to look for, by default is LF ('\n') which cover as well CRLF. If
   //            lines are terminated with a CR only, you need to set aLineToken to CR ('\r')
   nsMsgLineStreamBuffer(PRUint32 aBufferSize, bool aAllocateNewLines, 
                         bool aEatCRLFs = true, char aLineToken = '\n'); // specify the size of the buffer you want the class to use....
   virtual ~nsMsgLineStreamBuffer();
   
   // Caller must free the line returned using PR_Free
   // aEndOfLinetoken -- delimiter used to denote the end of a line.
--- a/mailnews/base/util/nsMsgMailNewsUrl.cpp
+++ b/mailnews/base/util/nsMsgMailNewsUrl.cpp
@@ -56,21 +56,21 @@
 #include "prmem.h"
 #include <time.h>
 #include "nsMsgUtils.h"
 
 nsMsgMailNewsUrl::nsMsgMailNewsUrl()
 {
   // nsIURI specific state
   m_errorMessage = nsnull;
-  m_runningUrl = PR_FALSE;
-  m_updatingFolder = PR_FALSE;
-  m_addContentToCache = PR_FALSE;
-  m_msgIsInLocalCache = PR_FALSE;
-  m_suppressErrorMsgs = PR_FALSE;
+  m_runningUrl = false;
+  m_updatingFolder = false;
+  m_addContentToCache = false;
+  m_msgIsInLocalCache = false;
+  m_suppressErrorMsgs = false;
   mMaxProgress = -1;
   m_baseURL = do_CreateInstance(NS_STANDARDURL_CONTRACTID);
 }
 
 #define NOTIFY_URL_LISTENERS(propertyfunc_, params_)                   \
   PR_BEGIN_MACRO                                                       \
   nsTObserverArray<nsCOMPtr<nsIUrlListener> >::ForwardIterator iter(mUrlListeners); \
   while (iter.HasMore()) {                                             \
@@ -187,26 +187,26 @@ NS_IMETHODIMP nsMsgMailNewsUrl::GetServe
         if (scheme.EqualsLiteral("news"))
           scheme.Assign("nntp");
         url->SetScheme(scheme);
         nsCOMPtr<nsIMsgAccountManager> accountManager = 
                  do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
         if (NS_FAILED(rv)) return rv;
         
         nsCOMPtr<nsIMsgIncomingServer> server;
-        rv = accountManager->FindServerByURI(url, PR_FALSE,
+        rv = accountManager->FindServerByURI(url, false,
                                         aIncomingServer);
         if (!*aIncomingServer && scheme.EqualsLiteral("imap"))
         {
           // look for any imap server with this host name so clicking on 
           // other users folder urls will work. We could override this method
           // for imap urls, or we could make caching of servers work and
           // just set the server in the imap code for this case.
           url->SetUserPass(EmptyCString());
-          rv = accountManager->FindServerByURI(url, PR_FALSE,
+          rv = accountManager->FindServerByURI(url, false,
                                           aIncomingServer);
         }
     }
 
     return rv;
 }
 
 NS_IMETHODIMP nsMsgMailNewsUrl::GetMsgWindow(nsIMsgWindow **aMsgWindow)
@@ -340,17 +340,17 @@ NS_IMETHODIMP nsMsgMailNewsUrl::SetSuppr
   m_suppressErrorMsgs = aSuppressErrorMsgs;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgMailNewsUrl::IsUrlType(PRUint32 type, bool *isType)
 {
   //base class doesn't know about any specific types
   NS_ENSURE_ARG(isType);
-  *isType = PR_FALSE;
+  *isType = false;
   return NS_OK;
 
 }
 
 NS_IMETHODIMP nsMsgMailNewsUrl::SetSearchSession(nsIMsgSearchSession *aSearchSession)
 {
   if (aSearchSession)
     m_searchSession = do_QueryInterface(aSearchSession);
@@ -816,17 +816,17 @@ protected:
 
 NS_IMPL_ISUPPORTS2(nsMsgSaveAsListener,
                    nsIStreamListener,
                    nsIRequestObserver)
 
 nsMsgSaveAsListener::nsMsgSaveAsListener(nsIFile *aFile, bool addDummyEnvelope)
 {
   m_outputFile = aFile;
-  m_writtenData = PR_FALSE;
+  m_writtenData = false;
   m_addDummyEnvelope = addDummyEnvelope;
   m_leftOver = 0;
 }
 
 nsMsgSaveAsListener::~nsMsgSaveAsListener()
 {
 }
 
@@ -852,17 +852,17 @@ NS_IMETHODIMP nsMsgSaveAsListener::OnDat
                                   PRUint32 srcOffset,
                                   PRUint32 count)
 {
   nsresult rv;
   PRUint32 available;
   rv = inStream->Available(&available);
   if (!m_writtenData)
   {
-    m_writtenData = PR_TRUE;
+    m_writtenData = true;
     rv = SetupMsgWriteStream(m_outputFile, m_addDummyEnvelope);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   bool useCanonicalEnding = false;
   nsCOMPtr <nsIMsgMessageUrl> msgUrl = do_QueryInterface(aSupport);
   if (msgUrl)
     msgUrl->GetCanonicalLineEnding(&useCanonicalEnding);
@@ -952,17 +952,17 @@ nsresult nsMsgSaveAsListener::SetupMsgWr
   // getting the outputstream.
   // Due to bug 328027, the nsSaveMsgListener created in
   // nsMessenger::SaveAs now opens the stream on the nsIFile
   // object, thus creating an empty file. Actual save operations for
   // IMAP and NNTP use this nsMsgSaveAsListener here, though, so we
   // have to close the stream before deleting the file, else data
   // would still be written happily into a now non-existing file.
   // (Windows doesn't care, btw, just unixoids do...)
-  aFile->Remove(PR_FALSE);
+  aFile->Remove(false);
 
   nsCOMPtr <nsILocalFile> localFile = do_QueryInterface(aFile);
   nsresult rv = MsgNewBufferedFileOutputStream(getter_AddRefs(m_outputStream),
                                                localFile, -1, 00600);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (m_outputStream && addDummyEnvelope)
   {
--- a/mailnews/base/util/nsMsgProtocol.cpp
+++ b/mailnews/base/util/nsMsgProtocol.cpp
@@ -84,23 +84,23 @@ NS_INTERFACE_MAP_END_THREADSAFE
 static PRUnichar *FormatStringWithHostNameByID(PRInt32 stringID, nsIMsgMailNewsUrl *msgUri);
 
 
 nsMsgProtocol::nsMsgProtocol(nsIURI * aURL)
 {
   m_flags = 0;
   m_readCount = 0;
   mLoadFlags = 0;
-  m_socketIsOpen = PR_FALSE;
+  m_socketIsOpen = false;
   mContentLength = -1;
 
   GetSpecialDirectoryWithFileName(NS_OS_TEMP_DIR, "tempMessage.eml",
                                   getter_AddRefs(m_tempMsgFile));
 
-  mSuppressListenerNotifications = PR_FALSE;
+  mSuppressListenerNotifications = false;
   InitFromURI(aURL);
 }
 
 nsresult nsMsgProtocol::InitFromURI(nsIURI *aUrl)
 {
   m_url = aUrl;
 
   nsCOMPtr <nsIMsgMailNewsUrl> mailUrl = do_QueryInterface(aUrl);
@@ -169,26 +169,26 @@ nsMsgProtocol::OpenNetworkSocketWithInfo
   if (NS_FAILED(rv)) return rv;
 
   strans->SetSecurityCallbacks(callbacks);
 
   // creates cyclic reference!
   nsCOMPtr<nsIThread> currentThread(do_GetCurrentThread());
   strans->SetEventSink(this, currentThread);
 
-  m_socketIsOpen = PR_FALSE;
+  m_socketIsOpen = false;
   m_transport = strans;
 
   if (!gGotTimeoutPref)
   {
     nsCOMPtr<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
     if (prefBranch)
     {
       prefBranch->GetIntPref("mailnews.tcptimeout", &gSocketTimeout);
-      gGotTimeoutPref = PR_TRUE;
+      gGotTimeoutPref = true;
     }
   }
   strans->SetTimeout(nsISocketTransport::TIMEOUT_CONNECT, gSocketTimeout + 60);
   strans->SetTimeout(nsISocketTransport::TIMEOUT_READ_WRITE, gSocketTimeout);
 
   PRUint8 qos;
   rv = GetQoSBits(&qos);
   if (NS_SUCCEEDED(rv))
@@ -297,20 +297,20 @@ nsresult nsMsgProtocol::OpenFileSocket(n
   if (NS_FAILED(rv)) return rv;
 
   // create input stream transport
   nsCOMPtr<nsIStreamTransportService> sts =
       do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv);
   if (NS_FAILED(rv)) return rv;
 
   rv = sts->CreateInputTransport(stream, PRInt64(aStartPosition),
-                                 PRInt64(aReadCount), PR_TRUE,
+                                 PRInt64(aReadCount), true,
                                  getter_AddRefs(m_transport));
 
-  m_socketIsOpen = PR_FALSE;
+  m_socketIsOpen = false;
   return rv;
 }
 
 nsresult nsMsgProtocol::GetTopmostMsgWindow(nsIMsgWindow **aWindow)
 {
   nsresult rv;
   nsCOMPtr<nsIMsgMailSession> mailSession(do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
@@ -331,17 +331,17 @@ nsresult nsMsgProtocol::SetupTransportSt
 
   return NS_OK;
 }
 
 nsresult nsMsgProtocol::CloseSocket()
 {
   nsresult rv = NS_OK;
   // release all of our socket state
-  m_socketIsOpen = PR_FALSE;
+  m_socketIsOpen = false;
   m_inputStream = nsnull;
   m_outputStream = nsnull;
   if (m_transport) {
     nsCOMPtr<nsISocketTransport> strans = do_QueryInterface(m_transport);
     if (strans) {
       strans->SetSecurityCallbacks(nsnull);
       strans->SetEventSink(nsnull, nsnull); // break cyclic reference!
     }
@@ -390,17 +390,17 @@ NS_IMETHODIMP nsMsgProtocol::OnDataAvail
 }
 
 NS_IMETHODIMP nsMsgProtocol::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
 {
   nsresult rv = NS_OK;
   nsCOMPtr <nsIMsgMailNewsUrl> aMsgUrl = do_QueryInterface(ctxt, &rv);
   if (NS_SUCCEEDED(rv) && aMsgUrl)
   {
-    rv = aMsgUrl->SetUrlState(PR_TRUE, NS_OK);
+    rv = aMsgUrl->SetUrlState(true, NS_OK);
     if (m_loadGroup)
       m_loadGroup->AddRequest(static_cast<nsIRequest *>(this), nsnull /* context isupports */);
   }
 
   // if we are set up as a channel, we should notify our channel listener that we are starting...
   // so pass in ourself as the channel and not the underlying socket or file channel the protocol
   // happens to be using
   if (!mSuppressListenerNotifications && m_channelListener)
@@ -428,17 +428,17 @@ NS_IMETHODIMP nsMsgProtocol::OnStopReque
   // so pass in ourself as the channel and not the underlying socket or file channel the protocol
   // happens to be using
   if (!mSuppressListenerNotifications && m_channelListener)
     rv = m_channelListener->OnStopRequest(this, m_channelContext, aStatus);
 
   nsCOMPtr <nsIMsgMailNewsUrl> msgUrl = do_QueryInterface(ctxt, &rv);
   if (NS_SUCCEEDED(rv) && msgUrl)
   {
-    rv = msgUrl->SetUrlState(PR_FALSE, aStatus);
+    rv = msgUrl->SetUrlState(false, aStatus);
     if (m_loadGroup)
       m_loadGroup->RemoveRequest(static_cast<nsIRequest *>(this), nsnull, aStatus);
 
     // !m_channelContext because if we're set up as a channel, then the remove
     // request above will handle alerting the user, so we don't need to.
     //
     // !NS_BINDING_ABORTED because we don't want to see an alert if the user
     // cancelled the operation.  also, we'll get here because we call Cancel()
@@ -520,17 +520,17 @@ nsresult nsMsgProtocol::LoadUrl(nsIURI *
   nsresult rv = NS_OK;
   nsCOMPtr <nsIMsgMailNewsUrl> aMsgUrl = do_QueryInterface(aURL, &rv);
 
   if (NS_SUCCEEDED(rv) && aMsgUrl)
   {
     bool msgIsInLocalCache;
     aMsgUrl->GetMsgIsInLocalCache(&msgIsInLocalCache);
 
-    rv = aMsgUrl->SetUrlState(PR_TRUE, NS_OK); // set the url as a url currently being run...
+    rv = aMsgUrl->SetUrlState(true, NS_OK); // set the url as a url currently being run...
 
     // if the url is given a stream consumer then we should use it to forward calls to...
     if (!m_channelListener && aConsumer) // if we don't have a registered listener already
     {
       m_channelListener = do_QueryInterface(aConsumer);
       if (!m_channelContext)
         m_channelContext = do_QueryInterface(aURL);
     }
@@ -557,17 +557,17 @@ nsresult nsMsgProtocol::LoadUrl(nsIURI *
 
         // This helps when running URLs from the command line
         rv = pump->SetLoadGroup(m_loadGroup);
         NS_ENSURE_SUCCESS(rv, rv);
 
         // put us in a state where we are always notified of incoming data
         rv = pump->AsyncRead(this, urlSupports);
         NS_ASSERTION(NS_SUCCEEDED(rv), "AsyncRead failed");
-        m_socketIsOpen = PR_TRUE; // mark the channel as open
+        m_socketIsOpen = true; // mark the channel as open
       }
     } // if we got an event queue service
     else if (!msgIsInLocalCache) // the connection is already open so we should begin processing our new url...
       rv = ProcessProtocolState(aURL, nsnull, 0, 0);
   }
 
   return rv;
 }
@@ -1085,20 +1085,20 @@ public:
         nsCOMPtr<nsIStreamListener> callback = do_QueryReferent(mMsgProtocol);
         if (!callback)
           return NS_ERROR_FAILURE;
         protInst = static_cast<nsMsgAsyncWriteProtocol *>(callback.get());
 
         if (avail == 0 && !protInst->mAsyncBuffer.Length())
         {
           // ok, stop writing...
-          protInst->mSuspendedWrite = PR_TRUE;
+          protInst->mSuspendedWrite = true;
           return NS_OK;
         }
-        protInst->mSuspendedWrite = PR_FALSE;
+        protInst->mSuspendedWrite = false;
 
         PRUint32 bytesWritten;
 
         if (avail)
         {
           rv = aOutStream->WriteFrom(mInStream, NS_MIN(avail, 4096U), &bytesWritten);
           // if were full at the time, the input stream may be backed up and we need to read any remains from the last ODA call
           // before we'll get more ODA calls
@@ -1135,17 +1135,17 @@ NS_IMPL_THREADSAFE_ISUPPORTS1(nsMsgProto
 
 class nsMsgFilePostHelper : public nsIStreamListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
 
-  nsMsgFilePostHelper() { mSuspendedPostFileRead = PR_FALSE;}
+  nsMsgFilePostHelper() { mSuspendedPostFileRead = false;}
   nsresult Init(nsIOutputStream * aOutStream, nsMsgAsyncWriteProtocol * aProtInstance, nsIFile *aFileToPost);
   virtual ~nsMsgFilePostHelper() {}
   nsCOMPtr<nsIRequest> mPostFileRequest;
   bool mSuspendedPostFileRead;
   void CloseSocket() { mProtInstance = nsnull; }
 protected:
   nsCOMPtr<nsIOutputStream> mOutStream;
   nsCOMPtr<nsIWeakReference> mProtInstance;
@@ -1191,17 +1191,17 @@ NS_IMETHODIMP nsMsgFilePostHelper::OnSto
   nsCOMPtr<nsIStreamListener> callback = do_QueryReferent(mProtInstance);
   if (!callback)
     return NS_OK;
   protInst = static_cast<nsMsgAsyncWriteProtocol *>(callback.get());
 
   if (!mSuspendedPostFileRead)
     protInst->PostDataFinished();
 
-  mSuspendedPostFileRead = PR_FALSE;
+  mSuspendedPostFileRead = false;
   protInst->mFilePostHelper = nsnull;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgFilePostHelper::OnDataAvailable(nsIRequest * /* aChannel */, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count)
 {
   nsMsgAsyncWriteProtocol *protInst = nsnull;
   nsCOMPtr<nsIStreamListener> callback = do_QueryReferent(mProtInstance);
@@ -1218,48 +1218,48 @@ NS_IMETHODIMP nsMsgFilePostHelper::OnDat
 
   protInst->ProcessIncomingPostData(inStr, count);
 
   if (protInst->mSuspendedWrite)
   {
     // if we got here then we had suspended the write 'cause we didn't have anymore
     // data to write (i.e. the pipe went empty). So resume the channel to kick
     // things off again.
-    protInst->mSuspendedWrite = PR_FALSE;
+    protInst->mSuspendedWrite = false;
     protInst->mAsyncOutStream->AsyncWait(protInst->mProvider, 0, 0,
                                          protInst->mProviderThread);
   }
 
   return NS_OK;
 }
 
 NS_IMPL_ADDREF_INHERITED(nsMsgAsyncWriteProtocol, nsMsgProtocol)
 NS_IMPL_RELEASE_INHERITED(nsMsgAsyncWriteProtocol, nsMsgProtocol)
 
 NS_INTERFACE_MAP_BEGIN(nsMsgAsyncWriteProtocol)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
 NS_INTERFACE_MAP_END_INHERITING(nsMsgProtocol)
 
 nsMsgAsyncWriteProtocol::nsMsgAsyncWriteProtocol(nsIURI * aURL) : nsMsgProtocol(aURL)
 {
-  mSuspendedWrite = PR_FALSE;
+  mSuspendedWrite = false;
   mSuspendedReadBytes = 0;
-  mSuspendedRead = PR_FALSE;
-  mInsertPeriodRequired = PR_FALSE;
-  mGenerateProgressNotifications = PR_FALSE;
+  mSuspendedRead = false;
+  mInsertPeriodRequired = false;
+  mGenerateProgressNotifications = false;
   mSuspendedReadBytesPostPeriod = 0;
   mFilePostHelper = nsnull;
 }
 
 nsMsgAsyncWriteProtocol::~nsMsgAsyncWriteProtocol()
 {}
 
 NS_IMETHODIMP nsMsgAsyncWriteProtocol::Cancel(nsresult status)
 {
-  mGenerateProgressNotifications = PR_FALSE;
+  mGenerateProgressNotifications = false;
 
   if (m_request)
     m_request->Cancel(status);
 
   if (mAsyncOutStream)
     mAsyncOutStream->CloseWithStatus(status);
 
   return NS_OK;
@@ -1270,76 +1270,76 @@ nsresult nsMsgAsyncWriteProtocol::PostMe
   nsCOMPtr<nsIStreamListener> listener = new nsMsgFilePostHelper();
 
   if (!listener) return NS_ERROR_OUT_OF_MEMORY;
 
   // be sure to initialize some state before posting
   mSuspendedReadBytes = 0;
   mNumBytesPosted = 0;
   file->GetFileSize(&mFilePostSize);
-  mSuspendedRead = PR_FALSE;
-  mInsertPeriodRequired = PR_FALSE;
+  mSuspendedRead = false;
+  mInsertPeriodRequired = false;
   mSuspendedReadBytesPostPeriod = 0;
-  mGenerateProgressNotifications = PR_TRUE;
+  mGenerateProgressNotifications = true;
 
   mFilePostHelper = static_cast<nsMsgFilePostHelper*>(static_cast<nsIStreamListener*>(listener));
 
   static_cast<nsMsgFilePostHelper*>(static_cast<nsIStreamListener*>(listener))->Init(m_outputStream, this, file);
 
   return NS_OK;
 }
 
 nsresult nsMsgAsyncWriteProtocol::SuspendPostFileRead()
 {
   if (mFilePostHelper && !mFilePostHelper->mSuspendedPostFileRead)
   {
     // uhoh we need to pause reading in the file until we get unblocked...
     mFilePostHelper->mPostFileRequest->Suspend();
-    mFilePostHelper->mSuspendedPostFileRead = PR_TRUE;
+    mFilePostHelper->mSuspendedPostFileRead = true;
   }
 
   return NS_OK;
 }
 
 nsresult nsMsgAsyncWriteProtocol::ResumePostFileRead()
 {
   if (mFilePostHelper)
   {
     if (mFilePostHelper->mSuspendedPostFileRead)
     {
       mFilePostHelper->mPostFileRequest->Resume();
-      mFilePostHelper->mSuspendedPostFileRead = PR_FALSE;
+      mFilePostHelper->mSuspendedPostFileRead = false;
     }
   }
   else // we must be done with the download so send the '.'
   {
     PostDataFinished();
   }
 
   return NS_OK;
 }
 
 nsresult nsMsgAsyncWriteProtocol::UpdateSuspendedReadBytes(PRUint32 aNewBytes, bool aAddToPostPeriodByteCount)
 {
   // depending on our current state, we'll either add aNewBytes to mSuspendedReadBytes
   // or mSuspendedReadBytesAfterPeriod.
 
-  mSuspendedRead = PR_TRUE;
+  mSuspendedRead = true;
   if (aAddToPostPeriodByteCount)
     mSuspendedReadBytesPostPeriod += aNewBytes;
   else
     mSuspendedReadBytes += aNewBytes;
 
   return NS_OK;
 }
 
 nsresult nsMsgAsyncWriteProtocol::PostDataFinished()
 {
   SendData(nsnull, "." CRLF);
-  mGenerateProgressNotifications = PR_FALSE;
+  mGenerateProgressNotifications = false;
   mPostDataStream = nsnull;
   return NS_OK;
 }
 
 nsresult nsMsgAsyncWriteProtocol::ProcessIncomingPostData(nsIInputStream *inStr, PRUint32 count)
 {
   if (!m_socketIsOpen) return NS_OK; // kick out if the socket was canceled
 
@@ -1357,50 +1357,50 @@ nsresult nsMsgAsyncWriteProtocol::Proces
   if (bufferInputStr)
   {
     PRUint32 amountWritten;
 
     while (count > 0)
     {
       bool found = false;
       PRUint32 offset = 0;
-      bufferInputStr->Search("\012.", PR_TRUE,  &found, &offset); // LF.
+      bufferInputStr->Search("\012.", true,  &found, &offset); // LF.
 
       if (!found || offset > count)
       {
         // push this data into the output stream
         m_outputStream->WriteFrom(inStr, count, &amountWritten);
         // store any remains which need read out at a later date
         if (count > amountWritten) // stream will block
         {
-          UpdateSuspendedReadBytes(count - amountWritten, PR_FALSE);
+          UpdateSuspendedReadBytes(count - amountWritten, false);
           SuspendPostFileRead();
         }
         break;
       }
       else
       {
         // count points to the LF in a LF followed by a '.'
         // go ahead and write up to offset..
         m_outputStream->WriteFrom(inStr, offset + 1, &amountWritten);
         count -= amountWritten;
         if (offset+1 > amountWritten)
         {
-          UpdateSuspendedReadBytes(offset+1 - amountWritten, PR_FALSE);
-          mInsertPeriodRequired = PR_TRUE;
+          UpdateSuspendedReadBytes(offset+1 - amountWritten, false);
+          mInsertPeriodRequired = true;
           UpdateSuspendedReadBytes(count, mInsertPeriodRequired);
           SuspendPostFileRead();
           break;
         }
 
         // write out the extra '.'
         m_outputStream->Write(".", 1, &amountWritten);
         if (amountWritten != 1)
         {
-          mInsertPeriodRequired = PR_TRUE;
+          mInsertPeriodRequired = true;
           // once we do write out the '.',  if we are now blocked we need to remember the remaining count that comes
           // after the '.' so we can perform processing on that once we become unblocked.
           UpdateSuspendedReadBytes(count, mInsertPeriodRequired);
           SuspendPostFileRead();
           break;
         }
       }
     } // while count > 0
@@ -1435,33 +1435,33 @@ nsresult nsMsgAsyncWriteProtocol::Unbloc
     }
 
     // (2) if we are now unblocked, and we need to insert a '.' then do so now...
     if (mInsertPeriodRequired && mSuspendedReadBytes == 0)
     {
       amountWritten = 0;
       m_outputStream->Write(".", 1, &amountWritten);
       if (amountWritten == 1) // if we succeeded then clear pending '.' flag
-        mInsertPeriodRequired = PR_FALSE;
+        mInsertPeriodRequired = false;
     }
 
     // (3) if we inserted a '.' and we still have bytes after the '.' which need processed before the stream is unblocked
     // then fake an ODA call to handle this now...
     if (!mInsertPeriodRequired && mSuspendedReadBytesPostPeriod > 0)
     {
       // these bytes actually need processed for extra '.''s.....
       PRUint32 postbytes = mSuspendedReadBytesPostPeriod;
       mSuspendedReadBytesPostPeriod = 0;
       ProcessIncomingPostData(mPostDataStream, postbytes);
     }
 
     // (4) determine if we are out of the suspended read state...
     if (mSuspendedReadBytes == 0 && !mInsertPeriodRequired && mSuspendedReadBytesPostPeriod == 0)
     {
-      mSuspendedRead = PR_FALSE;
+      mSuspendedRead = false;
       ResumePostFileRead();
     }
 
   } // if we are in the suspended read state
 
   return NS_OK;
 }
 
@@ -1469,17 +1469,17 @@ nsresult nsMsgAsyncWriteProtocol::SetupT
 {
   nsresult rv = NS_OK;
 
   if (!m_outputStream && m_transport)
   {
     // first create a pipe which we'll use to write the data we want to send
     // into.
     nsCOMPtr<nsIPipe> pipe = do_CreateInstance("@mozilla.org/pipe;1");
-    rv = pipe->Init(PR_TRUE, PR_TRUE, 1024, 8, nsnull);
+    rv = pipe->Init(true, true, 1024, 8, nsnull);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsIAsyncInputStream *inputStream = nsnull;
     pipe->GetInputStream(&inputStream);
     mInStream = dont_AddRef(static_cast<nsIInputStream *>(inputStream));
 
     nsIAsyncOutputStream *outputStream = nsnull;
     pipe->GetOutputStream(&outputStream);
--- a/mailnews/base/util/nsMsgReadStateTxn.cpp
+++ b/mailnews/base/util/nsMsgReadStateTxn.cpp
@@ -62,38 +62,38 @@ nsMsgReadStateTxn::Init(nsIMsgFolder *aP
   mMarkedMessages.AppendElements(aMsgKeyArray, aNumKeys);
 
   return nsMsgTxn::Init();
 }
 
 NS_IMETHODIMP 
 nsMsgReadStateTxn::UndoTransaction()
 {
-  return MarkMessages(PR_FALSE);
+  return MarkMessages(false);
 }
 
 NS_IMETHODIMP 
 nsMsgReadStateTxn::RedoTransaction()
 {
-  return MarkMessages(PR_TRUE);
+  return MarkMessages(true);
 }
 
 NS_IMETHODIMP
 nsMsgReadStateTxn::MarkMessages(bool aAsRead)
 {
   nsresult rv;
   nsCOMPtr<nsIMutableArray> messageArray = 
     do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   PRUint32 length = mMarkedMessages.Length();
   for (PRUint32 i = 0; i < length; i++) {
     nsCOMPtr<nsIMsgDBHdr> curMsgHdr;
     rv = mParentFolder->GetMessageHeader(mMarkedMessages[i], 
                                          getter_AddRefs(curMsgHdr));
     if (NS_SUCCEEDED(rv) && curMsgHdr) {
-      messageArray->AppendElement(curMsgHdr, PR_FALSE);
+      messageArray->AppendElement(curMsgHdr, false);
     }
   }
 
   return mParentFolder->MarkMessagesRead(messageArray, aAsRead);
 }
 
--- a/mailnews/base/util/nsMsgTxn.cpp
+++ b/mailnews/base/util/nsMsgTxn.cpp
@@ -276,17 +276,17 @@ NS_IMETHODIMP nsMsgTxn::SetPropertyAsInt
 NS_IMETHODIMP nsMsgTxn::DoTransaction(void)
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgTxn::GetIsTransient(bool *aIsTransient)
 {
   if (nsnull!=aIsTransient)
-    *aIsTransient = PR_FALSE;
+    *aIsTransient = false;
   else
     return NS_ERROR_NULL_POINTER;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgTxn::Merge(nsITransaction *aTransaction, bool *aDidMerge)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
--- a/mailnews/base/util/nsMsgUtils.cpp
+++ b/mailnews/base/util/nsMsgUtils.cpp
@@ -261,17 +261,17 @@ nsresult NS_MsgGetPriorityValueString(
       outValueString.AssignLiteral("5");
       break;
     case nsMsgPriority::none:
     case nsMsgPriority::notSet:
       // Note: '0' is a "fake" value; we expect to never be in this case.
       outValueString.AssignLiteral("0");
       break;
     default:
-      NS_ASSERTION(PR_FALSE, "invalid priority value");
+      NS_ASSERTION(false, "invalid priority value");
   }
 
   return NS_OK;
 }
 
 nsresult NS_MsgGetUntranslatedPriorityName(
            const nsMsgPriorityValue p,
            nsACString & outName)
@@ -294,17 +294,17 @@ nsresult NS_MsgGetUntranslatedPriorityNa
       outName.AssignLiteral("Lowest");
       break;
     case nsMsgPriority::none:
     case nsMsgPriority::notSet:
       // Note: 'None' is a "fake" value; we expect to never be in this case.
       outName.AssignLiteral("None");
       break;
     default:
-      NS_ASSERTION(PR_FALSE, "invalid priority value");
+      NS_ASSERTION(false, "invalid priority value");
   }
 
   return NS_OK;
 }
 
 
 /* this used to be XP_StringHash2 from xp_hash.c */
 /* phong's linear congruential hash  */
@@ -598,17 +598,17 @@ nsresult NS_MsgCreatePathStringFromFolde
 #ifdef XP_MACOSX
       // Don't hash path pieces because local mail folder uri's have already
       // been hashed. We're only doing this on the mac to limit potential
       // regressions.
       if (!isMailboxUri)
 #endif
       NS_MsgHashIfNecessary(pathPiece);
       path += pathPiece;
-      haveFirst=PR_TRUE;
+      haveFirst=true;
     }
     // look for the next slash
     startSlashPos = endSlashPos + 1;
 
     endSlashPos = (startSlashPos >= 0)
       ? oldPath.FindChar('/', startSlashPos + 1)  - 1: oldPath.Length() - 1;
     if (endSlashPos < 0)
       endSlashPos = oldPath.Length();
@@ -625,17 +625,17 @@ nsresult NS_MsgCreatePathStringFromFolde
 
 bool NS_MsgStripRE(const char **stringP, PRUint32 *lengthP, char **modifiedSubject)
 {
   const char *s, *s_end;
   const char *last;
   PRUint32 L;
   bool result = false;
   NS_ASSERTION(stringP, "bad null param");
-  if (!stringP) return PR_FALSE;
+  if (!stringP) return false;
 
   // get localizedRe pref
   nsresult rv;
   nsString utf16LocalizedRe;
   NS_GetLocalizedUnicharPreferenceWithDefault(nsnull,
                                               "mailnews.localizedRe",
                                               EmptyString(),
                                               utf16LocalizedRe);
@@ -652,17 +652,17 @@ bool NS_MsgStripRE(const char **stringP,
   nsCString decodedString;
   nsCOMPtr<nsIMimeConverter> mimeConverter;
   // we cannot strip "Re:" for MIME encoded subject without modifying the original
   if (modifiedSubject && strstr(*stringP, "=?"))
   {
     mimeConverter = do_GetService(NS_MIME_CONVERTER_CONTRACTID, &rv);
     if (NS_SUCCEEDED(rv))
       rv = mimeConverter->DecodeMimeHeaderToCharPtr(
-        *stringP, nsnull, PR_FALSE, PR_TRUE, getter_Copies(decodedString));
+        *stringP, nsnull, false, true, getter_Copies(decodedString));
   }
 
   s = !decodedString.IsEmpty() ? decodedString.get() : *stringP;
   L = lengthP ? *lengthP : strlen(s);
 
   s_end = s + L;
   last = s;
 
@@ -681,33 +681,33 @@ bool NS_MsgStripRE(const char **stringP,
       tokPtr++;
     }
     //check if the beginning of s is the actual token
     if (tokenLength && !strncmp(s, tokPtr - tokenLength, tokenLength))
     {
       if (s[tokenLength] == ':')
       {
         s = s + tokenLength + 1; /* Skip over "Re:" */
-        result = PR_TRUE;        /* Yes, we stripped it. */
+        result = true;        /* Yes, we stripped it. */
         goto AGAIN;              /* Skip whitespace and try again. */
       }
       else if (s[tokenLength] == '[' || s[tokenLength] == '(')
       {
         const char *s2 = s + tokenLength + 1; /* Skip over "Re[" */
 
         /* Skip forward over digits after the "[". */
         while (s2 < (s_end - 2) && isdigit((unsigned char)*s2))
           s2++;
 
         /* Now ensure that the following thing is "]:"
            Only if it is do we alter `s'. */
         if ((s2[0] == ']' || s2[0] == ')') && s2[1] == ':')
         {
           s = s2 + 2;       /* Skip over "]:" */
-          result = PR_TRUE; /* Yes, we stripped it. */
+          result = true; /* Yes, we stripped it. */
           goto AGAIN;       /* Skip whitespace and try again. */
         }
       }
     }
     if (*tokPtr)
       tokPtr++;
   }
 
@@ -723,17 +723,17 @@ bool NS_MsgStripRE(const char **stringP,
       {
         p1 += sizeof("=?")-1;         // skip "=?"
         const char *p2 = strchr(p1, '?');   // then search for '?'
         if (p2)
         {
           char charset[nsIMimeConverter::MAX_CHARSET_NAME_LENGTH] = "";
           if (nsIMimeConverter::MAX_CHARSET_NAME_LENGTH >= (p2 - p1))
             strncpy(charset, p1, p2 - p1);
-          rv = mimeConverter->EncodeMimePartIIStr_UTF8(nsDependentCString(s), PR_FALSE, charset,
+          rv = mimeConverter->EncodeMimePartIIStr_UTF8(nsDependentCString(s), false, charset,
             sizeof("Subject:"), nsIMimeConverter::MIME_ENCODED_WORD_SIZE,
             modifiedSubject);
           if (NS_SUCCEEDED(rv))
             return result;
         }
       }
     }
     else
@@ -856,17 +856,17 @@ nsresult GetExistingFolder(const nsCStri
 
 bool IsAFromSpaceLine(char *start, const char *end)
 {
   bool rv = false;
   while ((start < end) && (*start == '>'))
     start++;
   // If the leading '>'s are followed by an 'F' then we have a possible case here.
   if ( (*start == 'F') && (end-start > 4) && !strncmp(start, "From ", 5) )
-    rv = PR_TRUE;
+    rv = true;
   return rv;
 }
 
 //
 // This function finds all lines starting with "From " or "From " preceeding
 // with one or more '>' (ie, ">From", ">>From", etc) in the input buffer
 // (between 'start' and 'end') and prefix them with a ">" .
 //
@@ -914,21 +914,21 @@ nsresult IsRFC822HeaderFieldName(const c
   NS_ENSURE_ARG_POINTER(aHdr);
   NS_ENSURE_ARG_POINTER(aResult);
   PRUint32 length = strlen(aHdr);
   for(PRUint32 i=0; i<length; i++)
   {
     char c = aHdr[i];
     if ( c < '!' || c == ':' || c > '~')
     {
-      *aResult = PR_FALSE;
+      *aResult = false;
       return NS_OK;
     }
   }
-  *aResult = PR_TRUE;
+  *aResult = true;
   return NS_OK;
 }
 
 // Warning, currently this routine only works for the Junk Folder
 nsresult
 GetOrCreateFolder(const nsACString &aURI, nsIUrlListener *aListener)
 {
   nsresult rv;
@@ -1025,17 +1025,17 @@ GetOrCreateFolder(const nsACString &aURI
   }
 
   return NS_OK;
 }
 
 nsresult IsRSSArticle(nsIURI * aMsgURI, bool *aIsRSSArticle)
 {
   nsresult rv;
-  *aIsRSSArticle = PR_FALSE;
+  *aIsRSSArticle = false;
 
   nsCOMPtr<nsIMsgMessageUrl> msgUrl = do_QueryInterface(aMsgURI, &rv);
   if (NS_FAILED(rv)) return rv;
 
   nsCString resourceURI;
   msgUrl->GetUri(getter_Copies(resourceURI));
 
   // get the msg service for this URI
@@ -1056,17 +1056,17 @@ nsresult IsRSSArticle(nsIURI * aMsgURI, 
   rv = msgHdr->GetFolder(getter_AddRefs(folder));
   if (NS_SUCCEEDED(rv) && folder)
   {
     nsCOMPtr<nsIMsgIncomingServer> server;
     folder->GetServer(getter_AddRefs(server));
     rssServer = do_QueryInterface(server);
 
     if (rssServer)
-      *aIsRSSArticle = PR_TRUE;
+      *aIsRSSArticle = true;
   }
 
   return rv;
 }
 
 
 // digest needs to be a pointer to a DIGEST_LENGTH (16) byte buffer
 nsresult MSGCramMD5(const char *text, PRInt32 text_len, const char *key, PRInt32 key_len, unsigned char *digest)
@@ -1088,17 +1088,17 @@ nsresult MSGCramMD5(const char *text, PR
   {
 
     rv = hasher->Init(nsICryptoHash::MD5);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = hasher->Update((const PRUint8*) key, key_len);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = hasher->Finish(PR_FALSE, hash);
+    rv = hasher->Finish(false, hash);
     NS_ENSURE_SUCCESS(rv, rv);
 
     key = hash.get();
     key_len = DIGEST_LENGTH;
   }
 
   /*
    * the HMAC_MD5 transform looks like:
@@ -1125,25 +1125,25 @@ nsresult MSGCramMD5(const char *text, PR
   }
   /*
    * perform inner MD5
    */
   nsCAutoString result;
   rv = hasher->Init(nsICryptoHash::MD5); /* init context for 1st pass */
   rv = hasher->Update((const PRUint8*)innerPad, 64);       /* start with inner pad */
   rv = hasher->Update((const PRUint8*)text, text_len);     /* then text of datagram */
-  rv = hasher->Finish(PR_FALSE, result);   /* finish up 1st pass */
+  rv = hasher->Finish(false, result);   /* finish up 1st pass */
 
   /*
    * perform outer MD5
    */
   hasher->Init(nsICryptoHash::MD5);       /* init context for 2nd pass */
   rv = hasher->Update((const PRUint8*)outerPad, 64);    /* start with outer pad */
   rv = hasher->Update((const PRUint8*)result.get(), 16);/* then results of 1st hash */
-  rv = hasher->Finish(PR_FALSE, result);    /* finish up 2nd pass */
+  rv = hasher->Finish(false, result);    /* finish up 2nd pass */
 
   if (result.Length() != DIGEST_LENGTH)
     return NS_ERROR_UNEXPECTED;
 
   memcpy(digest, result.get(), DIGEST_LENGTH);
 
   return rv;
 
@@ -1163,17 +1163,17 @@ nsresult MSGApopMD5(const char *text, PR
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = hasher->Update((const PRUint8*) text, text_len);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = hasher->Update((const PRUint8*) password, password_len);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = hasher->Finish(PR_FALSE, result);
+  rv = hasher->Finish(false, result);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (result.Length() != DIGEST_LENGTH)
     return NS_ERROR_UNEXPECTED;
 
   memcpy(digest, result.get(), DIGEST_LENGTH);
   return rv;
 }
@@ -1184,17 +1184,17 @@ NS_MSG_BASE nsresult NS_GetPersistentFil
                                           bool& gotRelPref,
                                           nsILocalFile **aFile,
                                           nsIPrefBranch *prefBranch)
 {
     NS_ENSURE_ARG_POINTER(aFile);
     *aFile = nsnull;
     NS_ENSURE_ARG(relPrefName);
     NS_ENSURE_ARG(absPrefName);
-    gotRelPref = PR_FALSE;
+    gotRelPref = false;
 
     nsCOMPtr<nsIPrefBranch> mainBranch;
     if (!prefBranch) {
         nsCOMPtr<nsIPrefService> prefService(do_GetService(NS_PREFSERVICE_CONTRACTID));
         if (!prefService) return NS_ERROR_FAILURE;
         prefService->GetBranch(nsnull, getter_AddRefs(mainBranch));
         if (!mainBranch) return NS_ERROR_FAILURE;
         prefBranch = mainBranch;
@@ -1205,17 +1205,17 @@ NS_MSG_BASE nsresult NS_GetPersistentFil
     // Get the relative first
     nsCOMPtr<nsIRelativeFilePref> relFilePref;
     prefBranch->GetComplexValue(relPrefName,
                                 NS_GET_IID(nsIRelativeFilePref), getter_AddRefs(relFilePref));
     if (relFilePref) {
         relFilePref->GetFile(getter_AddRefs(localFile));
         NS_ASSERTION(localFile, "An nsIRelativeFilePref has no file.");
         if (localFile)
-          gotRelPref = PR_TRUE;
+          gotRelPref = true;
     }
 
     // If not, get the old absolute
     if (!localFile) {
         prefBranch->GetComplexValue(absPrefName,
                                     NS_GET_IID(nsILocalFile), getter_AddRefs(localFile));
 
         // If not, and given a dirServiceProp, use directory service.
@@ -1423,17 +1423,17 @@ nsresult MsgNewBufferedFileOutputStream(
 
 bool MsgFindKeyword(const nsCString &keyword, nsCString &keywords, PRInt32 *aStartOfKeyword, PRInt32 *aLength)
 {
 #ifdef MOZILLA_INTERNAL_API
 // nsTString_CharT::Find(const nsCString& aString,
 //                       bool aIgnoreCase=false,
 //                       PRInt32 aOffset=0,
 //                       PRInt32 aCount=-1 ) const;
-#define FIND_KEYWORD(keywords,keyword,offset) ((keywords).Find((keyword), PR_FALSE, (offset)))
+#define FIND_KEYWORD(keywords,keyword,offset) ((keywords).Find((keyword), false, (offset)))
 #else
 // nsAString::Find(const self_type& aStr,
 //                 PRUint32 aOffset,
 //                 ComparatorFunc c = DefaultComparator) const;
 #define FIND_KEYWORD(keywords,keyword,offset) ((keywords).Find((keyword), static_cast<PRUint32>(offset)))
 #endif
   // 'keyword' is the single keyword we're looking for
   // 'keywords' is a space delimited list of keywords to be searched,
@@ -1447,23 +1447,23 @@ bool MsgFindKeyword(const nsCString &key
     const char* matchStart = start + *aStartOfKeyword;
     const char* matchEnd = matchStart + kKeywordLen;
     // For a real match, matchStart must be the start of keywords or preceded
     // by a space and matchEnd must be the end of keywords or point to a space.
     if ((matchStart == start || *(matchStart - 1) == ' ') &&
         (matchEnd == end || *matchEnd == ' '))
     {
       *aLength = kKeywordLen;
-      return PR_TRUE;
+      return true;
     }
     *aStartOfKeyword = FIND_KEYWORD(keywords, keyword, *aStartOfKeyword + kKeywordLen);
   }
 
   *aLength = 0;
-  return PR_FALSE;
+  return false;
 #undef FIND_KEYWORD
 }
 
 bool MsgHostDomainIsTrusted(nsCString &host, nsCString &trustedMailDomains)
 {
   const char *end;
   PRUint32 hostLen, domainLen;
   bool domainIsTrusted = false;
@@ -1489,17 +1489,17 @@ bool MsgHostDomainIsTrusted(nsCString &h
     if (domainLen && hostLen >= domainLen) {
       const char *hostTail = hostStart + hostLen - domainLen;
       if (PL_strncasecmp(domain, hostTail, domainLen) == 0)
       {
         // now, make sure either that the hostname is a direct match or
         // that the hostname begins with a dot.
         if (hostLen == domainLen || *hostTail == '.' || *(hostTail - 1) == '.')
         {
-          domainIsTrusted = PR_TRUE;
+          domainIsTrusted = true;
           break;
         }
       }
     }
 
     domain = end + 1;
   } while (*end);
   return domainIsTrusted;
@@ -1544,59 +1544,59 @@ NS_MSG_BASE bool MsgIsUTF8(const nsACStr
     if (0 == state) {
 
       c = *ptr++;
 
       if ((c & 0x80) == 0x00) 
         continue;
 
       if ( c <= 0xC1 ) // [80-BF] where not expected, [C0-C1] for overlong.
-        return PR_FALSE;
+        return false;
       else if ((c & 0xE0) == 0xC0) 
         state = 1;
       else if ((c & 0xF0) == 0xE0) {
         state = 2;
         if ( c == 0xE0 ) { // to exclude E0[80-9F][80-BF] 
-          overlong = PR_TRUE;
+          overlong = true;
           olupper = 0x9F;
         } else if ( c == 0xED ) { // ED[A0-BF][80-BF] : surrogate codepoint
-          surrogate = PR_TRUE;
+          surrogate = true;
           slower = 0xA0;
         } else if ( c == 0xEF ) // EF BF [BE-BF] : non-character
-          nonchar = PR_TRUE;
+          nonchar = true;
       } else if ( c <= 0xF4 ) { // XXX replace /w UTF8traits::is4byte when it's updated to exclude [F5-F7].(bug 199090)
         state = 3;
-        nonchar = PR_TRUE;
+        nonchar = true;
         if ( c == 0xF0 ) { // to exclude F0[80-8F][80-BF]{2}
-          overlong = PR_TRUE;
+          overlong = true;
           olupper = 0x8F;
         }
         else if ( c == 0xF4 ) { // to exclude F4[90-BF][80-BF] 
           // actually not surrogates but codepoints beyond 0x10FFFF
-          surrogate = PR_TRUE;
+          surrogate = true;
           slower = 0x90;
         }
       } else
-        return PR_FALSE; // Not UTF-8 string
+        return false; // Not UTF-8 string
     }
     
     while (ptr < done_reading && state) {
       c = *ptr++;
       --state;
 
       // non-character : EF BF [BE-BF] or F[0-7] [89AB]F BF [BE-BF]
       if ( nonchar &&  ( !state &&  c < 0xBE ||
            state == 1 && c != 0xBF  ||
            state == 2 && 0x0F != (0x0F & c) ))
-        nonchar = PR_FALSE;
+        nonchar = false;
 
       if ((c & 0xC0) != 0x80 || overlong && c <= olupper ||
            surrogate && slower <= c || nonchar && !state )
-        return PR_FALSE; // Not UTF-8 string
-      overlong = surrogate = PR_FALSE;
+        return false; // Not UTF-8 string
+      overlong = surrogate = false;
     }
   }
   return !state; // state != 0 at the end indicates an invalid UTF-8 seq. 
 }
 
 #endif
 
 NS_MSG_BASE void MsgStripQuotedPrintable (unsigned char *src)
@@ -2006,34 +2006,34 @@ NS_MSG_BASE nsresult MsgGetHeadersFromKe
     NS_ENSURE_SUCCESS(rv, rv);
 
     // This function silently skips when the key is not found. This is an expected case.
     if (hasKey)
     {
       rv = aDB->GetMsgHdrForKey(key, getter_AddRefs(msgHdr));
       NS_ENSURE_SUCCESS(rv, rv);
 
-      aHeaders->AppendElement(msgHdr, PR_FALSE);
+      aHeaders->AppendElement(msgHdr, false);
     }
   }
 
   return rv;
 }
 
 bool MsgAdvanceToNextLine(const char *buffer, PRUint32 &bufferOffset, PRUint32 maxBufferOffset)
 {
   bool result = false;
   for (; bufferOffset < maxBufferOffset; bufferOffset++)
   {
     if (buffer[bufferOffset] == '\r' || buffer[bufferOffset] == '\n')
     {
       bufferOffset++;
       if (buffer[bufferOffset- 1] == '\r' && buffer[bufferOffset] == '\n')
         bufferOffset++;
-      result = PR_TRUE;
+      result = true;
       break;
     }
   }
   return result;
 }
 
 NS_MSG_BASE nsresult
 MsgExamineForProxy(const char *scheme, const char *host,
@@ -2200,17 +2200,17 @@ MsgStreamMsgHeaders(nsIInputStream *aInp
 {
   nsLineBuffer<char> *lineBuffer;
   nsresult rv = NS_InitLineBuffer(&lineBuffer);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCAutoString msgHeaders;
   nsCAutoString curLine;
 
-  bool more = PR_TRUE;
+  bool more = true;
 
   // We want to NS_ReadLine until we get to a blank line (the end of the headers)
   while (more)
   {
     rv = NS_ReadLine(aInputStream, lineBuffer, curLine, &more);
     NS_ENSURE_SUCCESS(rv, rv);
     if (curLine.IsEmpty())
       break;
--- a/mailnews/base/util/nsMsgUtils.h
+++ b/mailnews/base/util/nsMsgUtils.h
@@ -111,21 +111,21 @@ NS_MsgCreatePathStringFromFolderURI(cons
                                     bool aIsNewsFolder=false);
 
 /**
  * Given a string and a length, removes any "Re:" strings from the front.
  * It also deals with that dumbass "Re[2]:" thing that some losing mailers do.
  *
  * If mailnews.localizedRe is set, it will also remove localized "Re:" strings.
  *
- * @return PR_TRUE if it made a change (in which case the caller should look to
- *         modifiedSubject for the result) and PR_FALSE otherwise (in which
+ * @return true if it made a change (in which case the caller should look to
+ *         modifiedSubject for the result) and false otherwise (in which
  *         case the caller should look at stringp/length for the result) 
  *
- * @note In the case of a PR_TRUE return value, the string is not altered:
+ * @note In the case of a true return value, the string is not altered:
  *       the pointer to its head is merely advanced, and the length
  *       correspondingly decreased.
  * 
  * @note This API is insane and should be fixed.
  */
 NS_MSG_BASE bool NS_MsgStripRE(const char **stringP, PRUint32 *lengthP, char **modifiedSubject=nsnull);
 
 NS_MSG_BASE char * NS_MsgSACopy(char **destination, const char *source);
@@ -249,17 +249,17 @@ NS_MSG_BASE nsresult MsgExamineForProxy(
 
 NS_MSG_BASE PRInt32 MsgFindCharInSet(const nsCString &aString,
                                      const char* aChars, PRUint32 aOffset = 0);
 NS_MSG_BASE PRInt32 MsgFindCharInSet(const nsString &aString,
                                      const char* aChars, PRUint32 aOffset = 0);
 
 
 // advances bufferOffset to the beginning of the next line, if we don't
-// get to maxBufferOffset first. Returns PR_FALSE if we didn't get to the
+// get to maxBufferOffset first. Returns false if we didn't get to the
 // next line.
 NS_MSG_BASE bool MsgAdvanceToNextLine(const char *buffer, PRUint32 &bufferOffset,
                                    PRUint32 maxBufferOffset);
 
 /**
  * Alerts the user that the login to the server failed. Asks whether the
  * connection should: retry, cancel, or request a new password.
  *
@@ -313,20 +313,20 @@ NS_MSG_BASE nsresult MsgDetectCharsetFro
  * The following definitons exist for compatibility between the internal and
  * external APIs. Where possible they just forward to the existing API.
  */
 
 #ifdef MOZILLA_INTERNAL_API
 #include "nsEscape.h"
 
 /**
- * The internal API expects nsCaseInsensitiveC?StringComparator() and PR_TRUE.
+ * The internal API expects nsCaseInsensitiveC?StringComparator() and true.
  * Redefine CaseInsensitiveCompare so that Find works.
  */
-#define CaseInsensitiveCompare PR_TRUE
+#define CaseInsensitiveCompare true
 /**
  * The following methods are not exposed to the external API, but when we're
  * using the internal API we can simply redirect the calls appropriately.
  */
 #define MsgLowerCaseEqualsLiteral(str, l) \
         (str).LowerCaseEqualsLiteral(l)
 #define MsgRFindChar(str, ch, len) \
         (str).RFindChar(ch, len)
--- a/mailnews/compose/src/nsMsgAppleDoubleEncode.cpp
+++ b/mailnews/compose/src/nsMsgAppleDoubleEncode.cpp
@@ -121,17 +121,17 @@ MacGetFileType(nsILocalFile   *fs,
 *	Setup the encode envirment
 */
 
 int ap_encode_init( appledouble_encode_object *p_ap_encode_obj,
                     const char                *fname,
                     char                      *separator)
 {
   nsCOMPtr <nsILocalFile> myFile;
-  NS_NewNativeLocalFile(nsDependentCString(fname), PR_TRUE, getter_AddRefs(myFile));
+  NS_NewNativeLocalFile(nsDependentCString(fname), true, getter_AddRefs(myFile));
   bool exists;
   if (myFile && NS_SUCCEEDED(myFile->Exists(&exists)) && !exists)
     return -1;
 
   nsCOMPtr<nsILocalFileMac> macFile = do_QueryInterface(myFile);
   nsCAutoString path;
   macFile->GetNativePath(path);
 
--- a/mailnews/compose/src/nsMsgAppleEncode.cpp
+++ b/mailnews/compose/src/nsMsgAppleEncode.cpp
@@ -152,17 +152,17 @@ int ap_encode_file_infor(
 	ap_entry 	entries[NUM_ENTRIES];
 	ap_dates 	dates;
 	short 		i;
 	long 		comlen;
 	char 		comment[256];
 	int	 		status;
     
     nsCOMPtr <nsILocalFile> resFile;
-    NS_NewNativeLocalFile(nsDependentCString(p_ap_encode_obj->fname), PR_TRUE,
+    NS_NewNativeLocalFile(nsDependentCString(p_ap_encode_obj->fname), true,
                           getter_AddRefs(resFile));
     if (!resFile)
         return errFileOpen;
 
     FSRef ref;
     nsCOMPtr <nsILocalFileMac> macFile = do_QueryInterface(resFile);
     if (NS_FAILED(macFile->GetFSRef(&ref)))
         return errFileOpen;
@@ -327,17 +327,17 @@ int ap_encode_header(
 		status = ap_encode_file_infor(p_ap_encode_obj); 
 		if (status != noErr)
 			return status;
 		
 		/*
 		** preparing to encode the resource fork.
 		*/
         nsCOMPtr <nsILocalFile> myFile;
-        NS_NewNativeLocalFile(nsDependentCString(p_ap_encode_obj->fname), PR_TRUE, getter_AddRefs(myFile));
+        NS_NewNativeLocalFile(nsDependentCString(p_ap_encode_obj->fname), true, getter_AddRefs(myFile));
         if (!myFile)
             return errFileOpen;
 
         FSRef ref;
         nsCOMPtr <nsILocalFileMac> macFile = do_QueryInterface(myFile);
         if (NS_FAILED(macFile->GetFSRef(&ref)))
             return errFileOpen;
 
@@ -470,17 +470,17 @@ int ap_encode_data(
 	if (firstime)
 	{	
 		char* magic_type;
 			
 		/*
 		** preparing to encode the data fork.
 		*/
         nsCOMPtr <nsILocalFile> resFile;
-        NS_NewNativeLocalFile(nsDependentCString(p_ap_encode_obj->fname), PR_TRUE,
+        NS_NewNativeLocalFile(nsDependentCString(p_ap_encode_obj->fname), true,
                               getter_AddRefs(resFile));
         if (!resFile)
             return errFileOpen;
 
         FSRef ref;
         nsCOMPtr <nsILocalFileMac> macFile = do_QueryInterface(resFile);
         if (NS_FAILED(macFile->GetFSRef(&ref)))
             return errFileOpen;
--- a/mailnews/compose/src/nsMsgAttachment.cpp
+++ b/mailnews/compose/src/nsMsgAttachment.cpp
@@ -38,17 +38,17 @@
 #include "nsMsgAttachment.h"
 #include "nsILocalFile.h"
 #include "nsNetUtil.h"
 
 NS_IMPL_ISUPPORTS1(nsMsgAttachment, nsIMsgAttachment)
 
 nsMsgAttachment::nsMsgAttachment()
 {
-  mTemporary = PR_FALSE;
+  mTemporary = false;
   mSize = -1;
 }
 
 nsMsgAttachment::~nsMsgAttachment()
 {
   if (mTemporary)
     (void)DeleteAttachment();
 }
@@ -245,12 +245,12 @@ nsresult nsMsgAttachment::DeleteAttachme
     {
       rv = urlFile->IsFile(&isAFile);
       NS_ASSERTION(NS_SUCCEEDED(rv), "IsFile() call failed!");
     }
   }
 
   // remove it if it's a valid file
   if (isAFile)
-	  rv = urlFile->Remove(PR_FALSE); 
+	  rv = urlFile->Remove(false); 
 
   return rv;
 }
--- a/mailnews/compose/src/nsMsgAttachmentHandler.cpp
+++ b/mailnews/compose/src/nsMsgAttachmentHandler.cpp
@@ -109,17 +109,17 @@ nsresult nsSimpleZipper::AddToZip(nsIZip
     
   bool isDirectory;
   aFile->IsDirectory(&isDirectory);
   // append slash for a directory entry
   if (isDirectory)
     currentPath.Append('/');
   
   // add the file or directory entry to the zip
-  nsresult rv = aZipWriter->AddEntryFile(currentPath, nsIZipWriter::COMPRESSION_DEFAULT, aFile, PR_FALSE);
+  nsresult rv = aZipWriter->AddEntryFile(currentPath, nsIZipWriter::COMPRESSION_DEFAULT, aFile, false);
   NS_ENSURE_SUCCESS(rv, rv);
   
   // if it's a directory, add all its contents too
   if (isDirectory) {
     nsCOMPtr<nsISimpleEnumerator> e;
     nsresult rv = aFile->GetDirectoryEntries(getter_AddRefs(e));
     NS_ENSURE_SUCCESS(rv, rv);
 
@@ -138,62 +138,62 @@ nsresult nsSimpleZipper::AddToZip(nsIZip
 #endif // XP_MACOSX
 
 //
 // Class implementation...
 //
 nsMsgAttachmentHandler::nsMsgAttachmentHandler() :
   mRequest(nsnull),
   mCompFields(nsnull),   // Message composition fields for the sender
-  m_bogus_attachment(PR_FALSE),
-  m_done(PR_FALSE),
-  m_already_encoded_p(PR_FALSE),
-  m_decrypted_p(PR_FALSE),
-  mDeleteFile(PR_FALSE),
-  mMHTMLPart(PR_FALSE),
-  mPartUserOmissionOverride(PR_FALSE),
-  mMainBody(PR_FALSE),
+  m_bogus_attachment(false),
+  m_done(false),
+  m_already_encoded_p(false),
+  m_decrypted_p(false),
+  mDeleteFile(false),
+  mMHTMLPart(false),
+  mPartUserOmissionOverride(false),
+  mMainBody(false),
   mNodeIndex(-1),
   // For analyzing the attachment file...
   m_size(0),
   m_unprintable_count(0),
   m_highbit_count(0),
   m_ctl_count(0),
   m_null_count(0),
   m_have_cr(0), 
   m_have_lf(0), 
   m_have_crlf(0),
-  m_prev_char_was_cr(PR_FALSE),
+  m_prev_char_was_cr(false),
   m_current_column(0),
   m_max_column(0),
   m_lines(0),
-  m_file_analyzed(PR_FALSE),
+  m_file_analyzed(false),
 
   // Mime
   m_encoder_data(nsnull)
 {
 }
 
 nsMsgAttachmentHandler::~nsMsgAttachmentHandler()
 {
   if (mTmpFile && mDeleteFile)
-    mTmpFile->Remove(PR_FALSE);
+    mTmpFile->Remove(false);
 
   if (mOutFile)
     mOutFile->Close();
 
   CleanupTempFile();
 }
 
 void
 nsMsgAttachmentHandler::CleanupTempFile()
 {
 #ifdef XP_MACOSX
   if (mEncodedWorkingFile) {
-    mEncodedWorkingFile->Remove(PR_FALSE);
+    mEncodedWorkingFile->Remove(false);
     mEncodedWorkingFile = nsnull;
   }
 #endif // XP_MACOSX
 }
 
 void
 nsMsgAttachmentHandler::AnalyzeDataChunk(const char *chunk, PRInt32 length)
 {
@@ -216,30 +216,30 @@ nsMsgAttachmentHandler::AnalyzeDataChunk
 
     if (*s == '\r' || *s == '\n')
     {
       if (*s == '\r')
       {
         if (m_prev_char_was_cr)
           m_have_cr = 1;
         else
-          m_prev_char_was_cr = PR_TRUE;
+          m_prev_char_was_cr = true;
       }
       else
       {
         if (m_prev_char_was_cr)
         {
           if (m_current_column == 0)
           {
             m_have_crlf = 1;
             m_lines--;
           }
           else
             m_have_cr = m_have_lf = 1;
-          m_prev_char_was_cr = PR_FALSE;
+          m_prev_char_was_cr = false;
         }
         else
           m_have_lf = 1;
       }
       if (m_max_column < m_current_column)
         m_max_column = m_current_column;
       m_current_column = 0;
       m_lines++;
@@ -276,17 +276,17 @@ nsMsgAttachmentHandler::AnalyzeSnarfedFi
         if (numRead)
           AnalyzeDataChunk(chunk, numRead);
       }
       while (numRead && NS_SUCCEEDED(rv));
       if (m_prev_char_was_cr)
         m_have_cr = 1;
 
       inputFile->Close();
-      m_file_analyzed = PR_TRUE;
+      m_file_analyzed = true;
     }
   }
 }
 
 //
 // Given a content-type and some info about the contents of the document,
 // decide what encoding it should have.
 //
@@ -311,84 +311,84 @@ nsMsgAttachmentHandler::PickEncoding(con
   if (!mMainBody && (forceB64 || mime_type_requires_b64_p (m_type.get()) ||
     m_have_cr+m_have_lf+m_have_crlf != 1 || m_current_column != 0))
   {
   /* If the content-type is "image/" or something else known to be binary
   or several flavors of newlines are present or last line is incomplete,
   always use base64 (so that we don't get confused by newline
   conversions.)
      */
-    needsB64 = PR_TRUE;
+    needsB64 = true;
   }
   else
   {
   /* Otherwise, we need to pick an encoding based on the contents of
   the document.
      */
 
     bool encode_p;
     bool force_p = false;
 
     /*
       force quoted-printable if the sender does not allow
       conversion to 7bit
     */
     if (mCompFields) {
       if (mCompFields->GetForceMsgEncoding())
-        force_p = PR_TRUE;
+        force_p = true;
     }
     else if (mime_delivery_state) {
       if (((nsMsgComposeAndSend *)mime_delivery_state)->mCompFields->GetForceMsgEncoding())
-        force_p = PR_TRUE;
+        force_p = true;
     }
 
     if (force_p || (m_max_column > 900))
-      encode_p = PR_TRUE;
+      encode_p = true;
     else if (UseQuotedPrintable() && m_unprintable_count)
-      encode_p = PR_TRUE;
+      encode_p = true;
 
       else if (m_null_count)  /* If there are nulls, we must always encode,
         because sendmail will blow up. */
-        encode_p = PR_TRUE;
+        encode_p = true;
       else
-        encode_p = PR_FALSE;
+        encode_p = false;
 
         /* MIME requires a special case that these types never be encoded.
       */
       if (StringBeginsWith(m_type, NS_LITERAL_CSTRING("message"),
                            nsCaseInsensitiveCStringComparator()) ||
          StringBeginsWith(m_type, NS_LITERAL_CSTRING("multipart"),
                           nsCaseInsensitiveCStringComparator()))
       {
-        encode_p = PR_FALSE;
+        encode_p = false;
         if (m_desiredType.LowerCaseEqualsLiteral(TEXT_PLAIN))
           m_desiredType.Truncate();
       }
 
       // If the Mail charset is multibyte, we force it to use Base64 for attachments.
       if ((!mMainBody && charset && nsMsgI18Nmultibyte_charset(charset)) &&
           (m_type.LowerCaseEqualsLiteral(TEXT_HTML) ||
            m_type.LowerCaseEqualsLiteral(TEXT_MDL) ||
            m_type.LowerCaseEqualsLiteral(TEXT_PLAIN) ||
            m_type.LowerCaseEqualsLiteral(TEXT_RICHTEXT) ||
            m_type.LowerCaseEqualsLiteral(TEXT_ENRICHED) ||
            m_type.LowerCaseEqualsLiteral(TEXT_VCARD) ||
            m_type.LowerCaseEqualsLiteral(APPLICATION_DIRECTORY) || /* text/x-vcard synonym */
            m_type.LowerCaseEqualsLiteral(TEXT_CSS) ||
            m_type.LowerCaseEqualsLiteral(TEXT_JSSS)))
-        needsB64 = PR_TRUE;
+        needsB64 = true;
       else if (charset && nsMsgI18Nstateful_charset(charset))
         m_encoding = ENCODING_7BIT;
       else if (encode_p &&
         m_unprintable_count > (m_size / 10))
         /* If the document contains more than 10% unprintable characters,
         then that seems like a good candidate for base64 instead of
         quoted-printable.
         */
-        needsB64 = PR_TRUE;
+        needsB64 = true;
       else if (encode_p)
         m_encoding = ENCODING_QUOTED_PRINTABLE;
       else if (m_highbit_count > 0)
         m_encoding = ENCODING_8BIT;
       else
         m_encoding = ENCODING_7BIT;
   }
 
@@ -505,17 +505,17 @@ nsMsgAttachmentHandler::SnarfMsgAttachme
   nsCOMPtr <nsIMsgMessageService> messageService;
 
   if (m_uri.Find("-message:", CaseInsensitiveCompare) != -1)
   {
     nsCOMPtr <nsIFile> tmpFile;
     rv = nsMsgCreateTempFile("nsmail.tmp", getter_AddRefs(tmpFile));
     NS_ENSURE_SUCCESS(rv, rv);
     mTmpFile = do_QueryInterface(tmpFile);
-    mDeleteFile = PR_TRUE;
+    mDeleteFile = true;
     mCompFields = compFields;
     m_type = MESSAGE_RFC822;
     m_overrideType = MESSAGE_RFC822;
     if (!mTmpFile)
     {
       rv = NS_ERROR_FAILURE;
       goto done;
     }
@@ -526,17 +526,17 @@ nsMsgAttachmentHandler::SnarfMsgAttachme
       if (m_mime_delivery_state)
       {
         nsCOMPtr<nsIMsgSendReport> sendReport;
         m_mime_delivery_state->GetSendReport(getter_AddRefs(sendReport));
         if (sendReport)
         {
           nsAutoString error_msg;
           nsMsgBuildMessageWithTmpFile(mTmpFile, error_msg);
-          sendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg.get(), PR_FALSE);
+          sendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg.get(), false);
         }
       }
       rv =  NS_MSG_UNABLE_TO_OPEN_TMP_FILE;
       goto done;
     }
 
     nsCOMPtr<nsIURLFetcher> fetcher = do_CreateInstance(NS_URLFETCHER_CONTRACTID, &rv);
     if (NS_FAILED(rv) || !fetcher)
@@ -564,17 +564,17 @@ nsMsgAttachmentHandler::SnarfMsgAttachme
       if (NS_FAILED(rv))
         goto done;
 
       // Set us as the output stream for HTML data from libmime...
       nsCOMPtr<nsIMimeStreamConverter> mimeConverter = do_QueryInterface(m_mime_parser);
       if (mimeConverter)
       {
         mimeConverter->SetMimeOutputType(nsMimeOutput::nsMimeMessageDecrypt);
-        mimeConverter->SetForwardInline(PR_FALSE);
+        mimeConverter->SetForwardInline(false);
         mimeConverter->SetIdentity(nsnull);
         mimeConverter->SetOriginalMsgURI(nsnull);
       }
 
       nsCOMPtr<nsIStreamListener> convertedListener = do_QueryInterface(m_mime_parser, &rv);
       if (NS_FAILED(rv))
         goto done;
 
@@ -603,17 +603,17 @@ done:
       if (mOutFile)
       {
         mOutFile->Close();
         mOutFile = nsnull;
       }
 
       if (mTmpFile)
       {
-        mTmpFile->Remove(PR_FALSE);
+        mTmpFile->Remove(false);
         mTmpFile = nsnull;
       }
   }
 
   return rv;
 }
 
 #ifdef XP_MACOSX
@@ -636,50 +636,50 @@ nsMsgAttachmentHandler::SnarfAttachment(
   mCompFields = compFields;
 
   // First, get as file spec and create the stream for the
   // temp file where we will save this data
   nsCOMPtr <nsIFile> tmpFile;
   nsresult rv = nsMsgCreateTempFile("nsmail.tmp", getter_AddRefs(tmpFile));
   NS_ENSURE_SUCCESS(rv, rv);
   mTmpFile = do_QueryInterface(tmpFile);
-  mDeleteFile = PR_TRUE;
+  mDeleteFile = true;
 
   rv = MsgNewBufferedFileOutputStream(getter_AddRefs(mOutFile), mTmpFile, -1, 00600);
   if (NS_FAILED(rv) || !mOutFile)
   {
     if (m_mime_delivery_state)
     {
       nsCOMPtr<nsIMsgSendReport> sendReport;
       m_mime_delivery_state->GetSendReport(getter_AddRefs(sendReport));
       if (sendReport)
       {
         nsAutoString error_msg;
         nsMsgBuildMessageWithTmpFile(mTmpFile, error_msg);
-        sendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg.get(), PR_FALSE);
+        sendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg.get(), false);
       }
     }
-    mTmpFile->Remove(PR_FALSE);
+    mTmpFile->Remove(false);
     mTmpFile = nsnull;
     return NS_MSG_UNABLE_TO_OPEN_TMP_FILE;
   }
 
   nsCString sourceURISpec;
   mURL->GetSpec(sourceURISpec);
 #ifdef XP_MACOSX
   if (!m_bogus_attachment && StringBeginsWith(sourceURISpec, NS_LITERAL_CSTRING("file://")))
   {
     // Unescape the path (i.e. un-URLify it) before making a FSSpec
     nsCAutoString filePath;
     filePath.Adopt(nsMsgGetLocalFileFromURL(sourceURISpec.get()));
     nsCAutoString unescapedFilePath;
     MsgUnescapeString(filePath, 0, unescapedFilePath);
 
     nsCOMPtr<nsILocalFile> sourceFile;
-    NS_NewNativeLocalFile(unescapedFilePath, PR_TRUE, getter_AddRefs(sourceFile));
+    NS_NewNativeLocalFile(unescapedFilePath, true, getter_AddRefs(sourceFile));
     if (!sourceFile)
       return NS_ERROR_FAILURE;
       
     // check if it is a bundle. if it is, we'll zip it. 
     // if not, we'll apple encode it (applesingle or appledouble)
     nsCOMPtr<nsILocalFileMac> macFile(do_QueryInterface(sourceFile));
     bool isPackage;
     macFile->IsPackage(&isPackage);
@@ -750,23 +750,23 @@ nsMsgAttachmentHandler::ConvertToAppleEn
   
   //We need to retrieve the file type and creator...
 
   char fileInfo[32];
   OSType type, creator;
 
   nsresult rv = aSourceFile->GetFileType(&type);
   if (NS_FAILED(rv))
-    return PR_FALSE;
+    return false;
   PR_snprintf(fileInfo, sizeof(fileInfo), "%X", type);
   m_xMacType = fileInfo;
 
   rv = aSourceFile->GetFileCreator(&creator);
   if (NS_FAILED(rv))
-    return PR_FALSE;
+    return false;
   PR_snprintf(fileInfo, sizeof(fileInfo), "%X", creator);
   m_xMacCreator = fileInfo;
 
   FSRef fsRef;
   aSourceFile->GetFSRef(&fsRef);
   bool sendResourceFork = HasResourceFork(&fsRef);
 
   // if we have a resource fork, check the filename extension, maybe we don't need the resource fork!
@@ -1085,31 +1085,31 @@ nsMsgAttachmentHandler::UrlExit(nsresult
     if (m_mime_delivery_state)
       m_mime_delivery_state->GetDefaultPrompt(getter_AddRefs(aPrompt));
     nsMsgAskBooleanQuestionByString(aPrompt, printfString, &keepOnGoing);
     PR_FREEIF(printfString);
 
     if (keepOnGoing)
     {
       status = 0;
-      m_bogus_attachment = PR_TRUE; //That will cause this attachment to be ignored.
+      m_bogus_attachment = true; //That will cause this attachment to be ignored.
     }
     else
     {
       status = NS_ERROR_ABORT;
       m_mime_delivery_state->SetStatus(status);
       nsresult ignoreMe;
       m_mime_delivery_state->Fail(status, nsnull, &ignoreMe);
       m_mime_delivery_state->NotifyListenerOnStopSending(nsnull, status, 0, nsnull);
       SetMimeDeliveryState(nsnull);
       return status;
     }
   }
 
-  m_done = PR_TRUE;
+  m_done = true;
 
   //
   // Ok, now that we have the file here on disk, we need to see if there was
   // a need to do conversion to plain text...if so, the magic happens here,
   // otherwise, just move on to other attachments...
   //
   if (NS_SUCCEEDED(status) && !m_type.LowerCaseEqualsLiteral(TEXT_PLAIN) &&
       m_desiredType.LowerCaseEqualsLiteral(TEXT_PLAIN))
@@ -1130,22 +1130,22 @@ nsMsgAttachmentHandler::UrlExit(nsresult
       width = 30000;
 
     //
     // Now use the converter service here to do the right
     // thing and convert this data to plain text for us!
     //
     nsAutoString      conData;
 
-    if (NS_SUCCEEDED(LoadDataFromFile(mTmpFile, conData, PR_TRUE)))
+    if (NS_SUCCEEDED(LoadDataFromFile(mTmpFile, conData, true)))
     {
       if (NS_SUCCEEDED(ConvertBufToPlainText(conData, UseFormatFlowed(m_charset.get()))))
       {
         if (mDeleteFile)
-          mTmpFile->Remove(PR_FALSE);
+          mTmpFile->Remove(false);
 
         nsCOMPtr<nsIOutputStream> outputStream;
         nsresult rv = NS_NewLocalFileOutputStream(getter_AddRefs(outputStream), mTmpFile,  PR_WRONLY | PR_CREATE_FILE, 00600);
 
         if (NS_SUCCEEDED(rv))
         {
           nsCAutoString tData;
           if (NS_FAILED(ConvertFromUnicode(m_charset.get(), conData, tData)))
@@ -1205,20 +1205,20 @@ nsMsgAttachmentHandler::UrlExit(nsresult
         //
         // rhp: We need to get a little more understanding to failed URL
         // requests. So, at this point if most of next is NULL, then we
         // should just mark it fetched and move on! We probably ignored
         // this earlier on in the send process.
         //
         if ( (!next->mURL) && (next->m_uri.IsEmpty()) )
         {
-          attachments[i].m_done = PR_TRUE;
+          attachments[i].m_done = true;
           m_mime_delivery_state->GetPendingAttachmentCount(&pendingAttachmentCount);
           m_mime_delivery_state->SetPendingAttachmentCount(pendingAttachmentCount - 1);
-          next->mPartUserOmissionOverride = PR_TRUE;
+          next->mPartUserOmissionOverride = true;
           next = nsnull;
           continue;
         }
 
         break;
       }
     }
 
--- a/mailnews/compose/src/nsMsgCompFields.cpp
+++ b/mailnews/compose/src/nsMsgCompFields.cpp
@@ -57,25 +57,25 @@ NS_IMPL_THREADSAFE_ISUPPORTS1(nsMsgCompF
 nsMsgCompFields::nsMsgCompFields()
 {
   PRInt16 i;
   for (i = 0; i < MSG_MAX_HEADERS; i ++)
     m_headers[i] = nsnull;
 
   m_body.Truncate();
 
-  m_attachVCard = PR_FALSE;
-  m_forcePlainText = PR_FALSE;
-  m_useMultipartAlternative = PR_FALSE;
-  m_returnReceipt = PR_FALSE;
+  m_attachVCard = false;
+  m_forcePlainText = false;
+  m_useMultipartAlternative = false;
+  m_returnReceipt = false;
   m_receiptHeaderType = nsIMsgMdnGenerator::eDntType;
-  m_DSN = PR_FALSE;
-  m_bodyIsAsciiOnly = PR_FALSE;
-  m_forceMsgEncoding = PR_FALSE;
-  m_needToCheckCharset = PR_TRUE;
+  m_DSN = false;
+  m_bodyIsAsciiOnly = false;
+  m_forceMsgEncoding = false;
+  m_needToCheckCharset = true;
 
   // Get the default charset from pref, use this as a mail charset.
   nsString charset;
   NS_GetLocalizedUnicharPreferenceWithDefault(nsnull, "mailnews.send_default_charset", 
                                               NS_LITERAL_STRING("ISO-8859-1"), charset);
 
   LossyCopyUTF16toASCII(charset, m_DefaultCharacterSet); // Charsets better be ASCII
   SetCharacterSet(m_DefaultCharacterSet.get());
@@ -605,17 +605,17 @@ nsMsgCompFields::SplitRecipients(const n
     for (i = 0; i < numAddresses; ++i)
     {
       nsCString fullAddress;
       nsAutoString recipient;
       if (!aEmailAddressOnly)
       {
         nsCString decodedName;
         converter->DecodeMimeHeaderToCharPtr(pNames, GetCharacterSet(),
-                                             PR_FALSE, PR_TRUE,
+                                             false, true,
                                              getter_Copies(decodedName));
         rv = parser->MakeFullAddressString((!decodedName.IsEmpty() ?
                                             decodedName.get() : pNames),
                                            pAddresses,
                                            getter_Copies(fullAddress));
       }
       if (NS_SUCCEEDED(rv) && !aEmailAddressOnly)
         rv = ConvertToUnicode("UTF-8", fullAddress, recipient);
@@ -677,17 +677,17 @@ nsresult nsMsgCompFields::SplitRecipient
   {
     char *pNames = names;
     char *pAddresses = addresses;
 
     for (PRUint32 i = 0; i < numAddresses; ++i)
     {
       nsCString fullAddress;
       nsCString decodedName;
-      converter->DecodeMimeHeaderToCharPtr(pNames, GetCharacterSet(), PR_FALSE, PR_TRUE, 
+      converter->DecodeMimeHeaderToCharPtr(pNames, GetCharacterSet(), false, true, 
                                            getter_Copies(decodedName));
       rv = parser->MakeFullAddressString((!decodedName.IsEmpty() ? 
                                           decodedName.get() : pNames), 
                                          pAddresses, 
                                          getter_Copies(fullAddress));
 
       nsMsgRecipient msgRecipient;
 
--- a/mailnews/compose/src/nsMsgCompFields.h
+++ b/mailnews/compose/src/nsMsgCompFields.h
@@ -45,17 +45,17 @@
 #include "nsTArray.h"
 #include "nsCOMArray.h"
 #include "nsCOMPtr.h"
 #include "nsStringGlue.h"
 
 struct nsMsgRecipient
 {
   nsMsgRecipient() : mPreferFormat(nsIAbPreferMailFormat::unknown),
-                     mProcessed(PR_FALSE) {}
+                     mProcessed(false) {}
 
   nsMsgRecipient(const nsMsgRecipient &other)
   {
     mAddress = other.mAddress;
     mEmail = other.mEmail;
     mPreferFormat = other.mPreferFormat;
     mProcessed = other.mProcessed;
   }
--- a/mailnews/compose/src/nsMsgCompUtils.cpp
+++ b/mailnews/compose/src/nsMsgCompUtils.cpp
@@ -174,17 +174,17 @@ nsMsgMIMESetConformToStandard (bool conf
 {
   /*
   * If we are conforming to mime standard no matter what we set
   * for the headers preference when generating mime headers we should
   * also conform to the standard. Otherwise, depends the preference
   * we set. For now, the headers preference is not accessible from UI.
   */
   if (conform_p)
-    mime_headers_use_quoted_printable_p = PR_TRUE;
+    mime_headers_use_quoted_printable_p = true;
   else {
     nsresult rv;
     nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
     if (NS_SUCCEEDED(rv)) {
       prefs->GetBoolPref("mail.strictly_mime_headers", &mime_headers_use_quoted_printable_p);
     }
   }
 }
@@ -382,27 +382,27 @@ mime_generate_headers (nsMsgCompFields *
         PRInt32 receipt_header_type = nsIMsgMdnGenerator::eDntType;
         fields->GetReceiptHeaderType(&receipt_header_type);
 
       // nsIMsgMdnGenerator::eDntType = MDN Disposition-Notification-To: ;
       // nsIMsgMdnGenerator::eRrtType = Return-Receipt-To: ;
       // nsIMsgMdnGenerator::eDntRrtType = both MDN DNT and RRT headers .
       if (receipt_header_type != nsIMsgMdnGenerator::eRrtType)
         ENCODE_AND_PUSH(
-	  "Disposition-Notification-To: ", PR_TRUE, pFrom, charset, usemime);
+	  "Disposition-Notification-To: ", true, pFrom, charset, usemime);
       if (receipt_header_type != nsIMsgMdnGenerator::eDntType)
         ENCODE_AND_PUSH(
-	  "Return-Receipt-To: ", PR_TRUE, pFrom, charset, usemime);
+	  "Return-Receipt-To: ", true, pFrom, charset, usemime);
     }
 
 #ifdef SUPPORT_X_TEMPLATE_NAME
     if (deliver_mode == MSG_SaveAsTemplate) {
       const char *pStr = fields->GetTemplateName();
       pStr = pStr ? pStr : "";
-      ENCODE_AND_PUSH("X-Template: ", PR_FALSE, pStr, charset, usemime);
+      ENCODE_AND_PUSH("X-Template: ", false, pStr, charset, usemime);
     }
 #endif /* SUPPORT_X_TEMPLATE_NAME */
   }
 
   PRExplodedTime now;
   PR_ExplodeTime(PR_Now(), PR_LocalTimeParameters, &now);
   int gmtoffset = (now.tm_params.tp_gmt_offset + now.tm_params.tp_dst_offset) / 60;
 
@@ -420,27 +420,27 @@ mime_generate_headers (nsMsgCompFields *
         "%c%02d%02d" CRLF,
         (gmtoffset >= 0 ? '+' : '-'),
         ((gmtoffset >= 0 ? gmtoffset : -gmtoffset) / 60),
         ((gmtoffset >= 0 ? gmtoffset : -gmtoffset) % 60));
   buffer_tail += PL_strlen (buffer_tail);
 
   if (pFrom && *pFrom)
   {
-    ENCODE_AND_PUSH("From: ", PR_TRUE, pFrom, charset, usemime);
+    ENCODE_AND_PUSH("From: ", true, pFrom, charset, usemime);
   }
 
   if (pReplyTo && *pReplyTo)
   {
-    ENCODE_AND_PUSH("Reply-To: ", PR_TRUE, pReplyTo, charset, usemime);
+    ENCODE_AND_PUSH("Reply-To: ", true, pReplyTo, charset, usemime);
   }
 
   if (pOrg && *pOrg)
   {
-    ENCODE_AND_PUSH("Organization: ", PR_FALSE, pOrg, charset, usemime);
+    ENCODE_AND_PUSH("Organization: ", false, pOrg, charset, usemime);
   }
 
   // X-Mozilla-Draft-Info
   if (isDraft)
   {
     PUSH_STRING(HEADER_X_MOZILLA_DRAFT_INFO);
     PUSH_STRING(": internal/draft; ");
     if (fields->GetAttachVCard())
@@ -544,18 +544,18 @@ mime_generate_headers (nsMsgCompFields *
     if (NS_FAILED(rv)) 
     {
       *status = rv;
       return nsnull;
     }
 
     // fixme:the newsgroups header had better be encoded as the server-side
     // character encoding, but this |charset| might be different from it.
-    ENCODE_AND_PUSH("Newsgroups: ", PR_FALSE, newsgroupsHeaderVal.get(),
-                    charset, PR_FALSE);
+    ENCODE_AND_PUSH("Newsgroups: ", false, newsgroupsHeaderVal.get(),
+                    charset, false);
 
     // If we are here, we are NOT going to send this now. (i.e. it is a Draft,
     // Send Later file, etc...). Because of that, we need to store what the user
     // typed in on the original composition window for use later when rebuilding
     // the headers
     if (deliver_mode != nsIMsgSend::nsMsgDeliverNow && deliver_mode != nsIMsgSend::nsMsgSendUnsent)
     {
       // This is going to be saved for later, that means we should just store
@@ -563,17 +563,17 @@ mime_generate_headers (nsMsgCompFields *
       // header for later use by "Send Unsent Messages", "Drafts" or "Templates"
       PUSH_STRING (HEADER_X_MOZILLA_NEWSHOST);
       PUSH_STRING (": ");
       PUSH_STRING (newshostHeaderVal.get());
       PUSH_NEWLINE ();
     }
 
     PR_FREEIF(duppedNewsGrp);
-    hasDisclosedRecipient = PR_TRUE;
+    hasDisclosedRecipient = true;
   }
 
   /* #### shamelessly duplicated from above */
   if (pFollow && *pFollow) {
     /* turn whitespace into a comma list
     */
     char *duppedFollowup = PL_strdup(pFollow);
     if (!duppedFollowup) {
@@ -597,28 +597,28 @@ mime_generate_headers (nsMsgCompFields *
       char *ptr2 = ptr+1;
       while(IS_SPACE(*ptr2))
         ptr2++;
 
       if(ptr2 != ptr+1)
         PL_strcpy(ptr+1, ptr2);
     }
 
-    ENCODE_AND_PUSH("Followup-To: ", PR_FALSE, n2, charset, PR_FALSE);
+    ENCODE_AND_PUSH("Followup-To: ", false, n2, charset, false);
     PR_Free (duppedFollowup);
   }
 
   if (pTo && *pTo) {
-    ENCODE_AND_PUSH("To: ", PR_TRUE, pTo, charset, usemime);
-    hasDisclosedRecipient = PR_TRUE;
+    ENCODE_AND_PUSH("To: ", true, pTo, charset, usemime);
+    hasDisclosedRecipient = true;
   }
 
   if (pCc && *pCc) {
-    ENCODE_AND_PUSH("CC: ", PR_TRUE, pCc, charset, usemime);
-    hasDisclosedRecipient = PR_TRUE;
+    ENCODE_AND_PUSH("CC: ", true, pCc, charset, usemime);
+    hasDisclosedRecipient = true;
   }
 
   // If we don't have disclosed recipient (only Bcc), address the message to
   // undisclosed-recipients to prevent problem with some servers
 
   // If we are saving the message as a draft, don't bother inserting the undisclosed recipients field. We'll take care of that when we
   // really send the message.
   if (!hasDisclosedRecipient && !isDraft) 
@@ -648,17 +648,17 @@ mime_generate_headers (nsMsgCompFields *
               }
           }
         }
       }
     }
   }
 
   if (pSubject && *pSubject)
-    ENCODE_AND_PUSH("Subject: ", PR_FALSE, pSubject, charset, usemime);
+    ENCODE_AND_PUSH("Subject: ", false, pSubject, charset, usemime);
 
   // Skip no or empty priority.
   if (pPriority && *pPriority) 
   {
     nsMsgPriorityValue priorityValue;
 
     NS_MsgGetPriorityFromString(pPriority, priorityValue);
 
@@ -739,17 +739,17 @@ GenerateGlobalRandomBytes(unsigned char 
 
   if (firstTime)
   {
     // Seed the random-number generator with current time so that
     // the numbers will be different every time we run.
     PRInt32 aTime;
     LL_L2I(aTime, PR_Now());
     srand( (unsigned)aTime );
-    firstTime = PR_FALSE;
+    firstTime = false;
   }
 
   for( PRInt32 i = 0; i < len; i++ )
     buf[i] = rand() % 10;
 }
 
 char
 *mime_make_separator(const char *prefix)
@@ -1072,17 +1072,17 @@ CONTENT_LOC_HACK:
     }
     buf.Append("\"" CRLF);
 
     /* rhp: this is to try to get around this fun problem with Content-Location */
     if (!useContentLocation) {
       buf.Append("Content-Location: \"");
       s = base_url;
       col = 0;
-      useContentLocation = PR_TRUE;
+      useContentLocation = true;
       goto CONTENT_LOC_HACK;
     }
     /* rhp: this is to try to get around this fun problem with Content-Location */
 
 GIVE_UP_ON_CONTENT_BASE:
     ;
   }
 #endif /* GENERATE_CONTENT_BASE */
@@ -1174,26 +1174,26 @@ RFC2231ParmFolding(const char *parmName,
                    const char *language, const nsString& parmValue)
 {
   NS_ENSURE_TRUE(parmName && *parmName && !parmValue.IsEmpty(), nsnull);
 
   bool needEscape;
   nsCString dupParm;
 
   if (!NS_IsAscii(parmValue.get()) || is7bitCharset(charset)) {
-    needEscape = PR_TRUE;
+    needEscape = true;
     nsCAutoString nativeParmValue;
     ConvertFromUnicode(charset.get(), parmValue, nativeParmValue);
     MsgEscapeString(nativeParmValue, nsINetUtil::ESCAPE_ALL, dupParm);
   }
   else {
-    needEscape = PR_FALSE;
+    needEscape = false;
     dupParm.Adopt(
       msg_make_filename_qtext(NS_LossyConvertUTF16toASCII(parmValue).get(),
-                              PR_TRUE));
+                              true));
   }
 
   if (dupParm.IsEmpty())
     return nsnull;
 
   PRInt32 parmNameLen = PL_strlen(parmName);
   PRInt32 parmValueLen = dupParm.Length();
 
@@ -1316,17 +1316,17 @@ RFC2231ParmFolding(const char *parmName,
 }
 
 /*static */ char *
 LegacyParmFolding(const nsCString& aCharset,
                   const nsCString& aFileName, PRInt32 aParmFolding)
 {
   bool usemime = nsMsgMIMEGetConformToStandard();
   char *encodedRealName =
-    nsMsgI18NEncodeMimePartIIStr(aFileName.get(), PR_FALSE, aCharset.get(),
+    nsMsgI18NEncodeMimePartIIStr(aFileName.get(), false, aCharset.get(),
                                  0, usemime);
 
   if (!encodedRealName || !*encodedRealName) {
     PR_FREEIF(encodedRealName);
     encodedRealName = (char *) PR_Malloc(aFileName.Length() + 1);
     if (encodedRealName)
       PL_strcpy(encodedRealName, aFileName.get());
   }
@@ -1340,25 +1340,25 @@ LegacyParmFolding(const nsCString& aChar
   }
   return encodedRealName;
 }
 
 bool
 mime_7bit_data_p (const char *string, PRUint32 size)
 {
   if ((!string) || (!*string))
-    return PR_TRUE;
+    return true;
 
   char *ptr = (char *)string;
   for (PRUint32 i=0; i<size; i++)
   {
     if ((unsigned char) ptr[i] > 0x7F)
-      return PR_FALSE;
+      return false;
   }
-  return PR_TRUE;
+  return true;
 }
 
 /* Strips whitespace, and expands newlines into newline-tab for use in
    mail headers.  Returns a new string or 0 (if it would have been empty.)
    If addr_p is true, the addresses will be parsed and reemitted as
    rfc822 mailboxes.
  */
 char *
@@ -1432,38 +1432,38 @@ mime_fix_header_1 (const char *string, b
   }
 
   return new_string;
 }
 
 char *
 mime_fix_header (const char *string)
 {
-  return mime_fix_header_1 (string, PR_FALSE, PR_FALSE);
+  return mime_fix_header_1 (string, false, false);
 }
 
 char *
 mime_fix_addr_header (const char *string)
 {
-  return mime_fix_header_1 (string, PR_TRUE, PR_FALSE);
+  return mime_fix_header_1 (string, true, false);
 }
 
 char *
 mime_fix_news_header (const char *string)
 {
-  return mime_fix_header_1 (string, PR_FALSE, PR_TRUE);
+  return mime_fix_header_1 (string, false, true);
 }
 
 bool
 mime_type_requires_b64_p (const char *type)
 {
   if (!type || !PL_strcasecmp (type, UNKNOWN_CONTENT_TYPE))
   /* Unknown types don't necessarily require encoding.  (Note that
      "unknown" and "application/octet-stream" aren't the same.) */
-  return PR_FALSE;
+  return false;
 
   else if (!PL_strncasecmp (type, "image/", 6) ||
        !PL_strncasecmp (type, "audio/", 6) ||
        !PL_strncasecmp (type, "video/", 6) ||
        !PL_strncasecmp (type, "application/", 12))
   {
     /* The following types are application/ or image/ types that are actually
      known to contain textual data (meaning line-based, not binary, where
@@ -1525,41 +1525,41 @@ mime_type_requires_b64_p (const char *ty
     "image/x-xbm",          /* IMAGE_XBM2 */
     "image/xbm",          /* IMAGE_XBM3 */
     "image/x-xpixmap",
     "image/x-xpm",
     0 };
     const char **s;
     for (s = app_and_image_types_which_are_really_text; *s; s++)
     if (!PL_strcasecmp (type, *s))
-      return PR_FALSE;
+      return false;
 
     /* All others must be assumed to be binary formats, and need Base64. */
-    return PR_TRUE;
+    return true;
   }
 
   else
-  return PR_FALSE;
+  return false;
 }
 
 //
 // Some types should have a "charset=" parameter, and some shouldn't.
 // This is what decides.
 //
 bool
 mime_type_needs_charset (const char *type)
 {
   /* Only text types should have charset. */
   if (!type || !*type)
-    return PR_FALSE;
+    return false;
   else
     if (!PL_strncasecmp (type, "text", 4))
-      return PR_TRUE;
+      return true;
     else
-      return PR_FALSE;
+      return false;
 }
 
 /* Given a string, convert it to 'qtext' (quoted text) for RFC822 header purposes. */
 char *
 msg_make_filename_qtext(const char *srcText, bool stripCRLFs)
 {
   /* newString can be at most twice the original string (every char quoted). */
   char *newString = (char *) PR_Malloc(PL_strlen(srcText)*2 + 1);
@@ -1763,22 +1763,22 @@ nsMsgIsLocalFile(const char *url)
     A url is considered as a local file if it's start with file://
     But on Window, we need to filter UNC file url because there
     are not really local file. Those start with file:////
   */
   if (PL_strncasecmp(url, "file://", 7) == 0)
   {
 #ifdef XP_WIN
     if (PL_strncasecmp(url, "file:////", 9) == 0)
-      return PR_FALSE;
+      return false;
 #endif
-    return PR_TRUE;
+    return true;
   }
   else
-    return PR_FALSE;
+    return false;
 }
 
 char
 *nsMsgGetLocalFileFromURL(const char *url)
 {
   char * finalPath;
   NS_ASSERTION(PL_strncasecmp(url, "file://", 7) == 0, "invalid url");
   finalPath = (char*)PR_Malloc(strlen(url));
@@ -2032,17 +2032,17 @@ ConvertBufToPlainText(nsString &aConBuf,
     nsCOMPtr<nsIHTMLToTextSink> textSink(do_QueryInterface(sink));
     NS_ENSURE_TRUE(textSink, NS_ERROR_FAILURE);
 
     nsString convertedText;
     textSink->Initialize(&convertedText, converterFlags, wrapWidth);
 
     parser->SetContentSink(sink);
 
-    parser->Parse(aConBuf, 0, NS_LITERAL_CSTRING("text/html"), PR_TRUE);
+    parser->Parse(aConBuf, 0, NS_LITERAL_CSTRING("text/html"), true);
     //
     // Now if we get here, we need to get from ASCII text to
     // UTF-8 format or there is a problem downstream...
     //
     if (NS_SUCCEEDED(rv))
     {
       aConBuf = convertedText;
     }
@@ -2062,30 +2062,30 @@ bool UseFormatFlowed(const char *charset
 {
   // Add format=flowed as in RFC 2646 unless asked to not do that.
   bool sendFlowed = true;
   bool disableForCertainCharsets = true;
   nsresult rv;
 
   nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
   if (NS_FAILED(rv))
-    return PR_FALSE;
+    return false;
 
   rv = prefs->GetBoolPref("mailnews.send_plaintext_flowed", &sendFlowed);
   if (NS_SUCCEEDED(rv) && !sendFlowed)
-    return PR_FALSE;
+    return false;
 
   // If we shouldn't care about charset, then we are finished
   // checking and can go on using format=flowed
   if(!charset)
-    return PR_TRUE;
+    return true;
   rv = prefs->GetBoolPref("mailnews.disable_format_flowed_for_cjk",
                           &disableForCertainCharsets);
   if (NS_SUCCEEDED(rv) && !disableForCertainCharsets)
-    return PR_TRUE;
+    return true;
 
   // Just the check for charset left.
 
   // This is a raw check and might include charsets which could
   // use format=flowed and might exclude charsets which couldn't
   // use format=flowed.
   //
   // The problem is the SPACE format=flowed inserts at the end of
--- a/mailnews/compose/src/nsMsgCompose.cpp
+++ b/mailnews/compose/src/nsMsgCompose.cpp
@@ -185,36 +185,36 @@ static void GetTopmostMsgWindowCharacter
       msgWindow->GetCharsetOverride(charsetOverride);
     }
   }
 }
 
 nsMsgCompose::nsMsgCompose()
 {
 
-  mQuotingToFollow = PR_FALSE;
-  mInsertingQuotedContent = PR_FALSE;
+  mQuotingToFollow = false;
+  mInsertingQuotedContent = false;
   mWhatHolder = 1;
   m_window = nsnull;
   m_editor = nsnull;
   mQuoteStreamListener=nsnull;
-  mCharsetOverride = PR_FALSE;
-  mDeleteDraft = PR_FALSE;
+  mCharsetOverride = false;
+  mDeleteDraft = false;
   m_compFields = nsnull;    //m_compFields will be set during nsMsgCompose::Initialize
   mType = nsIMsgCompType::New;
 
   // For TagConvertible
   // Read and cache pref
-  mConvertStructs = PR_FALSE;
+  mConvertStructs = false;
   nsCOMPtr<nsIPrefBranch> prefBranch (do_GetService(NS_PREFSERVICE_CONTRACTID));
   if (prefBranch)
     prefBranch->GetBoolPref("converter.html2txt.structs", &mConvertStructs);
 
-  m_composeHTML = PR_FALSE;
-  mRecycledWindow = PR_TRUE;
+  m_composeHTML = false;
+  mRecycledWindow = true;
 }
 
 
 nsMsgCompose::~nsMsgCompose()
 {
   NS_IF_RELEASE(m_compFields);
   NS_IF_RELEASE(mQuoteStreamListener);
 }
@@ -293,35 +293,35 @@ bool nsMsgCompose::IsEmbeddedObjectSafe(
   nsresult rv;
 
   nsCOMPtr<nsIDOMHTMLImageElement> image;
   nsCOMPtr<nsIDOMHTMLLinkElement> link;
   nsCOMPtr<nsIDOMHTMLAnchorElement> anchor;
   nsAutoString objURL;
 
   if (!object || !originalScheme || !originalPath) //having a null host is ok...
-    return PR_FALSE;
+    return false;
 
   if ((image = do_QueryInterface(object)))
   {
     if (NS_FAILED(image->GetSrc(objURL)))
-      return PR_FALSE;
+      return false;
   }
   else if ((link = do_QueryInterface(object)))
   {
     if (NS_FAILED(link->GetHref(objURL)))
-      return PR_FALSE;
+      return false;
   }
   else if ((anchor = do_QueryInterface(object)))
   {
     if (NS_FAILED(anchor->GetHref(objURL)))
-      return PR_FALSE;
+      return false;
   }
   else
-    return PR_FALSE;
+    return false;
 
   if (!objURL.IsEmpty())
   {
     nsCOMPtr<nsIURI> uri;
     rv = NS_NewURI(getter_AddRefs(uri), objURL);
     if (NS_SUCCEEDED(rv) && uri)
     {
       nsCAutoString scheme;
@@ -334,24 +334,24 @@ bool nsMsgCompose::IsEmbeddedObjectSafe(
         if (NS_SUCCEEDED(rv) && (host.IsEmpty() || originalHost || host.Equals(originalHost, nsCaseInsensitiveCStringComparator())))
         {
           nsCAutoString path;
           rv = uri->GetPath(path);
           if (NS_SUCCEEDED(rv))
           {
             const char * query = strrchr(path.get(), '?');
             if (query && PL_strncasecmp(path.get(), originalPath, query - path.get()) == 0)
-                return PR_TRUE; //This object is a part of the original message, we can send it safely.
+                return true; //This object is a part of the original message, we can send it safely.
           }
         }
       }
     }
   }
 
-  return PR_FALSE;
+  return false;
 }
 
 /* Reset the uri's of embedded objects because we've saved the draft message, and the
    original message doesn't exist anymore.
  */
 nsresult nsMsgCompose::ResetUrisForEmbeddedObjects()
 {
   nsCOMPtr<nsISupportsArray> aNodeList;
@@ -448,17 +448,17 @@ nsresult nsMsgCompose::ResetUrisForEmbed
           continue;
         nsCString spec;
         newUrl->GetSpec(spec);
         nsString newSrc;
         // mailbox urls will have ?number=xxx; imap urls won't. We need to
         // handle both cases because we may be going from a mailbox url to
         // and imap url, or vice versa, depending on the original folder,
         // and the destination drafts folder.
-        PRBool specHasQ = (spec.FindChar('?') != kNotFound);
+        bool specHasQ = (spec.FindChar('?') != kNotFound);
         if (specHasQ && restOfUrl.CharAt(0) == '?')
           restOfUrl.SetCharAt('&', 0);
         else if (!specHasQ && restOfUrl.CharAt(0) == '&')
           restOfUrl.SetCharAt('?', 0);
         AppendUTF8toUTF16(spec, newSrc);
         newSrc.Append(restOfUrl);
         image->SetSrc(newSrc);
       }
@@ -573,17 +573,17 @@ nsMsgCompose::ConvertAndLoadComposeWindo
   // Note!  enableEditableFields in gComposeRecyclingListener::onReopen
   // will redundantly set this flag to writable, but it gets there
   // too late.
   PRUint32 flags = 0;
   m_editor->GetFlags(&flags);
   flags &= ~nsIPlaintextEditor::eEditorReadonlyMask;
   m_editor->SetFlags(flags);
 
-  m_editor->EnableUndo(PR_FALSE);
+  m_editor->EnableUndo(false);
 
   // Ok - now we need to figure out the charset of the aBuf we are going to send
   // into the editor shell. There are I18N calls to sniff the data and then we need
   // to call the new routine in the editor that will allow us to send in the charset
   //
 
   // Now, insert it into the editor...
   nsCOMPtr<nsIHTMLEditor> htmlEditor (do_QueryInterface(m_editor));
@@ -592,40 +592,40 @@ nsMsgCompose::ConvertAndLoadComposeWindo
   PRInt32 reply_on_top = 0;
   bool sig_bottom = true;
   m_identity->GetReplyOnTop(&reply_on_top);
   m_identity->GetSigBottom(&sig_bottom);
 
   bool sigOnTop = (reply_on_top == 1 && !sig_bottom);
   if (aQuoted)
   {
-    mInsertingQuotedContent = PR_TRUE;
+    mInsertingQuotedContent = true;
     if (!aPrefix.IsEmpty())
     {
       if (!aHTMLEditor)
         aPrefix.AppendLiteral("\n");
       textEditor->InsertText(aPrefix);
       m_editor->EndOfDocument();
     }
 
     if (!aBuf.IsEmpty() && mailEditor)
     {
       // This leaves the caret at the right place to insert a bottom signature.
       if (aHTMLEditor && !mCiteReference.IsEmpty())
         mailEditor->InsertAsCitedQuotation(aBuf,
                                            mCiteReference,
-                                           PR_TRUE,
+                                           true,
                                            getter_AddRefs(nodeInserted));
       else
         mailEditor->InsertAsQuotation(aBuf,
                                       getter_AddRefs(nodeInserted));
 
     }
 
-    mInsertingQuotedContent = PR_FALSE;
+    mInsertingQuotedContent = false;
 
     (void)TagEmbeddedObjects(mailEditor);
 
     if (!aSignature.IsEmpty())
     {
       //we cannot add it on top earlier, because TagEmbeddedObjects will mark all images in the signature as "moz-do-not-send"
       if( sigOnTop )
         m_editor->BeginningOfDocument();
@@ -638,19 +638,19 @@ nsMsgCompose::ConvertAndLoadComposeWindo
       if( sigOnTop )
         m_editor->EndOfDocument();
     }
   }
   else
   {
     if (aHTMLEditor && htmlEditor)
     {
-      mInsertingQuotedContent = PR_TRUE;
+      mInsertingQuotedContent = true;
       htmlEditor->RebuildDocumentFromSource(aBuf);
-      mInsertingQuotedContent = PR_FALSE;
+      mInsertingQuotedContent = false;
 
       // when forwarding a message as inline, tag any embedded objects
       // which refer to local images or files so we know not to include
       // send them
       if (mType == nsIMsgCompType::ForwardInline)
         (void)TagEmbeddedObjects(mailEditor);
 
       if (!aSignature.IsEmpty())
@@ -751,24 +751,24 @@ nsMsgCompose::ConvertAndLoadComposeWindo
       }
     }
   }
 
   nsCOMPtr<nsISelectionController> selCon;
   m_editor->GetSelectionController(getter_AddRefs(selCon));
 
   if (selCon)
-    selCon->ScrollSelectionIntoView(nsISelectionController::SELECTION_NORMAL, nsISelectionController::SELECTION_ANCHOR_REGION, PR_TRUE);
-
-  m_editor->EnableUndo(PR_TRUE);
-  SetBodyModified(PR_FALSE);
+    selCon->ScrollSelectionIntoView(nsISelectionController::SELECTION_NORMAL, nsISelectionController::SELECTION_ANCHOR_REGION, true);
+
+  m_editor->EnableUndo(true);
+  SetBodyModified(false);
 
 #ifdef MSGCOMP_TRACE_PERFORMANCE
   nsCOMPtr<nsIMsgComposeService> composeService (do_GetService(NS_MSGCOMPOSESERVICE_CONTRACTID));
-  composeService->TimeStamp("Finished inserting data into the editor. The window is finally ready!", PR_FALSE);
+  composeService->TimeStamp("Finished inserting data into the editor. The window is finally ready!", false);
 #endif
   return NS_OK;
 }
 
 /**
  * Check the identity pref to include signature on replies and forwards.
  */
 bool nsMsgCompose::CheckIncludeSignaturePrefs(nsIMsgIdentity *identity)
@@ -1011,21 +1011,21 @@ nsresult nsMsgCompose::_SendMsg(MSG_Deli
           // Apply entity conversion then convert to a mail charset.
           bool isAsciiOnly;
           rv = nsMsgI18NSaveAsCharset(attachment1_type, m_compFields->GetCharacterSet(),
                                       NS_ConvertUTF8toUTF16(bodyString).get(), &outCString,
                                       nsnull, &isAsciiOnly);
           if (NS_SUCCEEDED(rv))
           {
             if (m_compFields->GetForceMsgEncoding())
-              isAsciiOnly = PR_FALSE;
+              isAsciiOnly = false;
 
             m_compFields->SetBodyIsAsciiOnly(isAsciiOnly);
             bodyString = outCString;
-            newBody = PR_TRUE;
+            newBody = true;
           }
         }
       }
 
       bodyLength = PL_strlen(bodyString);
 
       // Create the listener for the send operation...
       nsCOMPtr<nsIMsgComposeSendListener> composeSendListener = do_CreateInstance(NS_MSGCOMPOSESENDLISTENER_CONTRACTID);
@@ -1131,17 +1131,17 @@ NS_IMETHODIMP nsMsgCompose::SendMsg(MSG_
       nsCString outCString;
       nsCString fallbackCharset;
       bool isAsciiOnly;
       // check if the body text is covered by the current charset.
       rv = nsMsgI18NSaveAsCharset(contentType, m_compFields->GetCharacterSet(),
                                   msgBody.get(), getter_Copies(outCString),
                                   getter_Copies(fallbackCharset), &isAsciiOnly);
       if (m_compFields->GetForceMsgEncoding())
-        isAsciiOnly = PR_FALSE;
+        isAsciiOnly = false;
       if (NS_SUCCEEDED(rv) && !outCString.IsEmpty())
       {
         // If the body contains characters outside the repertoire of the current
         // charset, just convert to UTF-8 and be done with it
         // unless disable_fallback_to_utf8 is set for this charset.
         if (NS_ERROR_UENC_NOMAPPING == rv && m_editor)
         {
           bool needToCheckCharset;
@@ -1165,17 +1165,17 @@ NS_IMETHODIMP nsMsgCompose::SendMsg(MSG_
         }
         else if (!fallbackCharset.IsEmpty())
         {
           // re-label to the fallback charset
           m_compFields->SetCharacterSet(fallbackCharset.get());
         }
         m_compFields->SetBodyIsAsciiOnly(isAsciiOnly);
         m_compFields->SetBody(outCString.get());
-        entityConversionDone = PR_TRUE;
+        entityConversionDone = true;
       }
       else
         m_compFields->SetBody(NS_LossyConvertUTF16toASCII(msgBody).get());
     }
   }
 
   // Let's open the progress dialog
   if (progress)
@@ -1198,17 +1198,17 @@ NS_IMETHODIMP nsMsgCompose::SendMsg(MSG_
           if (NS_FAILED(rv) || !params)
             return NS_ERROR_FAILURE;
 
           params->SetSubject(msgSubject.get());
           params->SetDeliveryMode(deliverMode);
 
           mProgress->OpenProgressDialog(m_window, aMsgWindow, 
                                         "chrome://messenger/content/messengercompose/sendProgress.xul", 
-                                        PR_FALSE, params);
+                                        false, params);
         }
       }
     }
 
     mProgress->OnStateChange(nsnull, nsnull, nsIWebProgressListener::STATE_START, NS_OK);
   }
 
   bool attachVCard = false;
@@ -1271,17 +1271,17 @@ NS_IMETHODIMP nsMsgCompose::SendMsg(MSG_
   if (NS_FAILED(rv))
   {
     nsCOMPtr<nsIMsgSendReport> sendReport;
     if (mMsgSend)
       mMsgSend->GetSendReport(getter_AddRefs(sendReport));
     if (sendReport)
     {
       nsresult theError;
-      sendReport->DisplayReport(prompt, PR_TRUE, PR_TRUE, &theError);
+      sendReport->DisplayReport(prompt, true, true, &theError);
     }
     else
     {
       /* If we come here it's because we got an error before we could intialize a
          send report! Let's try our best...
       */
       switch (deliverMode)
       {
@@ -1298,17 +1298,17 @@ NS_IMETHODIMP nsMsgCompose::SendMsg(MSG_
 
         default:
           nsMsgDisplayMessageByID(prompt, NS_ERROR_SEND_FAILED);
           break;
       }
     }
 
     if (progress)
-      progress->CloseProgressDialog(PR_TRUE);
+      progress->CloseProgressDialog(true);
   }
 
   return rv;
 }
 
 // XXX when do we break this ref to the listener?
 NS_IMETHODIMP nsMsgCompose::SetRecyclingListener(nsIMsgComposeRecyclingListener *aRecyclingListener)
 {
@@ -1366,17 +1366,17 @@ bool nsMsgCompose::IsLastWindow()
     {
       nsCOMPtr<nsISupports> isupports;
 
       if (NS_SUCCEEDED(windowEnumerator->GetNext(getter_AddRefs(isupports))))
         if (NS_SUCCEEDED(windowEnumerator->HasMoreElements(&more)))
           return !more;
     }
   }
-  return PR_TRUE;
+  return true;
 }
 
 NS_IMETHODIMP nsMsgCompose::CloseWindow(bool recycleIt)
 {
   nsresult rv;
 
   nsCOMPtr<nsIMsgComposeService> composeService = do_GetService(NS_MSGCOMPOSESERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
@@ -1393,26 +1393,26 @@ NS_IMETHODIMP nsMsgCompose::CloseWindow(
     if (NS_SUCCEEDED(rv))
     {
       nsCOMPtr<nsIHTMLEditor> htmlEditor (do_QueryInterface(m_editor));
       NS_ASSERTION(htmlEditor, "no editor");
       if (htmlEditor)
       {
         // XXX clear undo txn manager?
 
-        rv = m_editor->EnableUndo(PR_FALSE);
+        rv = m_editor->EnableUndo(false);
         NS_ENSURE_SUCCESS(rv,rv);
 
         rv = htmlEditor->RebuildDocumentFromSource(EmptyString());
         NS_ENSURE_SUCCESS(rv,rv);
 
-        rv = m_editor->EnableUndo(PR_TRUE);
+        rv = m_editor->EnableUndo(true);
         NS_ENSURE_SUCCESS(rv,rv);
 
-        SetBodyModified(PR_FALSE);
+        SetBodyModified(false);
       }
       if (mRecyclingListener)
       {
         mRecyclingListener->OnClose();
 
         /**
          * In order to really free the memory, we need to call the JS garbage collector for our window.
          * If we don't call GC, the nsIMsgCompose object held by JS will not be released despite we set
@@ -1452,17 +1452,17 @@ NS_IMETHODIMP nsMsgCompose::CloseWindow(
 }
 
 nsresult nsMsgCompose::Abort()
 {
   if (mMsgSend)
     mMsgSend->Abort();
 
   if (mProgress)
-    mProgress->CloseProgressDialog(PR_TRUE);
+    mProgress->CloseProgressDialog(true);
 
   return NS_OK;
 }
 
 nsresult nsMsgCompose::GetEditor(nsIEditor * *aEditor)
 {
   NS_IF_ADDREF(*aEditor = m_editor);
   return NS_OK;
@@ -1522,23 +1522,23 @@ NS_IMETHODIMP nsMsgCompose::InitEditor(n
 
 nsresult nsMsgCompose::GetBodyModified(bool * modified)
 {
   nsresult rv;
 
   if (! modified)
     return NS_ERROR_NULL_POINTER;
 
-  *modified = PR_TRUE;
+  *modified = true;
 
   if (m_editor)
   {
     rv = m_editor->GetDocumentModified(modified);
     if (NS_FAILED(rv))
-      *modified = PR_TRUE;
+      *modified = true;
   }
 
   return NS_OK;
 }
 
 nsresult nsMsgCompose::SetBodyModified(bool modified)
 {
   nsresult  rv = NS_OK;
@@ -1873,17 +1873,17 @@ nsresult nsMsgCompose::CreateMessage(con
 
       // get an original charset, used for a label, UTF-8 is used for the internal processing
       if (isFirstPass && !charset.IsEmpty())
         m_compFields->SetCharacterSet(charset.get());
 
       nsCString subjectCStr;
       (void) msgHdr->GetSubject(getter_Copies(subjectCStr));
       rv = mimeConverter->DecodeMimeHeader(subjectCStr.get(), originCharset.get(),
-                                           charsetOverride, PR_TRUE, subject);
+                                           charsetOverride, true, subject);
       if (NS_FAILED(rv)) return rv;
 
       // Check if (was: is present in the subject
       PRInt32 wasOffset = subject.RFind(NS_LITERAL_STRING(" (was:"));
       bool strip = true;
 
       if (wasOffset >= 0) {
         // Check the number of references, to check if was: should be stripped
@@ -1907,24 +1907,24 @@ nsresult nsMsgCompose::CreateMessage(con
               nsCOMPtr<nsIMsgDBHdr> refHdr;
               db->GetMsgHdrForMessageID(reference.get(), getter_AddRefs(refHdr));
 
               if (refHdr) {
                 nsCString refSubject;
                 rv = refHdr->GetSubject(getter_Copies(refSubject));
                 if (NS_SUCCEEDED(rv)) {
                   if (refSubject.Find(" (was:") >= 0)
-                    strip = PR_FALSE;
+                    strip = false;
                 }
               }
             }
           }
         }
         else
-          strip = PR_FALSE;
+          strip = false;
       }
 
       if (strip && wasOffset >= 0) {
         // Strip off the "(was: old subject)" part
         subject.Assign(Substring(subject, 0, wasOffset));
       }
 
       switch (type)
@@ -1937,17 +1937,17 @@ nsresult nsMsgCompose::CreateMessage(con
         case nsIMsgCompType::ReplyToSender:
         case nsIMsgCompType::ReplyToSenderAndGroup:
           {
             if (!isFirstPass)       // safeguard, just in case...
             {
               PR_Free(uriList);
               return rv;
             }
-            mQuotingToFollow = PR_TRUE;
+            mQuotingToFollow = true;
 
             subject.Insert(NS_LITERAL_STRING("Re: "), 0);
             m_compFields->SetSubject(subject);
 
             nsCString author, authorEmailAddress;
             msgHdr->GetAuthor(getter_Copies(author));
 
             nsCString recipients, recipientsEmailAddresses;
@@ -2028,33 +2028,33 @@ nsresult nsMsgCompose::CreateMessage(con
                   continue;
 
                 nsCString curIdentityEmail;
                 lookupIdentity->GetEmail(curIdentityEmail);
 
                 // See if it's a reply to own message, but not a reply between identities.
                 if (curIdentityEmail.Equals(authorEmailAddress))
                 {
-                  isReplyToOwnMsg = PR_TRUE;
+                  isReplyToOwnMsg = true;
                   // For a true reply-to-self, none of your identities are in To or CC.
                   for (PRUint32 j = 0; j < count; j++)
                   {
                     nsCOMPtr<nsIMsgIdentity> lookupIdentity2;
                     rv = identities->QueryElementAt(j, NS_GET_IID(nsIMsgIdentity),
                                                     getter_AddRefs(lookupIdentity2));
                     if (NS_FAILED(rv))
                       continue;
 
                     nsCString curIdentityEmail2;
                     lookupIdentity2->GetEmail(curIdentityEmail2);
                     if (recipientsEmailAddresses.Find(curIdentityEmail2) != kNotFound ||
                         ccListEmailAddresses.Find(curIdentityEmail2) != kNotFound)
                     {
                       // An identity among the recipients -> not reply-to-self.
-                      isReplyToOwnMsg = PR_FALSE;
+                      isReplyToOwnMsg = false;
                       break;
                     }
                   }
                   break;
                 }
               }
             }
 
@@ -2097,17 +2097,17 @@ nsresult nsMsgCompose::CreateMessage(con
 
             PRUint32 flags;
 
             msgHdr->GetFlags(&flags);
             if (flags & nsMsgMessageFlags::HasRe)
               subject.Insert(NS_LITERAL_STRING("Re: "), 0);
 
             // Setup quoting callbacks for later...
-            mQuotingToFollow = PR_FALSE;  //We don't need to quote the original message.
+            mQuotingToFollow = false;  //We don't need to quote the original message.
             nsCOMPtr<nsIMsgAttachment> attachment = do_CreateInstance(NS_MSGATTACHMENT_CONTRACTID, &rv);
             if (NS_SUCCEEDED(rv) && attachment)
             {
               bool addExtension = true;
               nsString sanitizedSubj;
               prefs->GetBoolPref("mail.forward_add_extension", &addExtension);
 
               // copy subject string to sanitizedSubj, use default if empty
@@ -2172,17 +2172,17 @@ nsresult nsMsgCompose::CreateMessage(con
             m_compFields->SetCc(empty);
             m_compFields->SetBcc(empty);
             m_compFields->SetNewsgroups(empty);
             m_compFields->SetFollowupTo(empty);
             break;
           }
       }
     }
-    isFirstPass = PR_FALSE;
+    isFirstPass = false;
     uri = nextUri + 1;
   }
   while (nextUri);
   PR_Free(uriList);
   return rv;
 }
 
 NS_IMETHODIMP nsMsgCompose::GetProgress(nsIMsgProgress **_retval)
@@ -2314,31 +2314,31 @@ QuotingOutputStreamListener::QuotingOutp
                          replyHeaderOndate,
                          replyHeaderSeparator,
                          replyHeaderColon,
                          replyHeaderOriginalmessage);
 
       switch (replyHeaderType)
       {
         case 0: // No reply header at all
-          header=PR_FALSE;
-          headerDate=PR_FALSE;
+          header=false;
+          headerDate=false;
           break;
 
         case 2: // Insert both the original author and date in the reply header (date followed by author)
         case 3: // Insert both the original author and date in the reply header (author followed by date)
-          header=PR_TRUE;
-          headerDate=PR_TRUE;
+          header=true;
+          headerDate=true;
           break;
 
         case 4: // XXX implement user specified header
         case 1: // Default is to only view the author. We will reconsider this decision when bug 75377 is fixed.
         default:
-          header=PR_TRUE;
-          headerDate=PR_FALSE;
+          header=true;
+          headerDate=false;
           break;
       }
 
       nsAutoString citePrefixDate;
       nsAutoString citePrefixAuthor;
 
       if (header)
       {
@@ -2405,17 +2405,17 @@ QuotingOutputStreamListener::QuotingOutp
           {
             nsCString decodedAuthor;
             // Decode header, the result string is null
             // if the input is not MIME encoded ASCII.
             if (mMimeConverter)
               mMimeConverter->DecodeMimeHeaderToCharPtr(authorName.get(),
                                                         charset,
                                                         charetOverride,
-                                                        PR_TRUE, 
+                                                        true, 
                                                         getter_Copies(decodedAuthor));
             formattedString = nsTextFormatter::smprintf(replyHeaderAuthorwrote.get(), 
                                                         (!decodedAuthor.IsEmpty() ? 
                                                          decodedAuthor.get() : authorName.get()));
           }
           else
           {
             formattedString = nsTextFormatter::smprintf(replyHeaderAuthorwrote.get(),
@@ -2497,17 +2497,17 @@ NS_IMETHODIMP QuotingOutputStreamListene
 {
   nsresult rv = NS_OK;
   nsAutoString aCharset;
 
   if (!mHtmlToQuote.IsEmpty())
   {
     // If we had a selection in the original message to quote, we can add
     // it now that we are done ignoring the original body of the message
-    mHeadersOnly = PR_FALSE;
+    mHeadersOnly = false;
     rv = AppendToMsgBody(mHtmlToQuote);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   nsCOMPtr<nsIMsgCompose> compose = do_QueryReferent(mWeakComposeObj);
   if (compose)
   {
     MSG_ComposeType type;
@@ -2547,23 +2547,23 @@ NS_IMETHODIMP QuotingOutputStreamListene
         {
           mMimeConverter = do_GetService(NS_MIME_CONVERTER_CONTRACTID, &rv);
           NS_ENSURE_SUCCESS(rv, rv);
         }
         nsCString charset;
         compFields->GetCharacterSet(getter_Copies(charset));
 
         // Populate the AllReply compField.
-        mHeaders->ExtractHeader(HEADER_TO, PR_TRUE, getter_Copies(outCString));
+        mHeaders->ExtractHeader(HEADER_TO, true, getter_Copies(outCString));
         ConvertRawBytesToUTF16(outCString, charset.get(), recipient);
 
-        mHeaders->ExtractHeader(HEADER_CC, PR_TRUE, getter_Copies(outCString));
+        mHeaders->ExtractHeader(HEADER_CC, true, getter_Copies(outCString));
         ConvertRawBytesToUTF16(outCString, charset.get(), cc);
 
-        mHeaders->ExtractHeader(HEADER_MAIL_FOLLOWUP_TO, PR_TRUE,
+        mHeaders->ExtractHeader(HEADER_MAIL_FOLLOWUP_TO, true,
                                 getter_Copies(outCString));
         ConvertRawBytesToUTF16(outCString, charset.get(), mailFollowupTo);
         if (! mailFollowupTo.IsEmpty())
         {
           // handle Mail-Followup-To (http://cr.yp.to/proto/replyto.html)
           compFields->SetAllReply(mailFollowupTo);
         }
         else
@@ -2577,17 +2577,17 @@ NS_IMETHODIMP QuotingOutputStreamListene
             replyCompValue.AppendLiteral(", ");
           replyCompValue.Append(cc);
           compFields->SetAllReply(replyCompValue);
         }
 
         if (type == nsIMsgCompType::ReplyAll)
         {
           // preserve BCC for the reply-to-self case
-          mHeaders->ExtractHeader(HEADER_BCC, PR_TRUE, getter_Copies(outCString));
+          mHeaders->ExtractHeader(HEADER_BCC, true, getter_Copies(outCString));
           if (!outCString.IsEmpty())
           {
             nsAutoString bcc;
             ConvertRawBytesToUTF16(outCString, charset.get(), bcc);
             compFields->SetBcc(bcc);
           }
 
           if (! mailFollowupTo.IsEmpty())
@@ -2603,90 +2603,90 @@ NS_IMETHODIMP QuotingOutputStreamListene
 
             if (!replyCompValue.IsEmpty() && !outCCListString.IsEmpty())
               replyCompValue.AppendLiteral(", ");
 
             replyCompValue.Append(outCCListString);
             compFields->SetCc(replyCompValue);
           }
 
-          needToRemoveDup = PR_TRUE;
+          needToRemoveDup = true;
         }
 
-        mHeaders->ExtractHeader(HEADER_LIST_POST, PR_TRUE, getter_Copies(outCString));
+        mHeaders->ExtractHeader(HEADER_LIST_POST, true, getter_Copies(outCString));
         if (!outCString.IsEmpty())
           mMimeConverter->DecodeMimeHeader(outCString.get(), charset.get(),
-                                           PR_FALSE, PR_TRUE, listPost);
+                                           false, true, listPost);
 
         if (!listPost.IsEmpty())
         {
           PRInt32 startPos = listPost.Find("<mailto:");
           PRInt32 endPos = listPost.FindChar('>', startPos);
           // Extract the e-mail address.
           if (endPos > startPos)
           {
             const PRUint32 mailtoLen = strlen("<mailto:");
             listPost = Substring(listPost, startPos + mailtoLen, endPos - (startPos + mailtoLen));
             compFields->SetListReply(listPost);
             if (type == nsIMsgCompType::ReplyToList)
               compFields->SetTo(listPost);
           }
         }
 
-        mHeaders->ExtractHeader(HEADER_REPLY_TO, PR_FALSE, getter_Copies(outCString));
+        mHeaders->ExtractHeader(HEADER_REPLY_TO, false, getter_Copies(outCString));
         ConvertRawBytesToUTF16(outCString, charset.get(), replyTo);
-        mHeaders->ExtractHeader(HEADER_MAIL_REPLY_TO, PR_TRUE, getter_Copies(outCString));
+        mHeaders->ExtractHeader(HEADER_MAIL_REPLY_TO, true, getter_Copies(outCString));
         ConvertRawBytesToUTF16(outCString, charset.get(), mailReplyTo);
 
-        mHeaders->ExtractHeader(HEADER_NEWSGROUPS, PR_FALSE, getter_Copies(outCString));
+        mHeaders->ExtractHeader(HEADER_NEWSGROUPS, false, getter_Copies(outCString));
         if (!outCString.IsEmpty())
           mMimeConverter->DecodeMimeHeader(outCString.get(), charset.get(),
-                                           PR_FALSE, PR_TRUE, newgroups);
-
-        mHeaders->ExtractHeader(HEADER_FOLLOWUP_TO, PR_FALSE, getter_Copies(outCString));
+                                           false, true, newgroups);
+
+        mHeaders->ExtractHeader(HEADER_FOLLOWUP_TO, false, getter_Copies(outCString));
         if (!outCString.IsEmpty())
           mMimeConverter->DecodeMimeHeader(outCString.get(), charset.get(),
-                                           PR_FALSE, PR_TRUE, followUpTo);
-
-        mHeaders->ExtractHeader(HEADER_MESSAGE_ID, PR_FALSE, getter_Copies(outCString));
+                                           false, true, followUpTo);
+
+        mHeaders->ExtractHeader(HEADER_MESSAGE_ID, false, getter_Copies(outCString));
         if (!outCString.IsEmpty())
           mMimeConverter->DecodeMimeHeader(outCString.get(), charset.get(),
-                                           PR_FALSE, PR_TRUE, messageId);
-
-        mHeaders->ExtractHeader(HEADER_REFERENCES, PR_FALSE, getter_Copies(outCString));
+                                           false, true, messageId);
+
+        mHeaders->ExtractHeader(HEADER_REFERENCES, false, getter_Copies(outCString));
         if (!outCString.IsEmpty())
           mMimeConverter->DecodeMimeHeader(outCString.get(), charset.get(),
-                                           PR_FALSE, PR_TRUE, references);
+                                           false, true, references);
 
         if (! mailReplyTo.IsEmpty())
         {
           // handle Mail-Reply-To (http://cr.yp.to/proto/replyto.html)
           compFields->SetSenderReply(mailReplyTo);
-          needToRemoveDup = PR_TRUE;
+          needToRemoveDup = true;
         }
         else if (! replyTo.IsEmpty())
         {
           // default behaviour for messages without Mail-Reply-To
           compFields->SetSenderReply(replyTo);
         }
 
         if (! ((type == nsIMsgCompType::ReplyAll) && ! mailFollowupTo.IsEmpty()) &&
             ! ((type == nsIMsgCompType::ReplyToList) && ! listPost.IsEmpty()))
         {
           if (! mailReplyTo.IsEmpty())
           {
             // handle Mail-Reply-To (http://cr.yp.to/proto/replyto.html)
             compFields->SetTo(mailReplyTo);
-            needToRemoveDup = PR_TRUE;
+            needToRemoveDup = true;
           }
           else if (! replyTo.IsEmpty())
           {
             // default behaviour for messages without Mail-Reply-To
             compFields->SetTo(replyTo);
-            needToRemoveDup = PR_TRUE;
+            needToRemoveDup = true;
           }
         }
 
         if (! newgroups.IsEmpty())
         {
           if ((type != nsIMsgCompType::Reply) && (type != nsIMsgCompType::ReplyToSender))
             compFields->SetNewsgroups(newgroups);
           if (type == nsIMsgCompType::ReplyToGroup)
@@ -2712,17 +2712,17 @@ NS_IMETHODIMP QuotingOutputStreamListene
             // the original sender's email
             if (!replyTo.IsEmpty())
             {
               compFields->SetSenderReply(replyTo);
               compFields->SetTo(replyTo);
             }
             else
             {
-              mHeaders->ExtractHeader(HEADER_FROM, PR_FALSE, getter_Copies(outCString));
+              mHeaders->ExtractHeader(HEADER_FROM, false, getter_Copies(outCString));
               if (!outCString.IsEmpty())
               {
                 nsAutoString from;
                 ConvertRawBytesToUTF16(outCString, charset.get(), from);
                 compFields->SetSenderReply(from);
                 compFields->SetTo(from);
               }
             }
@@ -2827,24 +2827,24 @@ NS_IMETHODIMP QuotingOutputStreamListene
             _compFields->SetCc(resultStr.get());
         }
 
       }
     }
 
 #ifdef MSGCOMP_TRACE_PERFORMANCE
     nsCOMPtr<nsIMsgComposeService> composeService (do_GetService(NS_MSGCOMPOSESERVICE_CONTRACTID));
-    composeService->TimeStamp("Done with MIME. Now we're updating the UI elements", PR_FALSE);
+    composeService->TimeStamp("Done with MIME. Now we're updating the UI elements", false);
 #endif
 
     if (mQuoteOriginal)
       compose->NotifyStateListeners(nsIMsgComposeNotificationType::ComposeFieldsReady, NS_OK);
 
 #ifdef MSGCOMP_TRACE_PERFORMANCE
-    composeService->TimeStamp("Addressing widget, window title and focus are now set, time to insert the body", PR_FALSE);
+    composeService->TimeStamp("Addressing widget, window title and focus are now set, time to insert the body", false);
 #endif
 
     if (! mHeadersOnly)
       mMsgBody.AppendLiteral("</html>");
 
     // Now we have an HTML representation of the quoted message.
     // If we are in plain text mode, we need to convert this to plain
     // text before we try to insert it into the editor. If we don't, we
@@ -2857,25 +2857,25 @@ NS_IMETHODIMP QuotingOutputStreamListene
     {
       // Downsampling. The charset should only consist of ascii.
 
       bool formatflowed =
         UseFormatFlowed(NS_LossyConvertUTF16toASCII(aCharset).get());
       ConvertToPlainText(formatflowed);
     }
 
-    compose->ProcessSignature(mIdentity, PR_TRUE, &mSignature);
+    compose->ProcessSignature(mIdentity, true, &mSignature);
 
     nsCOMPtr<nsIEditor> editor;
     if (NS_SUCCEEDED(compose->GetEditor(getter_AddRefs(editor))) && editor)
     {
       if (mQuoteOriginal)
         compose->ConvertAndLoadComposeWindow(mCitePrefix,
                                              mMsgBody, mSignature,
-                                             PR_TRUE, composeHTML);
+                                             true, composeHTML);
       else
         InsertToCompose(editor, composeHTML);
     }
 
     if (mQuoteOriginal)
       compose->NotifyStateListeners(nsIMsgComposeNotificationType::ComposeBodyReady, NS_OK);
   }
   return rv;
@@ -3021,41 +3021,41 @@ QuotingOutputStreamListener::InsertToCom
 {
   // First, get the nsIEditor interface for future use
   nsCOMPtr<nsIDOMNode> nodeInserted;
 
   TranslateLineEnding(mMsgBody);
 
   // Now, insert it into the editor...
   if (aEditor)
-    aEditor->EnableUndo(PR_TRUE);
+    aEditor->EnableUndo(true);
 
   nsCOMPtr<nsIMsgCompose> compose = do_QueryReferent(mWeakComposeObj);
   if (!mMsgBody.IsEmpty() && compose)
   {
-    compose->SetInsertingQuotedContent(PR_TRUE);
+    compose->SetInsertingQuotedContent(true);
     if (!mCitePrefix.IsEmpty())
     {
       if (!aHTMLEditor)
         mCitePrefix.AppendLiteral("\n");
       nsCOMPtr<nsIPlaintextEditor> textEditor (do_QueryInterface(aEditor));
       if (textEditor)
         textEditor->InsertText(mCitePrefix);
     }
 
     nsCOMPtr<nsIEditorMailSupport> mailEditor (do_QueryInterface(aEditor));
     if (mailEditor)
     {
       if (aHTMLEditor)
-        mailEditor->InsertAsCitedQuotation(mMsgBody, EmptyString(), PR_TRUE,
+        mailEditor->InsertAsCitedQuotation(mMsgBody, EmptyString(), true,
                                            getter_AddRefs(nodeInserted));
       else
         mailEditor->InsertAsQuotation(mMsgBody, getter_AddRefs(nodeInserted));
     }
-    compose->SetInsertingQuotedContent(PR_FALSE);
+    compose->SetInsertingQuotedContent(false);
   }
 
   if (aEditor)
   {
     nsCOMPtr<nsIPlaintextEditor> textEditor = do_QueryInterface(aEditor);
     if (textEditor)
     {
       nsCOMPtr<nsISelection> selection;
@@ -3081,17 +3081,17 @@ QuotingOutputStreamListener::InsertToCom
       aEditor->GetSelectionController(getter_AddRefs(selCon));
 
       if (selCon)
         // After ScrollSelectionIntoView(), the pending notifications might be
         // flushed and PresShell/PresContext/Frames may be dead. See bug 418470.
         selCon->ScrollSelectionIntoView(
                   nsISelectionController::SELECTION_NORMAL,
                   nsISelectionController::SELECTION_ANCHOR_REGION,
-                  PR_TRUE);
+                  true);
     }
   }
 
   return NS_OK;
 }
 
 NS_IMPL_ISUPPORTS3(QuotingOutputStreamListener,
                    nsIMsgQuotingOutputStreamListener,
@@ -3118,49 +3118,49 @@ NS_IMETHODIMP nsMsgCompose::GetType(MSG_
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgCompose::QuoteMessage(const char *msgURI)
 {
   nsresult    rv;
 
-  mQuotingToFollow = PR_FALSE;
+  mQuotingToFollow = false;
 
   // Create a mime parser (nsIStreamConverter)!
   mQuote = do_CreateInstance(NS_MSGQUOTE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr <nsIMsgDBHdr> msgHdr;
   rv = GetMsgDBHdrFromURI(msgURI, getter_AddRefs(msgHdr));
 
   // Create the consumer output stream.. this will receive all the HTML from libmime
   mQuoteStreamListener =
-    new QuotingOutputStreamListener(msgURI, msgHdr, PR_FALSE, !mHtmlToQuote.IsEmpty(), m_identity,
-                                    m_compFields->GetCharacterSet(), mCharsetOverride, PR_FALSE,
+    new QuotingOutputStreamListener(msgURI, msgHdr, false, !mHtmlToQuote.IsEmpty(), m_identity,
+                                    m_compFields->GetCharacterSet(), mCharsetOverride, false,
                                     mHtmlToQuote);
 
   if (!mQuoteStreamListener)
     return NS_ERROR_FAILURE;
   NS_ADDREF(mQuoteStreamListener);
 
   mQuoteStreamListener->SetComposeObj(this);
 
-  rv = mQuote->QuoteMessage(msgURI, PR_FALSE, mQuoteStreamListener,
+  rv = mQuote->QuoteMessage(msgURI, false, mQuoteStreamListener,
                             mCharsetOverride ? m_compFields->GetCharacterSet() : "",
-                            PR_FALSE, msgHdr);
+                            false, msgHdr);
   return rv;
 }
 
 nsresult
 nsMsgCompose::QuoteOriginalMessage() // New template
 {
   nsresult    rv;
 
-  mQuotingToFollow = PR_FALSE;
+  mQuotingToFollow = false;
 
   // Create a mime parser (nsIStreamConverter)!
   mQuote = do_CreateInstance(NS_MSGQUOTE_CONTRACTID, &rv);
   if (NS_FAILED(rv) || !mQuote)
     return NS_ERROR_FAILURE;
 
   bool bAutoQuote = true;
   m_identity->GetAutoQuote(&bAutoQuote);
@@ -3178,17 +3178,17 @@ nsMsgCompose::QuoteOriginalMessage() // 
     mOriginalMsgURI.Replace(0, 5, NS_LITERAL_CSTRING("mailbox:"));
     mOriginalMsgURI.AppendLiteral("?number=0");
   }
 
   // Create the consumer output stream.. this will receive all the HTML from libmime
   mQuoteStreamListener =
     new QuotingOutputStreamListener(mOriginalMsgURI.get(), originalMsgHdr, mWhatHolder != 1,
                                     !bAutoQuote || !mHtmlToQuote.IsEmpty(), m_identity,
-                                    mQuoteCharset.get(), mCharsetOverride, PR_TRUE, mHtmlToQuote);
+                                    mQuoteCharset.get(), mCharsetOverride, true, mHtmlToQuote);
 
   if (!mQuoteStreamListener)
     return NS_ERROR_FAILURE;
   NS_ADDREF(mQuoteStreamListener);
 
   mQuoteStreamListener->SetComposeObj(this);
 
   rv = mQuote->QuoteMessage(mOriginalMsgURI.get(), mWhatHolder != 1, mQuoteStreamListener,
@@ -3208,42 +3208,42 @@ void nsMsgCompose::CleanUpRecipients(nsS
 
   for (i = 0; i < recipients.Length(); i ++)
   {
     aChar = recipients[i];
     switch (aChar)
     {
       case '<'  :
         if (startANewRecipient)
-          removeBracket = PR_TRUE;
+          removeBracket = true;
         else
           newRecipient += aChar;
-        startANewRecipient = PR_FALSE;
+        startANewRecipient = false;
         break;
 
       case '>'  :
         if (removeBracket)
-          removeBracket = PR_FALSE;
+          removeBracket = false;
         else
           newRecipient += aChar;
         break;
 
       case ' '  :
         newRecipient += aChar;
         break;
 
       case ','  :
         newRecipient += aChar;
-        startANewRecipient = PR_TRUE;
-        removeBracket = PR_FALSE;
+        startANewRecipient = true;
+        removeBracket = false;
         break;
 
       default   :
         newRecipient += aChar;
-        startANewRecipient = PR_FALSE;
+        startANewRecipient = false;
         break;
     }
   }
   recipients = newRecipient;
 }
 
 NS_IMETHODIMP nsMsgCompose::RememberQueuedDisposition()
 {
@@ -3577,62 +3577,62 @@ nsresult nsMsgComposeSendListener::OnSto
       // only process the reply flags if we successfully sent the message
       msgCompose->ProcessReplyFlags();
       
       // See if there is a composer window
       bool hasDomWindow = true;
       nsCOMPtr<nsIDOMWindow> domWindow;
       rv = msgCompose->GetDomWindow(getter_AddRefs(domWindow));
       if (NS_FAILED(rv) || !domWindow)
-        hasDomWindow = PR_FALSE;
+        hasDomWindow = false;
 
       // Close the window ONLY if we are not going to do a save operation
       nsAutoString fieldsFCC;
       if (NS_SUCCEEDED(compFields->GetFcc(fieldsFCC)))
       {
         if (!fieldsFCC.IsEmpty())
         {
           if (fieldsFCC.LowerCaseEqualsLiteral("nocopy://"))
           {
             msgCompose->NotifyStateListeners(nsIMsgComposeNotificationType::ComposeProcessDone, NS_OK);
             if (progress)
             {
               progress->UnregisterListener(this);
-              progress->CloseProgressDialog(PR_FALSE);
+              progress->CloseProgressDialog(false);
             }
             if (hasDomWindow)
-              msgCompose->CloseWindow(PR_TRUE);
+              msgCompose->CloseWindow(true);
           }
         }
       }
       else
       {
         msgCompose->NotifyStateListeners(nsIMsgComposeNotificationType::ComposeProcessDone, NS_OK);
         if (progress)
         {
           progress->UnregisterListener(this);
-          progress->CloseProgressDialog(PR_FALSE);
+          progress->CloseProgressDialog(false);
         }
         if (hasDomWindow)
-          msgCompose->CloseWindow(PR_TRUE);  // if we fail on the simple GetFcc call, close the window to be safe and avoid
+          msgCompose->CloseWindow(true);  // if we fail on the simple GetFcc call, close the window to be safe and avoid
                                               // windows hanging around to prevent the app from exiting.
       }
 
       // Remove the current draft msg when sending draft is done.
       bool deleteDraft;
       msgCompose->GetDeleteDraft(&deleteDraft);
       if (deleteDraft)
-        RemoveCurrentDraftMessage(msgCompose, PR_FALSE);
+        RemoveCurrentDraftMessage(msgCompose, false);
     }
     else
     {
       msgCompose->NotifyStateListeners(nsIMsgComposeNotificationType::ComposeProcessDone, aStatus);
       if (progress)
       {
-        progress->CloseProgressDialog(PR_TRUE);
+        progress->CloseProgressDialog(true);
         progress->UnregisterListener(this);
       }
     }
 
   }
 
   nsCOMPtr<nsIMsgSendListener> composeSendListener = do_QueryReferent(mWeakComposeObj, &rv);
   if (NS_SUCCEEDED(rv) && composeSendListener)
@@ -3698,29 +3698,29 @@ nsMsgComposeSendListener::OnStopCopy(nsr
     {
       // We should only close the window if we are done. Things like templates
       // and drafts aren't done so their windows should stay open
       if (mDeliverMode == nsIMsgSend::nsMsgSaveAsDraft ||
           mDeliverMode == nsIMsgSend::nsMsgSaveAsTemplate)
       {
         msgCompose->NotifyStateListeners(nsIMsgComposeNotificationType::SaveInFolderDone, aStatus);
         // Remove the current draft msg when saving as draft/template is done.
-        msgCompose->SetDeleteDraft(PR_TRUE);
-        RemoveCurrentDraftMessage(msgCompose, PR_TRUE);
+        msgCompose->SetDeleteDraft(true);
+        RemoveCurrentDraftMessage(msgCompose, true);
       }
       else
       {
         // Remove (possible) draft if we're in send later mode
         if (mDeliverMode == nsIMsgSend::nsMsgQueueForLater ||
             mDeliverMode == nsIMsgSend::nsMsgDeliverBackground)
         {
-          msgCompose->SetDeleteDraft(PR_TRUE);
-          RemoveCurrentDraftMessage(msgCompose, PR_TRUE);
+          msgCompose->SetDeleteDraft(true);
+          RemoveCurrentDraftMessage(msgCompose, true);
         }
-        msgCompose->CloseWindow(PR_TRUE);
+        msgCompose->CloseWindow(true);
       }
     }
   }
 
   return rv;
 }
 
 nsresult
@@ -3787,20 +3787,20 @@ nsMsgComposeSendListener::RemoveCurrentD
           nsCOMPtr<nsIMutableArray> messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv));
           NS_ASSERTION(NS_SUCCEEDED(rv), "RemoveCurrentDraftMessage can't allocate array.");
 
           //nsCOMPtr<nsISupports> msgSupport = do_QueryInterface(msgDBHdr, &rv);
           //NS_ASSERTION(NS_SUCCEEDED(rv), "RemoveCurrentDraftMessage can't get msg header interface pointer.");
           if (NS_SUCCEEDED(rv) && messageArray)
           {
             // ready to delete the msg
-            rv = messageArray->AppendElement(msgDBHdr, PR_FALSE);
+            rv = messageArray->AppendElement(msgDBHdr, false);
             NS_ASSERTION(NS_SUCCEEDED(rv), "RemoveCurrentDraftMessage can't append msg header to array.");
             if (NS_SUCCEEDED(rv))
-              rv = msgFolder->DeleteMessages(messageArray, nsnull, PR_TRUE, PR_FALSE, nsnull, PR_FALSE /*allowUndo*/);
+              rv = msgFolder->DeleteMessages(messageArray, nsnull, true, false, nsnull, false /*allowUndo*/);
             NS_ASSERTION(NS_SUCCEEDED(rv), "RemoveCurrentDraftMessage can't delete message.");
           }
         }
       }
     }
     else
     {
       // If we get here we have the case where the draft folder
@@ -3832,17 +3832,17 @@ nsMsgComposeSendListener::RemoveCurrentD
           NS_ASSERTION(str, "Failed to get current draft id url");
           if (str)
           {
             nsCAutoString srcStr(str+1);
             nsresult err;
             nsMsgKey messageID = srcStr.ToInteger(&err);
             if (messageID != nsMsgKey_None)
             {
-              rv = imapFolder->StoreImapFlags(kImapMsgDeletedFlag, PR_TRUE,
+              rv = imapFolder->StoreImapFlags(kImapMsgDeletedFlag, true,
                                               &messageID, 1, nsnull);
             }
           }
         }
       }
     }
   }
 
@@ -3966,17 +3966,17 @@ nsMsgCompose::ConvertHTMLToText(nsILocal
 {
   nsresult    rv;
   nsAutoString    origBuf;
 
   rv = LoadDataFromFile(aSigFile, origBuf);
   if (NS_FAILED(rv))
     return rv;
 
-  ConvertBufToPlainText(origBuf,PR_FALSE);
+  ConvertBufToPlainText(origBuf,false);
   aSigData = origBuf;
   return NS_OK;
 }
 
 nsresult
 nsMsgCompose::ConvertTextToHTML(nsILocalFile *aSigFile, nsString &aSigData)
 {
   nsresult    rv;
@@ -4157,30 +4157,30 @@ nsMsgCompose::ProcessSignature(nsIMsgIde
     {
       rv = identity->GetSignature(getter_AddRefs(sigFile));
       if (NS_SUCCEEDED(rv) && sigFile) {
         rv = sigFile->GetNativePath(sigNativePath);
         if (NS_SUCCEEDED(rv) && !sigNativePath.IsEmpty()) {
           bool exists = false;
           sigFile->Exists(&exists);
           if (exists) {
-            useSigFile = PR_TRUE; // ok, there's a signature file
+            useSigFile = true; // ok, there's a signature file
 
             // Now, most importantly, we need to figure out what the content type is for
             // this signature...if we can't, we assume text
             nsCAutoString sigContentType;
             nsresult rv2; // don't want to clobber the other rv
             nsCOMPtr<nsIMIMEService> mimeFinder (do_GetService(NS_MIMESERVICE_CONTRACTID, &rv2));
             if (NS_SUCCEEDED(rv2)) {
               rv2 = mimeFinder->GetTypeFromFile(sigFile, sigContentType);
               if (NS_SUCCEEDED(rv2)) {
                 if (StringBeginsWith(sigContentType, NS_LITERAL_CSTRING("image/"), nsCaseInsensitiveCStringComparator()))
-                  imageSig = PR_TRUE;
+                  imageSig = true;
                 else if (sigContentType.Equals(TEXT_HTML, nsCaseInsensitiveCStringComparator()))
-                  htmlSig = PR_TRUE;
+                  htmlSig = true;
               }
             }
           }
         }
       }
     }
   }
 
@@ -4249,22 +4249,22 @@ nsMsgCompose::ProcessSignature(nsIMsgIde
   }
 
   // if we have a prefSigText, append it to sigData.
   if (!prefSigText.IsEmpty())
   {
     // set htmlSig if the pref is supposed to contain HTML code, defaults to false
     rv = identity->GetHtmlSigFormat(&htmlSig);
     if (NS_FAILED(rv))
-      htmlSig = PR_FALSE;
+      htmlSig = false;
 
     if (!m_composeHTML)
     {
       if (htmlSig)
-        ConvertBufToPlainText(prefSigText, PR_FALSE);
+        ConvertBufToPlainText(prefSigText, false);
       sigData.Append(prefSigText);
     }
     else
     {
       if (!htmlSig)
       {
         PRUnichar* escaped = MsgEscapeHTML2(prefSigText.get(), prefSigText.Length());
         if (escaped)
@@ -4363,40 +4363,40 @@ nsMsgCompose::BuildBodyMessageAndSignatu
   m_compFields->GetBody(body);
 
   /* Some time we want to add a signature and sometime we wont. Let's figure that now...*/
   bool addSignature;
   bool addDashes = false;
   switch (mType)
   {
     case nsIMsgCompType::ForwardInline :
-      addSignature = PR_TRUE;
-      addDashes = PR_TRUE;
+      addSignature = true;
+      addDashes = true;
       break;
     case nsIMsgCompType::New :
     case nsIMsgCompType::MailToUrl :    /* same as New */
     case nsIMsgCompType::Reply :        /* should not happen! but just in case */
     case nsIMsgCompType::ReplyAll :       /* should not happen! but just in case */
     case nsIMsgCompType::ReplyToList :    /* should not happen! but just in case */
     case nsIMsgCompType::ForwardAsAttachment :  /* should not happen! but just in case */
     case nsIMsgCompType::NewsPost :
     case nsIMsgCompType::ReplyToGroup :
     case nsIMsgCompType::ReplyToSender :
     case nsIMsgCompType::ReplyToSenderAndGroup :
-      addSignature = PR_TRUE;
+      addSignature = true;
       break;
 
     case nsIMsgCompType::Draft :
     case nsIMsgCompType::Template :
     case nsIMsgCompType::Redirect :
-      addSignature = PR_FALSE;
+      addSignature = false;
       break;
 
     default :
-      addSignature = PR_FALSE;
+      addSignature = false;
       break;
   }
 
   nsAutoString tSignature;
   if (addSignature)
     ProcessSignature(m_identity, addDashes, &tSignature);
 
   // if type is new, but we have body, this is probably a mapi send, so we need to
@@ -4415,17 +4415,17 @@ nsMsgCompose::BuildBodyMessageAndSignatu
   {
     bool quote = false;
     for (PRUint32 i = 0; i < body.Length(); i ++)
     {
       if (i == 0 || body[i - 1] == '\n')  // newline
       {
         if (body[i] == '>')
         {
-          quote = PR_TRUE;
+          quote = true;
           continue;
         }
         nsString s(Substring(body, i, 10));
         if (StringBeginsWith(s, NS_LITERAL_STRING("-- \r")) ||
             StringBeginsWith(s, NS_LITERAL_STRING("-- \n")))
         {
           i += 4;
           continue;
@@ -4436,31 +4436,31 @@ nsMsgCompose::BuildBodyMessageAndSignatu
           i += 6;
           continue;
         }
       }
       if (body[i] == '\n' && i > 1)
       {
         if (quote)
         {
-          quote = PR_FALSE;
+          quote = false;
           continue;   // skip quoted lines
         }
         PRUint32 j = i - 1;  // look backward for space
         if (body[j] == '\r')
           j --;
         if (body[j] == ' ')  // join this line with next one
           body.Cut(j + 1, i - j);  // remove CRLF
       }
     }
   }
 
   nsString empty;
   rv = ConvertAndLoadComposeWindow(empty, body, tSignature,
-                                   PR_FALSE, m_composeHTML);
+                                   false, m_composeHTML);
 
   return rv;
 }
 
 nsresult nsMsgCompose::NotifyStateListeners(PRInt32 aNotificationType, nsresult aResult)
 {
 
   if (aNotificationType == nsIMsgComposeNotificationType::SaveInFolderDone)
@@ -4537,17 +4537,17 @@ nsresult nsMsgCompose::AttachmentPrettyN
   return NS_OK;
 }
 
 nsresult nsMsgCompose::GetABDirectories(const nsACString& aDirUri,
                                         nsCOMArray<nsIAbDirectory> &aDirArray)
 {
   static bool collectedAddressbookFound;
   if (aDirUri.EqualsLiteral(kMDBDirectoryRoot))
-    collectedAddressbookFound = PR_FALSE;
+    collectedAddressbookFound = false;
 
   nsresult rv;
   nsCOMPtr<nsIAbManager> abManager = do_GetService(NS_ABMANAGER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIAbDirectory> directory;
   rv = abManager->GetDirectory(aDirUri, getter_AddRefs(directory));
   NS_ENSURE_SUCCESS(rv, rv);
@@ -4577,17 +4577,17 @@ nsresult nsMsgCompose::GetABDirectories(
           if (uri.EqualsLiteral(kPersonalAddressbookUri))
             pos = 0;
           else
           {
             PRUint32 count = aDirArray.Count();
 
             if (uri.EqualsLiteral(kCollectedAddressbookUri))
             {
-              collectedAddressbookFound = PR_TRUE;
+              collectedAddressbookFound = true;
               pos = count;
             }
             else
             {
               if (collectedAddressbookFound && count > 1)
                 pos = count - 1;
               else
                 pos = count;
@@ -4739,17 +4739,17 @@ nsMsgCompose::CheckAndPopulateRecipients
     nsString dirPath;
     PRUint32 nbrAddressbook = addrbookDirArray.Count();
 
     for (k = 0; k < nbrAddressbook && stillNeedToSearch; ++k)
     {
       // Avoid recursive mailing lists
       if (abDirectory && (addrbookDirArray[k] == abDirectory))
       {
-        stillNeedToSearch = PR_FALSE;
+        stillNeedToSearch = false;
         break;
       }
 
       abDirectory = addrbookDirArray[k];
 
       bool supportsMailingLists;
       rv = abDirectory->GetSupportsMailingLists(&supportsMailingLists);
       if (NS_FAILED(rv) || !supportsMailingLists)
@@ -4758,17 +4758,17 @@ nsMsgCompose::CheckAndPopulateRecipients
       // Ensure the existing list is empty before filling it
       mailListArray->Clear();
 
       // Collect all mailing lists defined in this address book
       rv = BuildMailListArray(abDirectory, mailListArray);
       if (NS_FAILED(rv))
         return rv;
 
-      stillNeedToSearch = PR_FALSE;
+      stillNeedToSearch = false;
       for (i = 0; i < MAX_OF_RECIPIENT_ARRAY; i ++)
       {
         // Note: We check this each time to allow for length changes.
         for (j = 0; j < recipientsList[i].Length(); ++j)
         {
           nsMsgRecipient &recipient = recipientsList[i][j];
           if (!recipient.mProcessed)
           {
@@ -4831,56 +4831,56 @@ nsMsgCompose::CheckAndPopulateRecipients
 
                     if (newRecipient.mAddress.IsEmpty())
                       continue;
 
                     // Now we need to insert the new address into the list of
                     // recipient
                     if (bIsMailList)
                     {
-                      stillNeedToSearch = PR_TRUE;
+                      stillNeedToSearch = true;
                     }
                     else
                     {
                       newRecipient.mPreferFormat = nsIAbPreferMailFormat::unknown;
                       rv = existingCard->GetPropertyAsUint32(
                           kPreferMailFormatProperty, &newRecipient.mPreferFormat);
                       if (NS_SUCCEEDED(rv))
-                        newRecipient.mProcessed = PR_TRUE;
+                        newRecipient.mProcessed = true;
                     }
                     rv = recipientsList[i].InsertElementAt(j + 1, newRecipient) ? NS_OK : NS_ERROR_FAILURE;
                     if (NS_FAILED(rv))
                       return rv;
                   }
                   recipientsList[i].RemoveElementAt(j);
                  --j;
               }
               else
-                recipient.mProcessed = PR_TRUE;
+                recipient.mProcessed = true;
 
               continue;
             }
 
             if (!abDirectory)
             {
-              stillNeedToSearch = PR_TRUE;
+              stillNeedToSearch = true;
               continue;
             }
 
             // find a card that contains this e-mail address 
             rv = abDirectory->CardForEmailAddress(NS_ConvertUTF16toUTF8(recipient.mEmail),
                                                   getter_AddRefs(existingCard));
 
             if (NS_SUCCEEDED(rv) && existingCard)
             {
               recipient.mPreferFormat = nsIAbPreferMailFormat::unknown;
               rv = existingCard->GetPropertyAsUint32(kPreferMailFormatProperty,
                                                      &recipient.mPreferFormat);
               if (NS_SUCCEEDED(rv))
-                recipient.mProcessed = PR_TRUE;
+                recipient.mProcessed = true;
 
               bool readOnly;
               rv = abDirectory->GetReadOnly(&readOnly);
               NS_ENSURE_SUCCESS(rv,rv);
 
               // bump the popularity index for this card since we are about to send e-mail to it
               PRUint32 popularityIndex = 0;
               if (!readOnly)
@@ -4908,17 +4908,17 @@ nsMsgCompose::CheckAndPopulateRecipients
                 }
 
                 existingCard->SetPropertyAsUint32(kPopularityIndexProperty,
                                                   ++popularityIndex);
                 abDirectory->ModifyCard(existingCard);
               }
             }
             else
-              stillNeedToSearch = PR_TRUE;
+              stillNeedToSearch = true;
           }
         }
       }
     }
   }
 
   // Finally return the list of non HTML recipient if requested and/or rebuilt
   // the recipient field. Also, check for domain preference when preferFormat
@@ -4968,25 +4968,25 @@ nsMsgCompose::CheckAndPopulateRecipients
             if (CaseInsensitiveFindInReadable(domain, htmlDomains))
               recipient.mPreferFormat = nsIAbPreferMailFormat::html;
         }
       }
 
       switch (recipient.mPreferFormat)
       {
       case nsIAbPreferMailFormat::html:
-        atLeastOneRecipientPrefersHTML = PR_TRUE;
+        atLeastOneRecipientPrefersHTML = true;
         break;
 
       case nsIAbPreferMailFormat::plaintext:
-        atLeastOneRecipientPrefersPlainText = PR_TRUE;
+        atLeastOneRecipientPrefersPlainText = true;
         break;
 
       default: // nsIAbPreferMailFormat::unknown
-        atLeastOneRecipientPrefersUnknown = PR_TRUE;
+        atLeastOneRecipientPrefersUnknown = true;
         break;
       }
 
       if (aPopulateMailList)
       {
         if (!recipientsStr.IsEmpty())
           recipientsStr.Append(PRUnichar(','));
         recipientsStr.Append(recipient.mAddress);
@@ -5477,20 +5477,20 @@ nsMsgCompose::SetIdentity(nsIMsgIdentity
   // No delimiter needed if not a compose window
   bool noDelimiter;
   switch (mType)
   {
     case nsIMsgCompType::New :
     case nsIMsgCompType::NewsPost :
     case nsIMsgCompType::MailToUrl :
     case nsIMsgCompType::ForwardAsAttachment :
-      noDelimiter = PR_FALSE;
+      noDelimiter = false;
       break;
     default :
-      noDelimiter = PR_TRUE;
+      noDelimiter = true;
       break;
   }
 
   ProcessSignature(aIdentity, noDelimiter, &aSignature);
 
   if (!aSignature.IsEmpty())
   {
     TranslateLineEnding(aSignature);
--- a/mailnews/compose/src/nsMsgComposeParams.cpp
+++ b/mailnews/compose/src/nsMsgComposeParams.cpp
@@ -36,17 +36,17 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsMsgComposeParams.h"
 
 nsMsgComposeParams::nsMsgComposeParams() :
   mType(nsIMsgCompType::New),
   mFormat(nsIMsgCompFormat::Default),
-  mBodyIsLink(PR_FALSE)
+  mBodyIsLink(false)
 {
 }
 
 /* the following macro actually implement addref, release and query interface for our component. */
 NS_IMPL_ISUPPORTS1(nsMsgComposeParams, nsIMsgComposeParams)
 
 nsMsgComposeParams::~nsMsgComposeParams()
 {
--- a/mailnews/compose/src/nsMsgComposeService.cpp
+++ b/mailnews/compose/src/nsMsgComposeService.cpp
@@ -150,17 +150,17 @@ static PRUint32 GetMessageSizeFromURI(co
   return msgSize;
 }
 #endif
 
 nsMsgComposeService::nsMsgComposeService()
 {
 
 // Defaulting the value of mLogComposePerformance to FALSE to prevent logging.
-  mLogComposePerformance = PR_FALSE;
+  mLogComposePerformance = false;
 #ifdef MSGCOMP_TRACE_PERFORMANCE
   if (!MsgComposeLogModule)
       MsgComposeLogModule = PR_NewLogModule("msgcompose");
 
   mStartTime = PR_IntervalNow();
   mPreviousTime = mStartTime;
 #endif
 
@@ -189,24 +189,24 @@ nsresult nsMsgComposeService::Init()
 {
   nsresult rv = NS_OK;
   // Register observers
 
   // Register for quit application and profile change, we will need to clear the cache.
   nsCOMPtr<nsIObserverService> observerService = do_GetService("@mozilla.org/observer-service;1", &rv);
   if (NS_SUCCEEDED(rv))
   {
-    rv = observerService->AddObserver(this, "quit-application", PR_TRUE);
-    rv = observerService->AddObserver(this, "profile-do-change", PR_TRUE);
+    rv = observerService->AddObserver(this, "quit-application", true);
+    rv = observerService->AddObserver(this, "profile-do-change", true);
   }
 
   // Register some pref observer
   nsCOMPtr<nsIPrefBranch2> pbi = do_GetService(NS_PREFSERVICE_CONTRACTID);
   if (pbi)
-    rv = pbi->AddObserver(PREF_MAIL_COMPOSE_MAXRECYCLEDWINDOWS, this, PR_TRUE);
+    rv = pbi->AddObserver(PREF_MAIL_COMPOSE_MAXRECYCLEDWINDOWS, this, true);
 
   mOpenComposeWindows.Init();
   Reset();
 
   AddGlobalHtmlDomains();
   return rv;
 }
 
@@ -254,17 +254,17 @@ void nsMsgComposeService::DeleteCachedWi
 NS_IMETHODIMP
 nsMsgComposeService::OpenComposeWindowWithParams(const char *chrome,
                                                  nsIMsgComposeParams *params)
 {
   NS_ENSURE_ARG_POINTER(params);
 #ifdef MSGCOMP_TRACE_PERFORMANCE
   if(mLogComposePerformance)
   {
-    TimeStamp("Start opening the window", PR_TRUE);
+    TimeStamp("Start opening the window", true);
   }
 #endif
 
   nsresult rv;
 
   NS_ENSURE_ARG_POINTER(params);
 
   //Use default identity if no identity has been specified
@@ -290,17 +290,17 @@ nsMsgComposeService::OpenComposeWindowWi
       for (i = 0; i < mMaxRecycledWindows; i ++)
       {
         if (mCachedWindows[i].window && (mCachedWindows[i].htmlCompose == composeHTML) && mCachedWindows[i].listener)
         {
           /* We need to save the window pointer as OnReopen will call nsMsgComposeService::InitCompose which will
              clear the cache entry if everything goes well
           */
           nsCOMPtr<nsIDOMWindow> domWindow(mCachedWindows[i].window);
-          rv = ShowCachedComposeWindow(domWindow, PR_TRUE);
+          rv = ShowCachedComposeWindow(domWindow, true);
           if (NS_SUCCEEDED(rv))
           {
             mCachedWindows[i].listener->OnReopen(params);
             return NS_OK;
           }
         }
       }
     }
@@ -383,24 +383,24 @@ nsMsgComposeService::Observe(nsISupports
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgComposeService::DetermineComposeHTML(nsIMsgIdentity *aIdentity, MSG_ComposeFormat aFormat, bool *aComposeHTML)
 {
   NS_ENSURE_ARG_POINTER(aComposeHTML);
 
-  *aComposeHTML = PR_TRUE;
+  *aComposeHTML = true;
   switch (aFormat)
   {
     case nsIMsgCompFormat::HTML:
-      *aComposeHTML = PR_TRUE;
+      *aComposeHTML = true;
       break;
     case nsIMsgCompFormat::PlainText:
-      *aComposeHTML = PR_FALSE;
+      *aComposeHTML = false;
       break;
 
     default:
       nsCOMPtr<nsIMsgIdentity> identity = aIdentity;
       if (!identity)
         GetDefaultIdentity(getter_AddRefs(identity));
 
       if (identity)
@@ -452,17 +452,17 @@ nsMsgComposeService::GetOrigWindowSelect
   rv = aMsgWindow->GetRootDocShell(getter_AddRefs(rootDocShell));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIDocShellTreeNode> rootDocShellAsNode(do_QueryInterface(rootDocShell, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIDocShellTreeItem> childAsItem;
   rv = rootDocShellAsNode->FindChildWithName(NS_LITERAL_STRING("messagepane").get(),
-                                             PR_TRUE, PR_FALSE, nsnull, nsnull, getter_AddRefs(childAsItem));
+                                             true, false, nsnull, nsnull, getter_AddRefs(childAsItem));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(childAsItem, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIDOMWindow> domWindow(do_GetInterface(childAsItem, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr<nsISelection> sel;
@@ -625,17 +625,17 @@ nsMsgComposeService::OpenComposeWindow(c
 
       if(mLogComposePerformance)
       {
 #ifdef MSGCOMP_TRACE_PERFORMANCE
         // ducarroz, properly fix this in the case of new message (not a reply)
         if (type != nsIMsgCompType::NewsPost) {
           char buff[256];
           sprintf(buff, "Start opening the window, message size = %d", GetMessageSizeFromURI(originalMsgURI));
-          TimeStamp(buff, PR_TRUE);
+          TimeStamp(buff, true);
         }
 #endif
       }//end if(mLogComposePerformance)
 
       rv = OpenComposeWindowWithParams(msgComposeWindowURL, pMsgComposeParams);
     }
   }
   return rv;
@@ -710,23 +710,23 @@ NS_IMETHODIMP nsMsgComposeService::GetPa
         if (parser && sink)
         {
           nsCOMPtr<mozISanitizingHTMLSerializer> sanSink(do_QueryInterface(sink));
           if (sanSink)
           {
             sanSink->Initialize(&sanitizedBody, 0, NS_ConvertASCIItoUTF16(allowedTags));
 
             parser->SetContentSink(sink);
-            rv = parser->Parse(rawBody, 0, NS_LITERAL_CSTRING("text/html"), PR_TRUE);
+            rv = parser->Parse(rawBody, 0, NS_LITERAL_CSTRING("text/html"), true);
             if (NS_FAILED(rv))
             {
               // Something went horribly wrong with parsing for html format
-              // in the body.  Set composeHTMLFormat to PR_FALSE so we show the
+              // in the body.  Set composeHTMLFormat to false so we show the
               // plain text mail compose.
-              composeHTMLFormat = PR_FALSE;
+              composeHTMLFormat = false;
             }
           }
         }
       }
 
       nsCOMPtr<nsIMsgComposeParams> pMsgComposeParams (do_CreateInstance(NS_MSGCOMPOSEPARAMS_CONTRACTID, &rv));
       if (NS_SUCCEEDED(rv) && pMsgComposeParams)
       {
@@ -857,21 +857,21 @@ nsMsgComposeService::IsCachedWindow(nsID
 {
   NS_ENSURE_ARG_POINTER(aCachedWindow);
   NS_ENSURE_ARG_POINTER(aIsCachedWindow);
 
   PRInt32 i;
   for (i = 0; i < mMaxRecycledWindows; i ++)
     if (mCachedWindows[i].window.get() == aCachedWindow)
     {
-      *aIsCachedWindow = PR_TRUE;
+      *aIsCachedWindow = true;
       return NS_OK;
     }
 
- *aIsCachedWindow = PR_FALSE;
+ *aIsCachedWindow = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgComposeService::CacheWindow(nsIDOMWindow *aWindow, bool aComposeHTML, nsIMsgComposeRecyclingListener * aListener)
 {
   NS_ENSURE_ARG_POINTER(aWindow);
   NS_ENSURE_ARG_POINTER(aListener);
@@ -881,17 +881,17 @@ nsMsgComposeService::CacheWindow(nsIDOMW
   PRInt32 i;
   PRInt32 sameTypeId = -1;
   PRInt32 oppositeTypeId = -1;
 
   for (i = 0; i < mMaxRecycledWindows; i ++)
   {
     if (!mCachedWindows[i].window)
     {
-      rv = ShowCachedComposeWindow(aWindow, PR_FALSE);
+      rv = ShowCachedComposeWindow(aWindow, false);
       if (NS_SUCCEEDED(rv))
         mCachedWindows[i].Initialize(aWindow, aListener, aComposeHTML);
 
       return rv;
     }
     else
       if (mCachedWindows[i].htmlCompose == aComposeHTML)
       {
@@ -909,17 +909,17 @@ nsMsgComposeService::CacheWindow(nsIDOMW
      already cached, we should replace an opposite one with this new one. That would allow users to be able to take advantage
      of the cached compose window when they switch from one type to another one
   */
   if (sameTypeId == -1 && oppositeTypeId != -1)
   {
     CloseHiddenCachedWindow(mCachedWindows[oppositeTypeId].window);
     mCachedWindows[oppositeTypeId].Clear();
 
-    rv = ShowCachedComposeWindow(aWindow, PR_FALSE);
+    rv = ShowCachedComposeWindow(aWindow, false);
     if (NS_SUCCEEDED(rv))
       mCachedWindows[oppositeTypeId].Initialize(aWindow, aListener, aComposeHTML);
 
     return rv;
   }
 
   return NS_ERROR_NOT_AVAILABLE;
 }
@@ -946,17 +946,17 @@ public:
 
 NS_IMPL_ISUPPORTS3(nsMsgTemplateReplyHelper,
                    nsIStreamListener,
                    nsIRequestObserver,
                    nsIUrlListener)
 
 nsMsgTemplateReplyHelper::nsMsgTemplateReplyHelper()
 {
-  mInMsgBody = PR_FALSE;
+  mInMsgBody = false;
   memset(mLastBlockChars, 0, sizeof(mLastBlockChars));
 }
 
 nsMsgTemplateReplyHelper::~nsMsgTemplateReplyHelper()
 {
 }
 
 
@@ -1173,32 +1173,32 @@ NS_IMETHODIMP nsMsgComposeService::Reply
     // to use the subject, we'd need to expose a method to find a message by subject,
     // or painfully iterate through messages...We'll try to make the message-id
     // not change when saving a template first.
   }
   if (templateMsgHdrUri.IsEmpty())
   {
     // ### probably want to return a specific error and
     // have the calling code disable the filter.
-    NS_ASSERTION(PR_FALSE, "failed to get msg hdr");
+    NS_ASSERTION(false, "failed to get msg hdr");
     return NS_ERROR_FAILURE;
   }
   // we need to convert the template uri, which is of the form
   // <folder uri>?messageId=<messageId>&subject=<subject>
   nsCOMPtr <nsIMsgMessageService> msgService;
   rv = GetMessageServiceFromURI(templateMsgHdrUri, getter_AddRefs(msgService));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsISupports> listenerSupports;
   helper->QueryInterface(NS_GET_IID(nsISupports), getter_AddRefs(listenerSupports));
 
   rv = msgService->StreamMessage(templateMsgHdrUri.get(), listenerSupports,
                                  aMsgWindow, helper,
-                                 PR_FALSE, // convert data
-                                 EmptyCString(), PR_FALSE, nsnull);
+                                 false, // convert data
+                                 EmptyCString(), false, nsnull);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIMsgFolder> folder;
   aMsgHdr->GetFolder(getter_AddRefs(folder));
   if (!folder)
     return NS_ERROR_NULL_POINTER;
 
   // We're sending a new message. Conceptually it's a reply though, so mark the
@@ -1248,18 +1248,18 @@ nsMsgComposeService::ForwardMessage(cons
   rv = account->GetDefaultIdentity(getter_AddRefs(identity));
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (aForwardType == nsIMsgComposeService::kForwardInline)
     return RunMessageThroughMimeDraft(msgUri,
                                       nsMimeOutput::nsMimeMessageDraftOrTemplate,
                                       identity,
                                       msgUri.get(), aMsgHdr,
-                                      PR_TRUE, forwardTo,
-                                      PR_FALSE, aMsgWindow);
+                                      true, forwardTo,
+                                      false, aMsgWindow);
 
   nsCOMPtr<nsIDOMWindow> parentWindow;
   if (aMsgWindow)
   {
     nsCOMPtr<nsIDocShell> docShell;
     rv = aMsgWindow->GetRootDocShell(getter_AddRefs(docShell));
     NS_ENSURE_SUCCESS(rv, rv);
     parentWindow = do_GetInterface(docShell);
@@ -1586,17 +1586,17 @@ nsMsgComposeService::RunMessageThroughMi
   nsCOMPtr<nsIMimeStreamConverter> mimeConverter =
     do_CreateInstance(NS_MAILNEWS_MIME_STREAM_CONVERTER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   mimeConverter->SetMimeOutputType(aOutType); // Set the type of output for libmime
   mimeConverter->SetForwardInline(aForwardInline);
   if (!aForwardTo.IsEmpty())
   {
-    mimeConverter->SetForwardInlineFilter(PR_TRUE);
+    mimeConverter->SetForwardInlineFilter(true);
     mimeConverter->SetForwardToAddress(aForwardTo);
   }
   mimeConverter->SetOverrideComposeFormat(aOverrideComposeFormat);
   mimeConverter->SetIdentity(aIdentity);
   mimeConverter->SetOriginalMsgURI(aOriginalMsgURI);
   mimeConverter->SetOrigMsgHdr(aOrigMsgHdr);
 
   nsCOMPtr<nsIURI> url;
@@ -1657,28 +1657,28 @@ nsMsgComposeService::Handle(nsICommandLi
 {
   NS_ENSURE_ARG_POINTER(aCmdLine);
 
   nsresult rv;
   PRInt32 found, end, count;
   nsAutoString uristr;
   bool composeShouldHandle = true;
 
-  rv = aCmdLine->FindFlag(NS_LITERAL_STRING("compose"), PR_FALSE, &found);
+  rv = aCmdLine->FindFlag(NS_LITERAL_STRING("compose"), false, &found);
   NS_ENSURE_SUCCESS(rv, rv);
 
 #ifndef MOZ_SUITE
   // MAC OS X passes in -url mailto:mscott@mozilla.org into the command line
   // instead of -compose.
   if (found == -1)
   {
-    rv = aCmdLine->FindFlag(NS_LITERAL_STRING("url"), PR_FALSE, &found);
+    rv = aCmdLine->FindFlag(NS_LITERAL_STRING("url"), false, &found);
     // we don't want to consume the argument for -url unless we're sure it is a mailto url and we'll
     // figure that out shortly.
-    composeShouldHandle = PR_FALSE;
+    composeShouldHandle = false;
   }
 #endif
 
   if (found == -1)
     return NS_OK;
 
   end = found;
 
@@ -1692,17 +1692,17 @@ nsMsgComposeService::Handle(nsICommandLi
         StringBeginsWith(uristr, NS_LITERAL_STRING("to="))  ||
         StringBeginsWith(uristr, NS_LITERAL_STRING("cc="))  ||
         StringBeginsWith(uristr, NS_LITERAL_STRING("bcc=")) ||
         StringBeginsWith(uristr, NS_LITERAL_STRING("newsgroups=")) ||
         StringBeginsWith(uristr, NS_LITERAL_STRING("subject=")) ||
         StringBeginsWith(uristr, NS_LITERAL_STRING("format=")) ||
         StringBeginsWith(uristr, NS_LITERAL_STRING("body="))  ||
         StringBeginsWith(uristr, NS_LITERAL_STRING("attachment="))) {
-      composeShouldHandle = PR_TRUE; // the -url argument looks like mailto
+      composeShouldHandle = true; // the -url argument looks like mailto
       end++;
       // mailto: URIs are frequently passed with spaces in them. They should be
       // escaped with %20, but we hack around broken clients. See bug 231032.
       while (end + 1 < count) {
         nsAutoString curarg;
         aCmdLine->GetArgument(end + 1, curarg);
         if (curarg.First() == '-')
           break;
@@ -1726,17 +1726,17 @@ nsMsgComposeService::Handle(nsICommandLi
     nsCOMPtr<nsISupportsString> arg(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));
     if (arg)
       arg->SetData(uristr);
 
     nsCOMPtr<nsIDOMWindow> opened;
     wwatch->OpenWindow(nsnull, DEFAULT_CHROME, "_blank",
                        "chrome,dialog=no,all", arg, getter_AddRefs(opened));
 
-    aCmdLine->SetPreventDefault(PR_TRUE);
+    aCmdLine->SetPreventDefault(true);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgComposeService::GetHelpInfo(nsACString& aResult)
 {
   aResult.Assign(NS_LITERAL_CSTRING("  -compose           Compose a mail or news message.\n"));
--- a/mailnews/compose/src/nsMsgCopy.cpp
+++ b/mailnews/compose/src/nsMsgCopy.cpp
@@ -74,17 +74,17 @@ NS_IMPL_THREADSAFE_RELEASE(CopyListener)
 
 NS_INTERFACE_MAP_BEGIN(CopyListener)
    NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIMsgCopyServiceListener)
    NS_INTERFACE_MAP_ENTRY(nsIMsgCopyServiceListener)
 NS_INTERFACE_MAP_END_THREADSAFE
 
 CopyListener::CopyListener(void)
 {
-  mCopyInProgress = PR_FALSE;
+  mCopyInProgress = false;
 }
 
 CopyListener::~CopyListener(void)
 {
 }
 
 nsresult
 CopyListener::OnStartCopy()
@@ -142,17 +142,17 @@ CopyListener::OnStopCopy(nsresult aStatu
     printf("CopyListener: COPY OPERATION FAILED!\n");
 #endif
   }
 
   if (mCopyInProgress)
   {
       PR_CEnterMonitor(this);
       PR_CNotifyAll(this);
-      mCopyInProgress = PR_FALSE;
+      mCopyInProgress = false;
       PR_CExitMonitor(this);
   }
   if (mComposeAndSend)
     mComposeAndSend->NotifyListenerOnStopCopy(aStatus);
 
   return NS_OK;
 }
 
@@ -209,39 +209,39 @@ nsMsgCopy::StartCopyOperation(nsIMsgIden
   // Vars for implementation...
   //
 
   // QueueForLater (Outbox)
   if (aMode == nsIMsgSend::nsMsgQueueForLater ||
       aMode == nsIMsgSend::nsMsgDeliverBackground)
   {
     rv = GetUnsentMessagesFolder(aUserIdentity, getter_AddRefs(dstFolder), &waitForUrl);
-    isDraft = PR_FALSE;
+    isDraft = false;
     if (!dstFolder || NS_FAILED(rv)) {
       return NS_MSG_UNABLE_TO_SEND_LATER;
     }
   }
   else if (aMode == nsIMsgSend::nsMsgSaveAsDraft)    // SaveAsDraft (Drafts)
   {
     rv = GetDraftsFolder(aUserIdentity, getter_AddRefs(dstFolder), &waitForUrl);
-    isDraft = PR_TRUE;
+    isDraft = true;
     if (!dstFolder || NS_FAILED(rv))
       return NS_MSG_UNABLE_TO_SAVE_DRAFT;
   }
   else if (aMode == nsIMsgSend::nsMsgSaveAsTemplate) // SaveAsTemplate (Templates)
   {
     rv = GetTemplatesFolder(aUserIdentity, getter_AddRefs(dstFolder), &waitForUrl);
-    isDraft = PR_FALSE;
+    isDraft = false;
     if (!dstFolder || NS_FAILED(rv))
 	    return NS_MSG_UNABLE_TO_SAVE_TEMPLATE;
   }
   else // SaveInSentFolder (Sent) -  nsMsgDeliverNow or nsMsgSendUnsent
   {
     rv = GetSentFolder(aUserIdentity, getter_AddRefs(dstFolder), &waitForUrl);
-    isDraft = PR_FALSE;
+    isDraft = false;
     if (!dstFolder || NS_FAILED(rv))
       return NS_MSG_COULDNT_OPEN_FCC_FOLDER;
   }
 
   nsCOMPtr <nsIMsgWindow> msgWindow;
 
   if (aMsgSendObj)
   {
@@ -297,17 +297,17 @@ nsMsgCopy::DoCopy(nsIFile *aDiskFile, ns
         if (NS_FAILED(rv)) return rv;
         bool shutdownInProgress = false;
         rv = accountManager->GetShutdownInProgress(&shutdownInProgress);
 
         if (NS_SUCCEEDED(rv) && shutdownInProgress && imapFolder)
         {
           // set the following only when we were in the middle of shutdown
           // process
-            copyListener->mCopyInProgress = PR_TRUE;
+            copyListener->mCopyInProgress = true;
             thread = do_GetCurrentThread();
         }
     }
     nsCOMPtr<nsIMsgCopyService> copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = copyService->CopyFileMessage(aDiskFile, dstFolder, aMsgToReplace,
                                       aIsDraft,
@@ -412,17 +412,17 @@ nsMsgCopy::CreateIfMissing(nsIMsgFolder 
       // exist on the server, so we should try to create it
       bool exists = false;
       if (!isImapFolder && folderPath)
         folderPath->Exists(&exists);
         if (!exists)
         {
           (*folder)->CreateStorageIfMissing(this);
           if (isImapFolder)
-            *waitForUrl = PR_TRUE;
+            *waitForUrl = true;
 
           ret = NS_OK;
         }
       }
     }
   return ret;
 }
 ////////////////////////////////////////////////////////////////////////////////////
--- a/mailnews/compose/src/nsMsgQuote.cpp
+++ b/mailnews/compose/src/nsMsgQuote.cpp
@@ -108,17 +108,17 @@ nsresult nsMsgQuoteListener::OnHeadersRe
   return NS_OK;
 }
 
 //
 // Implementation...
 //
 nsMsgQuote::nsMsgQuote()
 {
-  mQuoteHeaders = PR_FALSE;
+  mQuoteHeaders = false;
   mQuoteListener = nsnull;
 }
 
 nsMsgQuote::~nsMsgQuote()
 {
 }
 
 NS_IMPL_THREADSAFE_ADDREF(nsMsgQuote)
--- a/mailnews/compose/src/nsMsgSend.cpp
+++ b/mailnews/compose/src/nsMsgSend.cpp
@@ -173,42 +173,42 @@ static nsresult StripOutGroupNames(char 
         continue;
 
       case '"':
         quoted = !quoted;
         break;
 
       case '@':
         if (!quoted)
-          atFound = PR_TRUE;
+          atFound = true;
         break;
 
       case ':':
         if (!quoted && !atFound)
         {
           // ok, we found a group name
           // let's backup the write cursor to remove the group name
           writePtr = previousSeparator + 1;
-          group = PR_TRUE;
+          group = true;
           continue;
         }
         break;
 
       case ';':
         if (quoted || !group)
           break;
         else
-          group = PR_FALSE;
+          group = false;
           //end of the group, act like a recipient separator now...
         /* NO BREAK */
 
       case ',':
         if (!quoted)
         {
-          atFound = PR_FALSE;
+          atFound = false;
           //let check if we already have a comma separator in the output string
           if (writePtr > addresses && *(writePtr - 1) == ',')
             writePtr --;
           *writePtr = ',';
           previousSeparator = writePtr;
           writePtr ++;
           continue;
         }
@@ -281,45 +281,45 @@ NS_IMETHODIMP MsgDeliveryListener::OnSto
 
 
 /* the following macro actually implement addref, release and query interface for our component. */
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsMsgComposeAndSend, nsIMsgSend)
 
 nsMsgComposeAndSend::nsMsgComposeAndSend() :
     m_messageKey(0xffffffff)
 {
-  mGUINotificationEnabled = PR_TRUE;
-  mAbortInProcess = PR_FALSE;
+  mGUINotificationEnabled = true;
+  mAbortInProcess = false;
   mLastErrorReported = NS_OK;
   mMultipartRelatedAttachmentCount = -1;
-  mSendMailAlso = PR_FALSE;
-
-  m_dont_deliver_p = PR_FALSE;
+  mSendMailAlso = false;
+
+  m_dont_deliver_p = false;
   m_deliver_mode = nsMsgDeliverNow;
 
-  m_attachments_only_p = PR_FALSE;
-  m_pre_snarfed_attachments_p = PR_FALSE;
-  m_digest_p = PR_FALSE;
-  m_be_synchronous_p = PR_FALSE;
+  m_attachments_only_p = false;
+  m_pre_snarfed_attachments_p = false;
+  m_digest_p = false;
+  m_be_synchronous_p = false;
   m_attachment1_type = 0;
   m_attachment1_encoding = 0;
   m_attachment1_encoder_data = nsnull;
   m_attachment1_body = 0;
   m_attachment1_body_length = 0;
   m_attachment_count = 0;
   m_attachment_pending_count = 0;
   m_attachments = nsnull;
   m_status = 0;
   m_attachments_done_callback = nsnull;
   m_plaintext = nsnull;
   m_related_part = nsnull;
   m_related_body_part = nsnull;
   mOriginalHTMLBody = nsnull;
 
-  mNeedToPerformSecondFCC = PR_FALSE;
+  mNeedToPerformSecondFCC = false;
 
   mPreloadedAttachmentCount = 0;
   mRemoteAttachmentCount = 0;
   mCompFieldLocalAttachments = 0;
   mCompFieldRemoteAttachments = 0;
   mMessageWarningSize = 0;
 
   mSendReport = new nsMsgSendReport();
@@ -328,45 +328,45 @@ nsMsgComposeAndSend::nsMsgComposeAndSend
 nsMsgComposeAndSend::~nsMsgComposeAndSend()
 {
   PR_Free(m_attachment1_type);
   PR_Free(m_attachment1_encoding);
   PR_Free(m_attachment1_body);
   PR_Free(mOriginalHTMLBody);
 
   if (m_attachment1_encoder_data)
-    MIME_EncoderDestroy(m_attachment1_encoder_data, PR_TRUE);
+    MIME_EncoderDestroy(m_attachment1_encoder_data, true);
 
   if (m_plaintext)
   {
     if (m_plaintext->mTmpFile)
-      m_plaintext->mTmpFile->Remove(PR_FALSE);
+      m_plaintext->mTmpFile->Remove(false);
 
     delete m_plaintext;
   }
 
   if (mHTMLFile)
-    mHTMLFile->Remove(PR_FALSE);
+    mHTMLFile->Remove(false);
 
   if (mCopyFile)
-    mCopyFile->Remove(PR_FALSE);
+    mCopyFile->Remove(false);
 
   if (mCopyFile2)
-    mCopyFile2->Remove(PR_FALSE);
+    mCopyFile2->Remove(false);
 
   if (mTempFile && !mReturnFile)
-    mTempFile->Remove(PR_FALSE);
+    mTempFile->Remove(false);
 
   if (m_attachments)
   {
     PRUint32 i;
     for (i = 0; i < m_attachment_count; i++)
     {
       if (m_attachments [i].m_encoder_data)
-        MIME_EncoderDestroy(m_attachments[i].m_encoder_data, PR_TRUE);
+        MIME_EncoderDestroy(m_attachments[i].m_encoder_data, true);
     }
 
     delete[] m_attachments;
   }
 }
 
 NS_IMETHODIMP nsMsgComposeAndSend::GetDefaultPrompt(nsIPrompt ** aPrompt)
 {
@@ -511,22 +511,22 @@ nsMsgComposeAndSend::GatherMimeAttachmen
   char *hdrs = 0;
   bool maincontainerISrelatedpart = false;
   const char * toppart_type = nsnull;
 
   // If we have any attachments, we generate multipart.
   multipart_p = (m_attachment_count > 0);
 
   // to news is true if we have a m_field and we have a Newsgroup and it is not empty
-  tonews = PR_FALSE;
+  tonews = false;
   if (mCompFields)
   {
     const char* pstrzNewsgroup = mCompFields->GetNewsgroups();
     if (pstrzNewsgroup && *pstrzNewsgroup)
-      tonews = PR_TRUE;
+      tonews = true;
   }
 
   status = m_status;
   if (status < 0)
     goto FAIL;
 
   if (m_attachments_only_p)
   {
@@ -615,17 +615,17 @@ nsMsgComposeAndSend::GatherMimeAttachmen
     nsCOMPtr<nsIOutputStream> tempfile;
     rv = MsgNewBufferedFileOutputStream(getter_AddRefs(tempfile), mHTMLFile, -1, 00600);
     if (NS_FAILED(rv))
     {
       if (mSendReport)
       {
         nsAutoString error_msg;
         nsMsgBuildMessageWithTmpFile(mTempFile, error_msg);
-        mSendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg.get(), PR_FALSE);
+        mSendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg.get(), false);
       }
       status = NS_MSG_UNABLE_TO_OPEN_TMP_FILE;
       goto FAIL;
     }
 
     if (mOriginalHTMLBody)
     {
       PRUint32 origLen = strlen(mOriginalHTMLBody);
@@ -645,17 +645,17 @@ nsMsgComposeAndSend::GatherMimeAttachmen
     }
 
     tempfile->Close();
 
     m_plaintext = new nsMsgAttachmentHandler;
     if (!m_plaintext)
       goto FAILMEM;
     m_plaintext->SetMimeDeliveryState(this);
-    m_plaintext->m_bogus_attachment = PR_TRUE;
+    m_plaintext->m_bogus_attachment = true;
 
     nsCAutoString tempURL;
     rv = NS_GetURLSpecFromFile(mHTMLFile, tempURL);
     if (NS_FAILED(rv) || NS_FAILED(nsMsgNewURL(getter_AddRefs(m_plaintext->mURL), tempURL.get())))
     {
       delete m_plaintext;
       m_plaintext = nsnull;
       goto FAILMEM;
@@ -692,29 +692,29 @@ nsMsgComposeAndSend::GatherMimeAttachmen
   rv = MsgNewBufferedFileOutputStream(getter_AddRefs(mOutputFile), mTempFile, -1, 00600);
   if (NS_FAILED(rv))
   {
     status = NS_MSG_UNABLE_TO_OPEN_TMP_FILE;
     if (mSendReport)
     {
       nsAutoString error_msg;
       nsMsgBuildMessageWithTmpFile(mTempFile, error_msg);
-      mSendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg.get(), PR_FALSE);
+      mSendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg.get(), false);
     }
     goto FAIL;
   }
 
   // generate a message id, if necessary
   GenerateMessageId( );
 
   mainbody = new nsMsgSendPart(this, mCompFields->GetCharacterSet());
   if (!mainbody)
     goto FAILMEM;
 
-  mainbody->SetMainPart(PR_TRUE);
+  mainbody->SetMainPart(true);
   mainbody->SetType(m_attachment1_type ? m_attachment1_type : TEXT_PLAIN);
 
   NS_ASSERTION(mainbody->GetBuffer() == nsnull, "not-null buffer");
   status = mainbody->SetBuffer(m_attachment1_body ? m_attachment1_body : "");
   if (status < 0)
     goto FAIL;
 
   /*
@@ -743,20 +743,20 @@ nsMsgComposeAndSend::GatherMimeAttachmen
   {
     // If m_related_part is of type text/html, set both maincontainer
     // and mainbody to point to it. If m_related_part is multipart/related,
     // however, set mainbody to be the first child within m_related_part.
     delete mainbody;
 
     // No matter what, maincontainer points to the outermost related part.
     maincontainer = m_related_part;
-    maincontainerISrelatedpart = PR_TRUE;
+    maincontainerISrelatedpart = true;
 
     mainbody = m_related_part->GetChild(0);
-    mainbody->SetMainPart(PR_TRUE);
+    mainbody->SetMainPart(true);
   }
   if (m_plaintext)
   {
     //
     // OK.  We have a plaintext version of the main body that we want to
     // send instead of or with the text/html.  Shove it in.
     //
     plainpart = new nsMsgSendPart(this, mCompFields->GetCharacterSet());
@@ -764,17 +764,17 @@ nsMsgComposeAndSend::GatherMimeAttachmen
       goto FAILMEM;
     status = plainpart->SetType(TEXT_PLAIN);
     if (status < 0)
       goto FAIL;
     status = plainpart->SetFile(m_plaintext->mTmpFile);
     if (status < 0)
       goto FAIL;
 
-    m_plaintext->mMainBody = PR_TRUE;
+    m_plaintext->mMainBody = true;
 
     // Determine Content-Transfer-Encoding for the attachments.
     m_plaintext->PickEncoding(mCompFields->GetCharacterSet(), this);
     const char *charset = mCompFields->GetCharacterSet();
     hdrs = mime_generate_attachment_headers(m_plaintext->m_type.get(),
                         nsnull,
                         m_plaintext->m_encoding.get(),
                         m_plaintext->m_description.get(),
@@ -782,17 +782,17 @@ nsMsgComposeAndSend::GatherMimeAttachmen
                         m_plaintext->m_xMacCreator.get(),
                         nsnull, 0,
                         m_digest_p,
                         m_plaintext,
                         charset,
                         charset,
                         body_is_us_ascii,
                         nsnull,
-                        PR_TRUE);
+                        true);
     if (!hdrs)
       goto FAILMEM;
     status = plainpart->SetOtherHeaders(hdrs);
     PR_Free(hdrs);
     hdrs = nsnull;
     if (status < 0)
       goto FAIL;
 
@@ -854,17 +854,17 @@ nsMsgComposeAndSend::GatherMimeAttachmen
       m_attachment1_type = PL_strdup(TEXT_PLAIN);
       if (!m_attachment1_type)
         goto FAILMEM;
 
       /* Override attachment1_encoding here. */
       PR_FREEIF(m_attachment1_encoding);
       m_attachment1_encoding = ToNewCString(m_plaintext->m_encoding);
 
-      plaintext_is_mainbody_p = PR_TRUE; // converted plaintext is mainbody
+      plaintext_is_mainbody_p = true; // converted plaintext is mainbody
     }
   }
 
   // check if we need to encapsulate the message in a multipart/mixed or multipart/digest
   if (m_attachment_count > multipartRelatedCount)
   {
     toppart = new nsMsgSendPart(this);
     if (!toppart)
@@ -962,17 +962,17 @@ nsMsgComposeAndSend::GatherMimeAttachmen
                          m_attachment1_encoding,
                          0, 0, 0, 0, 0,
                          m_digest_p,
                          nsnull, /* no "ma"! */
                          charset,
                          charset,
                          mCompFields->GetBodyIsAsciiOnly(),
                          nsnull,
-                         PR_TRUE);
+                         true);
     if (!hdrs)
       goto FAILMEM;
     status = mainbody->AppendOtherHeaders(hdrs);
     if (status < 0)
       goto FAIL;
   }
 
   PR_FREEIF(hdrs);
@@ -1051,17 +1051,17 @@ nsMsgComposeAndSend::GatherMimeAttachmen
   // OK, now actually write the structure we've carefully built up.
   status = toppart->Write();
   if (status < 0)
     goto FAIL;
 
   /* Close down encryption stream */
   if (m_crypto_closure)
   {
-    status = m_crypto_closure->FinishCryptoEncapsulation(PR_FALSE, mSendReport);
+    status = m_crypto_closure->FinishCryptoEncapsulation(false, mSendReport);
     m_crypto_closure = 0;
     if (NS_FAILED(status)) goto FAIL;
   }
 
   if (mOutputFile)
   {
     if (NS_FAILED(mOutputFile->Flush()))
     {
@@ -1104,17 +1104,17 @@ nsMsgComposeAndSend::GatherMimeAttachmen
     {
       NotifyListenerOnStopSending(nsnull, NS_OK, nsnull, mReturnFile);
     }
   }
   else
   {
     status = DeliverMessage();
     if (NS_SUCCEEDED(status))
-      shouldDeleteDeliveryState = PR_FALSE;
+      shouldDeleteDeliveryState = false;
   }
   goto FAIL;
 
 FAILMEM:
   status = NS_ERROR_OUT_OF_MEMORY;
 
 FAIL:
   if (toppart)
@@ -1198,20 +1198,20 @@ nsMsgComposeAndSend::PreProcessPart(nsMs
                                            m_digest_p,
                                            ma,
                                            ma->m_charset.get(), // rhp - this needs
                                                           // to be the charset
                                                           // we determine from
                                                           // the file or none
                                                           // at all!
                                            mCompFields->GetCharacterSet(),
-                                           PR_FALSE,      // bodyIsAsciiOnly to false
+                                           false,      // bodyIsAsciiOnly to false
                                                           // for attachments
                                            ma->m_contentId.get(),
-                                           PR_FALSE);
+                                           false);
   if (!hdrs)
     return 0;
 
   status = part->SetOtherHeaders(hdrs);
   PR_FREEIF(hdrs);
   if (NS_FAILED(status))
     return 0;
   status = part->SetFile(ma->mTmpFile);
@@ -1224,17 +1224,17 @@ nsMsgComposeAndSend::PreProcessPart(nsMs
       return 0;
     ma->m_encoder_data = nsnull;
   }
 
   ma->m_current_column = 0;
 
   if (ma->m_type.LowerCaseEqualsLiteral(MESSAGE_RFC822) ||
       ma->m_type.LowerCaseEqualsLiteral(MESSAGE_NEWS)) {
-    status = part->SetStripSensitiveHeaders(PR_TRUE);
+    status = part->SetStripSensitiveHeaders(true);
     if (NS_FAILED(status))
       return 0;
   }
 
   return 1;
 }
 
 # define FROB(X) \
@@ -1341,32 +1341,32 @@ nsMsgComposeAndSend::GetEmbeddedObjectIn
   NS_ENSURE_ARG_POINTER(acceptObject);
 
 // GetEmbeddedObjectInfo will determine if we need to attach the source of the embedded object with the message
 // The decision is made automatically unless the attribute moz-do-not-send has been set to true or false
 // The default rule is that all image and anchor objects are attached as well link to a local file
   nsresult rv;
 
   // Reset this structure to null!
-  *acceptObject = PR_FALSE;
+  *acceptObject = false;
 
   // Check if the object has a moz-do-not-send attribute set. If it's true,
   // we must ignore it, if false set forceToBeAttached to be true.
 
   bool forceToBeAttached = false;
   nsCOMPtr<nsIDOMElement> domElement = do_QueryInterface(node);
   if (domElement)
   {
     nsAutoString attributeValue;
     if (NS_SUCCEEDED(domElement->GetAttribute(NS_LITERAL_STRING(ATTR_MOZ_DO_NOT_SEND), attributeValue)))
     {
       if (attributeValue.LowerCaseEqualsLiteral("true"))
         return NS_OK;
       if (attributeValue.LowerCaseEqualsLiteral("false"))
-        forceToBeAttached = PR_TRUE;
+        forceToBeAttached = true;
     }
   }
   // Now, we know the types of objects this node can be, so we will do
   // our query interface here and see what we come up with
   nsCOMPtr<nsIDOMHTMLBodyElement>     body = (do_QueryInterface(node));
   // XXX convert to use nsIImageLoadingContent?
   nsCOMPtr<nsIDOMHTMLImageElement>    image = (do_QueryInterface(node));
   nsCOMPtr<nsIDOMHTMLLinkElement>     link = (do_QueryInterface(node));
@@ -1491,17 +1491,17 @@ nsMsgComposeAndSend::GetEmbeddedObjectIn
       rv = fileUrl->GetFile(getter_AddRefs(aFile));
       if (NS_SUCCEEDED(rv) && aFile)
       {
         nsCOMPtr<nsILocalFile> aLocalFile (do_QueryInterface(aFile));
         if (aLocalFile)
         {
           rv = aLocalFile->IsFile(&isAValidFile);
           if (NS_FAILED(rv))
-            isAValidFile = PR_FALSE;
+            isAValidFile = false;
           else
           {
             if (anchor)
             {
               // One more test, if the anchor points to a local network server, let's check what the pref
               // mail.compose.dont_attach_source_of_local_network_links tells us to do.
               nsCAutoString urlSpec;
               rv = attachment->m_url->GetSpec(urlSpec);
@@ -1509,17 +1509,17 @@ nsMsgComposeAndSend::GetEmbeddedObjectIn
                 if (StringBeginsWith(urlSpec, NS_LITERAL_CSTRING("file://///")))
                 {
                   nsCOMPtr<nsIPrefBranch> pPrefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
                   if (pPrefBranch)
                   {
                     bool dontSend = false;
                     rv = pPrefBranch->GetBoolPref(PREF_MAIL_DONT_ATTACH_SOURCE, &dontSend);
                     if (dontSend)
-                      isAValidFile = PR_FALSE;
+                      isAValidFile = false;
                   }
                 }
             }
           }
         }
       }
 
       if (! isAValidFile)
@@ -1528,17 +1528,17 @@ nsMsgComposeAndSend::GetEmbeddedObjectIn
   }
   else //not a file:// url
   {
     //if this is an anchor, don't attach remote file unless we have been forced to do it
     if (anchor && !forceToBeAttached)
       return NS_OK;
   }
 
-  *acceptObject = PR_TRUE;
+  *acceptObject = true;
   return NS_OK;
 }
 
 
 PRUint32
 nsMsgComposeAndSend::GetMultipartRelatedCount(bool forceToBeCalculated /*=false*/)
 {
   nsresult                  rv = NS_OK;
@@ -1634,17 +1634,17 @@ nsMsgComposeAndSend::GetBodyFromEditor()
   if (!bodyText)
     return NS_ERROR_OUT_OF_MEMORY;
 
   // If we are forcing this to be plain text, we should not be
   // doing this conversion.
   bool doConversion = true;
 
   if ( (mCompFields) && mCompFields->GetForcePlainText() )
-    doConversion = PR_FALSE;
+    doConversion = false;
 
   if (doConversion)
   {
     nsCOMPtr<mozITXTToHTMLConv> conv = do_CreateInstance(MOZ_TXTTOHTMLCONV_CONTRACTID, &rv);
 
     if (NS_SUCCEEDED(rv))
     {
       PRUint32 whattodo = mozITXTToHTMLConv::kURLs;
@@ -1681,17 +1681,17 @@ nsMsgComposeAndSend::GetBodyFromEditor()
   {
     // Convert to entities.
     // If later Editor generates entities then we can remove this.
     bool isAsciiOnly;
     rv = nsMsgI18NSaveAsCharset(mCompFields->GetForcePlainText() ? TEXT_PLAIN : attachment1_type,
                                 aCharset, bodyText, getter_Copies(outCString), nsnull, &isAsciiOnly);
 
     if (mCompFields->GetForceMsgEncoding())
-      isAsciiOnly = PR_FALSE;
+      isAsciiOnly = false;
 
     mCompFields->SetBodyIsAsciiOnly(isAsciiOnly);
 
     // body contains characters outside the current mail charset,
     // ask whether to convert to UTF-8 (bug 233361). do this only for text/plain
     if ((NS_ERROR_UENC_NOMAPPING == rv) && mCompFields->GetForcePlainText()) {
       // if nbsp then replace it by sp and try again
       PRUnichar *bodyTextPtr = bodyText;
@@ -1905,20 +1905,20 @@ nsMsgComposeAndSend::ProcessMultipartRel
 
     bool acceptObject = false;
     rv = GetEmbeddedObjectInfo(node, &attachment, &acceptObject);
     NS_ENSURE_SUCCESS(rv, NS_ERROR_MIME_MPART_ATTACHMENT_ERROR);
     if (!acceptObject)
         continue;
 
     // MUST set this to get placed in the correct part of the message
-    m_attachments[i].mMHTMLPart = PR_TRUE;
-
-    m_attachments[i].mDeleteFile = PR_TRUE;
-    m_attachments[i].m_done = PR_FALSE;
+    m_attachments[i].mMHTMLPart = true;
+
+    m_attachments[i].mDeleteFile = true;
+    m_attachments[i].m_done = false;
     m_attachments[i].SetMimeDeliveryState(this);
     m_attachments[i].mNodeIndex = locCount;
 
     j++;
     domSaveArray[j].node = node;
 
     // check if we have alreay attached this object, don't need to attach it twice
     duplicateOf = -1;
@@ -2173,38 +2173,38 @@ nsMsgComposeAndSend::AddCompFieldLocalAt
       {
         // Just look for local file:// attachments and do the right thing.
         if (nsMsgIsLocalFile(url.get()))
         {
           //
           // Now we have to setup the m_attachments entry for the file://
           // URL that is passed in...
           //
-          m_attachments[newLoc].mDeleteFile = PR_FALSE;
+          m_attachments[newLoc].mDeleteFile = false;
 
           nsMsgNewURL(getter_AddRefs(m_attachments[newLoc].mURL), url.get());
 
           if (m_attachments[newLoc].mTmpFile)
           {
             if (m_attachments[newLoc].mDeleteFile)
-              m_attachments[newLoc].mTmpFile->Remove(PR_FALSE);
+              m_attachments[newLoc].mTmpFile->Remove(false);
             m_attachments[newLoc].mTmpFile =nsnull;
           }
           nsresult rv;
           nsCOMPtr<nsIIOService> ioService = do_GetService(NS_IOSERVICE_CONTRACTID, &rv);
           NS_ENSURE_SUCCESS(rv, rv);
           nsCOMPtr <nsIURI> uri;
           rv = ioService->NewURI(url, nsnull, nsnull, getter_AddRefs(uri));
           NS_ENSURE_SUCCESS(rv, rv);
           nsCOMPtr <nsIFileURL> fileURL = do_QueryInterface(uri);
           NS_ENSURE_SUCCESS(rv, rv);
           nsCOMPtr <nsIFile> fileURLFile;
           fileURL->GetFile(getter_AddRefs(fileURLFile));
           m_attachments[newLoc].mTmpFile = do_QueryInterface(fileURLFile);
-          m_attachments[newLoc].mDeleteFile = PR_FALSE;
+          m_attachments[newLoc].mDeleteFile = false;
           if (m_attachments[newLoc].mURL)
           {
             nsAutoString proposedName;
             attachment->GetName(proposedName);
             msg_pick_real_name(&m_attachments[newLoc], proposedName.get(), mCompFields->GetCharacterSet());
           }
 
           // Now, most importantly, we need to figure out what the content type is for
@@ -2267,28 +2267,28 @@ nsMsgComposeAndSend::AddCompFieldLocalAt
                   }
                 }
               }
             }
           }
           else
           {
             attachment->GetContentTypeParam(getter_Copies(m_attachments[newLoc].m_typeParam));
-            mustSnarfAttachment = PR_FALSE;
+            mustSnarfAttachment = false;
           }
 
           //We need to snarf the file to figure out how to send it only if we don't have a content type...
           if (mustSnarfAttachment || m_attachments[newLoc].m_type.IsEmpty())
           {
-            m_attachments[newLoc].m_done = PR_FALSE;
+            m_attachments[newLoc].m_done = false;
             m_attachments[newLoc].SetMimeDeliveryState(this);
           }
           else
           {
-            m_attachments[newLoc].m_done = PR_TRUE;
+            m_attachments[newLoc].m_done = true;
             m_attachments[newLoc].SetMimeDeliveryState(nsnull);
           }
           // For local files, if they are HTML docs and we don't have a charset, we should
           // sniff the file and see if we can figure it out.
           if (!m_attachments[newLoc].m_type.IsEmpty())
           {
             if (m_attachments[newLoc].m_type.LowerCaseEqualsLiteral(TEXT_HTML))
             {
@@ -2343,34 +2343,34 @@ nsMsgComposeAndSend::AddCompFieldRemoteA
         // Just look for files that are NOT local file attachments and do
         // the right thing.
         if (! nsMsgIsLocalFile(url.get()))
         {
           bool isAMessageAttachment = !PL_strncasecmp(url.get(), "mailbox-message://", 18) ||
               !PL_strncasecmp(url.get(), "imap-message://", 15) ||
               !PL_strncasecmp(url.get(), "news-message://", 15);
 
-          m_attachments[newLoc].mDeleteFile = PR_TRUE;
-          m_attachments[newLoc].m_done = PR_FALSE;
+          m_attachments[newLoc].mDeleteFile = true;
+          m_attachments[newLoc].m_done = false;
           m_attachments[newLoc].SetMimeDeliveryState(this);
 
           if (!isAMessageAttachment)
             nsMsgNewURL(getter_AddRefs(m_attachments[newLoc].mURL), url.get());
 
           m_attachments[newLoc].m_encoding = "7bit";
 
           attachment->GetMacType(getter_Copies(m_attachments[newLoc].m_xMacType));
           attachment->GetMacCreator(getter_Copies(m_attachments[newLoc].m_xMacCreator));
 
           /* Count up attachments which are going to come from mail folders
              and from NNTP servers. */
           bool do_add_attachment = false;
           if (isAMessageAttachment)
           {
-            do_add_attachment = PR_TRUE;
+            do_add_attachment = true;
             if (!PL_strncasecmp(url.get(), "news-message://", 15))
               (*aNewsCount)++;
             else
               (*aMailboxCount)++;
 
             m_attachments[newLoc].m_uri = url;
             m_attachments[newLoc].mURL = nsnull;
           }
@@ -2443,28 +2443,28 @@ nsMsgComposeAndSend::HackAttachments(nsI
     return NS_ERROR_INVALID_ARG;
 
   // Now handle the preloaded attachments...
   if (numPreloadedAttachments > 0)
   {
     // These are attachments which have already been downloaded to tmp files.
     // We merely need to point the internal attachment data at those tmp
     // files.
-    m_pre_snarfed_attachments_p = PR_TRUE;
+    m_pre_snarfed_attachments_p = true;
 
     for (i = mCompFieldLocalAttachments; i < mPreloadedAttachmentCount; i++)
     {
       nsCOMPtr<nsIMsgAttachedFile> attachedFile = do_QueryElementAt(preloadedAttachments, i);
       if (!attachedFile)
         continue;
 
       /* These attachments are already "snarfed". */
-      m_attachments[i].mDeleteFile = PR_FALSE;
+      m_attachments[i].mDeleteFile = false;
       m_attachments[i].SetMimeDeliveryState(nsnull);
-      m_attachments[i].m_done = PR_TRUE;
+      m_attachments[i].m_done = true;
 
       attachedFile->GetOrigUrl(getter_AddRefs(m_attachments[i].mURL));
 
       attachedFile->GetType(m_attachments[i].m_type);
 
       // Set it to the compose fields for a default...
       m_attachments[i].m_charset = mCompFields->GetCharacterSet();
 
@@ -2490,17 +2490,17 @@ nsMsgComposeAndSend::HackAttachments(nsI
       attachedFile->GetRealName(m_attachments[i].m_realName);
       attachedFile->GetXMacType(m_attachments[i].m_xMacType);
       attachedFile->GetXMacCreator(m_attachments[i].m_xMacCreator);
       attachedFile->GetEncoding(m_attachments[i].m_encoding);
 
       if (m_attachments[i].mTmpFile)
       {
         if (m_attachments[i].mDeleteFile)
-          m_attachments[i].mTmpFile->Remove(PR_FALSE);
+          m_attachments[i].mTmpFile->Remove(false);
         m_attachments[i].mTmpFile = nsnull;
       }
       attachedFile->GetTmpFile(getter_AddRefs(m_attachments[i].mTmpFile));
 
       attachedFile->GetSize(&m_attachments[i].m_size);
       attachedFile->GetUnprintableCount(&m_attachments[i].m_unprintable_count);
       attachedFile->GetHighbitCount(&m_attachments[i].m_highbit_count);
       attachedFile->GetCtlCount(&m_attachments[i].m_ctl_count);
@@ -2508,17 +2508,17 @@ nsMsgComposeAndSend::HackAttachments(nsI
       attachedFile->GetMaxLineLength(&m_attachments[i].m_max_column);
 
       /* If the attachment has an encoding, and it's not one of
       the "null" encodings, then keep it. */
       if (!m_attachments[i].m_encoding.IsEmpty() &&
           !m_attachments[i].m_encoding.LowerCaseEqualsLiteral(ENCODING_7BIT) &&
           !m_attachments[i].m_encoding.LowerCaseEqualsLiteral(ENCODING_8BIT) &&
           !m_attachments[i].m_encoding.LowerCaseEqualsLiteral(ENCODING_BINARY))
-        m_attachments[i].m_already_encoded_p = PR_TRUE;
+        m_attachments[i].m_already_encoded_p = true;
 
             if (m_attachments[i].mURL)
         msg_pick_real_name(&m_attachments[i], nsnull, mCompFields->GetCharacterSet());
     }
   }
 
   // First, handle the multipart related attachments if any...
   //
@@ -2551,18 +2551,18 @@ nsMsgComposeAndSend::HackAttachments(nsI
     PRInt32     locCount = -1;
 
     for (i = (mPreloadedAttachmentCount + GetMultipartRelatedCount() + mCompFieldRemoteAttachments); i < m_attachment_count; i++)
     {
       locCount++;
       nsCOMPtr<nsIMsgAttachmentData> attachment(do_QueryElementAt(attachments, i));
       if (!attachment)
         continue;
-      m_attachments[i].mDeleteFile = PR_TRUE;
-      m_attachments[i].m_done = PR_FALSE;
+      m_attachments[i].mDeleteFile = true;
+      m_attachments[i].m_done = false;
       m_attachments[i].SetMimeDeliveryState(this);
 
       attachment->GetUrl(getter_AddRefs(m_attachments[i].mURL));
 
       attachment->GetRealType(m_attachments[i].m_overrideType);
       m_attachments[i].m_charset = mCompFields->GetCharacterSet();
       attachment->GetRealEncoding(m_attachments[i].m_overrideEncoding);
       attachment->GetDesiredType(m_attachments[i].m_desiredType);
@@ -2596,17 +2596,17 @@ nsMsgComposeAndSend::HackAttachments(nsI
 
   bool needToCallGatherMimeAttachments = true;
 
   if (m_attachment_count > 0)
   {
     // If there is more than one mailbox URL, or more than one NNTP url,
     // do the load in serial rather than parallel, for efficiency.
     if (mailbox_count > 1 || news_count > 1)
-      m_be_synchronous_p = PR_TRUE;
+      m_be_synchronous_p = true;
 
     m_attachment_pending_count = m_attachment_count;
 
     // Start the URL attachments loading (eventually, an exit routine will
     // call the done_callback).
 
     for (i = 0; i < m_attachment_count; i++)
     {
@@ -2616,18 +2616,18 @@ nsMsgComposeAndSend::HackAttachments(nsI
         continue;
       }
 
       //
       //  IF we get here and the URL is NULL, just dec the pending count and move on!!!
       //
       if ( (!m_attachments[i].mURL) && (!m_attachments[i].m_uri.Length()) )
       {
-        m_attachments[i].m_bogus_attachment = PR_TRUE;
-        m_attachments[i].m_done = PR_TRUE;
+        m_attachments[i].m_bogus_attachment = true;
+        m_attachments[i].m_done = true;
         m_attachments[i].SetMimeDeliveryState(nsnull);
         m_attachment_pending_count--;
         continue;
       }
 
       //
       // This only returns a failure code if NET_GetURL was not called
       // (and thus no exit routine was or will be called.)
@@ -2644,32 +2644,32 @@ nsMsgComposeAndSend::HackAttachments(nsI
       {
         SetStatusMessage(nsDependentString(printfString));
         PR_Free(printfString);
       }
 
       /* As SnarfAttachment will call GatherMimeAttachments when it will be done (this is an async process),
          we need to avoid to call it ourself.
       */
-      needToCallGatherMimeAttachments = PR_FALSE;
+      needToCallGatherMimeAttachments = false;
 
       nsresult status = m_attachments[i].SnarfAttachment(mCompFields);
       if (NS_FAILED(status))
       {
         nsString errorMsg;
         nsAutoString attachmentFileName;
         nsresult rv = ConvertToUnicode(nsMsgI18NFileSystemCharset(), m_attachments[i].m_realName, attachmentFileName);
         if (NS_SUCCEEDED(rv))
         {
           nsCOMPtr<nsIStringBundle> bundle;
           const PRUnichar *params[] = { attachmentFileName.get() };
           mComposeBundle->FormatStringFromID(NS_ERROR_GET_CODE(NS_MSG_ERROR_ATTACHING_FILE), params, 1, getter_Copies(errorMsg));
-          mSendReport->SetMessage(nsIMsgSendReport::process_Current, errorMsg.get(), PR_FALSE);
+          mSendReport->SetMessage(nsIMsgSendReport::process_Current, errorMsg.get(), false);
           mSendReport->SetError(nsIMsgSendReport::process_Current, NS_MSG_GENERATE_FAILURE(NS_MSG_ERROR_ATTACHING_FILE) /* status */,
-                                PR_FALSE);
+                                false);
         }
         return NS_MSG_ERROR_ATTACHING_FILE;
       }
       if (m_be_synchronous_p)
         break;
     }
   }
 
@@ -2704,17 +2704,17 @@ int nsMsgComposeAndSend::SetMimeHeader(n
     case nsMsgCompFields::MSG_ORGANIZATION_HEADER_ID :
     case nsMsgCompFields::MSG_SUBJECT_HEADER_ID :
     case nsMsgCompFields::MSG_REFERENCES_HEADER_ID :
     case nsMsgCompFields::MSG_X_TEMPLATE_HEADER_ID :
     case nsMsgCompFields::MSG_ATTACHMENTS_HEADER_ID :
       dupHeader = mime_fix_header(value);
       break;
 
-    default : NS_ASSERTION(PR_FALSE, "invalid header"); // unhandled header - bad boy.
+    default : NS_ASSERTION(false, "invalid header"); // unhandled header - bad boy.
   }
 
   if (dupHeader)
   {
     ret = mCompFields->SetAsciiHeader(header, dupHeader);
     PR_Free(dupHeader);
   }
   return ret;
@@ -2779,26 +2779,26 @@ nsMsgComposeAndSend::InitCompositionFiel
   else
   {
     bool useDefaultFCC = true;
     const char *fieldsFCC = fields->GetFcc();
     if (fieldsFCC && *fieldsFCC)
     {
       if (PL_strcasecmp(fieldsFCC, "nocopy://") == 0)
       {
-        useDefaultFCC = PR_FALSE;
+        useDefaultFCC = false;
         mCompFields->SetFcc("");
       }
       else
       {
         nsCOMPtr<nsIMsgFolder> folder;
         GetExistingFolder(nsDependentCString(fieldsFCC), getter_AddRefs(folder));
         if (folder)
         {
-          useDefaultFCC = PR_FALSE;
+          useDefaultFCC = false;
           SetMimeHeader(nsMsgCompFields::MSG_FCC_HEADER_ID, fieldsFCC);
         }
       }
     }
 
     // We use default FCC setting if it's not set or was set to an invalid folder.
     if (useDefaultFCC)
     {
@@ -2845,17 +2845,17 @@ nsMsgComposeAndSend::InitCompositionFiel
                              &fccReplyFollowsParent);
                     if (NS_SUCCEEDED(rv) && fccReplyFollowsParent)
                     {
                       nsCString folderURI;
                       rv = folder->GetURI(folderURI);
                       if (NS_SUCCEEDED(rv))
                       {
                         mCompFields->SetFcc(folderURI.get());
-                        useDefaultFCC = PR_FALSE;
+                        useDefaultFCC = false;
                       }
                     }
                   }
                 }
               }
             }
           }
         }
@@ -2874,22 +2874,22 @@ nsMsgComposeAndSend::InitCompositionFiel
   // Deal with an additional FCC operation for this email.
   //
   const char *fieldsFCC2 = fields->GetFcc2();
   if ( (fieldsFCC2) && (*fieldsFCC2) )
   {
     if (PL_strcasecmp(fieldsFCC2, "nocopy://") == 0)
     {
       mCompFields->SetFcc2("");
-      mNeedToPerformSecondFCC = PR_FALSE;
+      mNeedToPerformSecondFCC = false;
     }
     else
     {
       mCompFields->SetFcc2(fieldsFCC2);
-      mNeedToPerformSecondFCC = PR_TRUE;
+      mNeedToPerformSecondFCC = true;
     }
   }
 
   mCompFields->SetNewspostUrl((char *) fields->GetNewspostUrl());
 
   /* strip whitespace from and duplicate header fields. */
   SetMimeHeader(nsMsgCompFields::MSG_FROM_HEADER_ID, fields->GetFrom());
   SetMimeHeader(nsMsgCompFields::MSG_REPLY_TO_HEADER_ID, fields->GetReplyTo());
@@ -3006,20 +3006,20 @@ nsMsgComposeAndSend::AddDefaultCustomHea
 
       nsCString headerVal;
       rv = mUserIdentity->GetCharAttribute(headerName.get(), headerVal);
       if (NS_SUCCEEDED(rv)) {
         PRInt32 colonIdx = headerVal.FindChar(':') + 1;
         if (colonIdx != 0) { // check that the header is *most likely* valid.
           char * convHeader =
             nsMsgI18NEncodeMimePartIIStr(headerVal.get() + colonIdx,
-                                         PR_FALSE,
+                                         false,
                                          mCompFields->GetCharacterSet(),
                                          colonIdx,
-                                         PR_TRUE);
+                                         true);
           if (convHeader) {
             newHeaderVal.Append(Substring(headerVal, 0, colonIdx));
             newHeaderVal.Append(convHeader);
             // we must terminate the header with CRLF here
             // as nsMsgCompUtils.cpp just calls PUSH_STRING
             newHeaderVal.Append("\r\n");
             PR_Free(convHeader);
           }
@@ -3090,18 +3090,18 @@ nsMsgComposeAndSend::AddMailFollowupToHe
   NS_ENSURE_SUCCESS(rv, rv);
 
   // ... If the result is equal to the input, we don't write to a subscribed
   // mailing list and therefore we don't add Mail-Followup-To
   if (recipients_no_dups == recipients_without_mailing_lists)
     return NS_OK;
 
   // Set Mail-Followup-To
-  char * mimeHeader = nsMsgI18NEncodeMimePartIIStr(recipients.get(), PR_TRUE,
-      mCompFields->GetCharacterSet(), mftHeaderLabel.Length(), PR_TRUE);
+  char * mimeHeader = nsMsgI18NEncodeMimePartIIStr(recipients.get(), true,
+      mCompFields->GetCharacterSet(), mftHeaderLabel.Length(), true);
   if (!mimeHeader)
     return NS_ERROR_FAILURE;
 
   customHeaders.Append(mftHeaderLabel);
   customHeaders.Append(mimeHeader);
   customHeaders.AppendLiteral("\r\n");
   mCompFields->SetOtherRandomHeaders(customHeaders.get());
   PR_Free(mimeHeader);
@@ -3184,18 +3184,18 @@ nsMsgComposeAndSend::AddMailReplyToHeade
 
   // Set Mail-Reply-To
   nsCAutoString replyTo, mailReplyTo;
   replyTo = mCompFields->GetReplyTo();
   if (replyTo.IsEmpty())
     mailReplyTo = mCompFields->GetFrom();
   else
     mailReplyTo = replyTo;
-  char * mimeHeader = nsMsgI18NEncodeMimePartIIStr(mailReplyTo.get(), PR_TRUE,
-    mCompFields->GetCharacterSet(), mrtHeaderLabel.Length(), PR_TRUE);
+  char * mimeHeader = nsMsgI18NEncodeMimePartIIStr(mailReplyTo.get(), true,
+    mCompFields->GetCharacterSet(), mrtHeaderLabel.Length(), true);
   if (!mimeHeader)
     return NS_ERROR_FAILURE;
 
   customHeaders.Append(mrtHeaderLabel);
   customHeaders.Append(mimeHeader);
   customHeaders.AppendLiteral("\r\n");
   mCompFields->SetOtherRandomHeaders(customHeaders.get());
   PR_Free(mimeHeader);
@@ -3266,17 +3266,17 @@ nsMsgComposeAndSend::Init(
               MSG_ComposeType aType)
 {
   nsresult      rv = NS_OK;
 
   //Reset last error
   mLastErrorReported = NS_OK;
 
   //Let make sure we retreive the correct number of related parts. It may have changed since last time
-  GetMultipartRelatedCount(PR_TRUE);
+  GetMultipartRelatedCount(true);
 
   nsString msg;
   if (!mComposeBundle)
   {
     nsCOMPtr<nsIStringBundleService> bundleService(do_GetService("@mozilla.org/intl/stringbundle;1", &rv));
     NS_ENSURE_SUCCESS(rv, rv);
     nsCOMPtr<nsIStringBundle> bundle;
     rv = bundleService->CreateBundle("chrome://messenger/locale/messengercompose/composeMsgs.properties", getter_AddRefs(mComposeBundle));
@@ -3330,21 +3330,21 @@ nsMsgComposeAndSend::Init(
   if (NS_SUCCEEDED(rv) && secureCompose)
   {
     bool requiresEncryptionWork = false;
     rv = secureCompose->RequiresCryptoEncapsulation(aUserIdentity, fields,
                                                     &requiresEncryptionWork);
     NS_ENSURE_SUCCESS(rv, rv);
     if (requiresEncryptionWork)
     {
-      strictly_mime = PR_TRUE;
+      strictly_mime = true;
       // RFC2633 3.1.3 doesn't require multipart/signed entities to have
       // transfer encoding applied for ascii, but do it anyway to make sure
       // the content (e.g. line endings) isn't mangled along the way.
-      fields->SetForceMsgEncoding(PR_TRUE);
+      fields->SetForceMsgEncoding(true);
     }
   }
 
   nsMsgMIMESetConformToStandard(strictly_mime);
   mime_use_quoted_printable_p = strictly_mime;
 
   rv = InitCompositionFields(fields, aOriginalMsgURI, aType);
   if (NS_FAILED(rv))
@@ -3498,17 +3498,17 @@ nsMsgComposeAndSend::DeliverMessage()
           PR_Free(printfString);
       }
     }
   }
 
   if (news_p)
   {
     if (mail_p)
-      mSendMailAlso = PR_TRUE;
+      mSendMailAlso = true;
 
     return DeliverFileAsNews();   /* will call DeliverFileAsMail if it needs to */
   }
   else if (mail_p)
     return DeliverFileAsMail();
   else
     return NS_ERROR_UNEXPECTED;
   return NS_OK;
@@ -3623,17 +3623,17 @@ nsMsgComposeAndSend::DeliverFileAsMail()
             collectAddresses /* create card if one doesn't exist */, sendFormat);
   }
 
   // We need undo groups to keep only the addresses
   nsresult rv = StripOutGroupNames(buf);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Ok, now MIME II encode this to prevent 8bit problems...
-  char *convbuf = nsMsgI18NEncodeMimePartIIStr(buf, PR_TRUE,
+  char *convbuf = nsMsgI18NEncodeMimePartIIStr(buf, true,
             mCompFields->GetCharacterSet(), 0, nsMsgMIMEGetConformToStandard());
   if (convbuf)
   {
     // MIME-PartII conversion
     PR_FREEIF(buf);
     buf = convbuf;
   }
 
@@ -3646,17 +3646,17 @@ nsMsgComposeAndSend::DeliverFileAsMail()
   {
     NS_Free(buf);
     buf = ToNewCString(escaped_buf);
   }
 
   nsCOMPtr<nsISmtpService> smtpService(do_GetService(NS_SMTPSERVICE_CONTRACTID, &rv));
   if (NS_SUCCEEDED(rv) && smtpService)
   {
-    MsgDeliveryListener *deliveryListener = new MsgDeliveryListener(this, PR_FALSE);
+    MsgDeliveryListener *deliveryListener = new MsgDeliveryListener(this, false);
     if (!deliveryListener)
       return NS_ERROR_OUT_OF_MEMORY;
 
     // we used to get the prompt from the compose window and we'd pass that in
     // to the smtp protocol as the prompt to use. But when you send a message,
     // we dismiss the compose window.....so you are parenting off of a window that
     // isn't there. To have it work correctly I think we want the alert dialogs to be modal
     // to the top most mail window...after all, that's where we are going to be sending status
@@ -3703,17 +3703,17 @@ nsMsgComposeAndSend::DeliverFileAsNews()
 
   nsCOMPtr<nsIPrompt> promptObject;
   GetDefaultPrompt(getter_AddRefs(promptObject));
 
   nsCOMPtr<nsINntpService> nntpService(do_GetService(NS_NNTPSERVICE_CONTRACTID, &rv));
 
   if (NS_SUCCEEDED(rv) && nntpService)
   {
-    MsgDeliveryListener *deliveryListener = new MsgDeliveryListener(this, PR_TRUE);
+    MsgDeliveryListener *deliveryListener = new MsgDeliveryListener(this, true);
     if (!deliveryListener)
       return NS_ERROR_OUT_OF_MEMORY;
 
     // Tell the user we are posting the message!
     nsString msg;
     mComposeBundle->GetStringFromID(NS_MSG_POSTING_MESSAGE, getter_Copies(msg));
     SetStatusMessage(msg);
 
@@ -3744,19 +3744,19 @@ nsMsgComposeAndSend::Fail(nsresult failu
 
   if (NS_FAILED(failure_code))
   {
     nsCOMPtr<nsIPrompt> prompt;
     GetDefaultPrompt(getter_AddRefs(prompt));
 
     if (mSendReport)
     {
-      mSendReport->SetError(nsIMsgSendReport::process_Current, failure_code, PR_FALSE);
-      mSendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg, PR_FALSE);
-      mSendReport->DisplayReport(prompt, PR_TRUE, PR_TRUE, _retval);
+      mSendReport->SetError(nsIMsgSendReport::process_Current, failure_code, false);
+      mSendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg, false);
+      mSendReport->DisplayReport(prompt, true, true, _retval);
     }
     else
     {
       if (failure_code != NS_ERROR_BUT_DONT_SHOW_ALERT)
         nsMsgDisplayMessageByID(prompt, NS_ERROR_SEND_FAILED);
     }
   }
 
@@ -3867,48 +3867,48 @@ nsMsgComposeAndSend::DoDeliveryExitProce
   //
 
   DoFcc();
 }
 
 NS_IMETHODIMP
 nsMsgComposeAndSend::DeliverAsMailExit(nsIURI *aUrl, nsresult aExitCode)
 {
-  DoDeliveryExitProcessing(aUrl, aExitCode, PR_FALSE);
+  DoDeliveryExitProcessing(aUrl, aExitCode, false);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgComposeAndSend::DeliverAsNewsExit(nsIURI *aUrl, nsresult aExitCode)
 {
   DoDeliveryExitProcessing(aUrl, aExitCode, mSendMailAlso);
   return NS_OK;
 }
 
 bool nsMsgComposeAndSend::CanSaveMessagesToFolder(const char *folderURL)
 {
   nsresult rv;
   nsCOMPtr<nsIRDFService> rdf(do_GetService("@mozilla.org/rdf/rdf-service;1", &rv));
   if (NS_FAILED(rv))
-    return PR_FALSE;
+    return false;
 
   nsCOMPtr<nsIRDFResource> resource;
   rv = rdf->GetResource(nsDependentCString(folderURL), getter_AddRefs(resource));
   if (NS_FAILED(rv))
-    return PR_FALSE;
+    return false;
 
   nsCOMPtr <nsIMsgFolder> thisFolder;
   thisFolder = do_QueryInterface(resource, &rv);
   if (NS_FAILED(rv) || !thisFolder)
-    return PR_FALSE;
+    return false;
 
   nsCOMPtr<nsIMsgIncomingServer> server;
   rv = thisFolder->GetServer(getter_AddRefs(server));
   if (NS_FAILED(rv) || !server)
-    return PR_FALSE;
+    return false;
 
   // See if we are allowed to save/file msgs to this folder.
   bool canSave;
   rv = server->GetCanFileMessagesOnServer(&canSave);
   return canSave;
 }
 
 //
@@ -4113,17 +4113,17 @@ nsMsgComposeAndSend::NotifyListenerOnSto
   // just wanted a single copy operation, we can tell everyone we are done
   // and move on with life. Only do the second copy if the first one worked.
   //
   if ( NS_SUCCEEDED(aStatus) && (mNeedToPerformSecondFCC) )
   {
     if (mSendReport)
       mSendReport->SetCurrentProcess(nsIMsgSendReport::process_FCC);
 
-    mNeedToPerformSecondFCC = PR_FALSE;
+    mNeedToPerformSecondFCC = false;
 
     const char *fcc2 = mCompFields->GetFcc2();
     if (fcc2 && *fcc2)
     {
       nsresult rv = MimeDoFCC(mTempFile,
                               nsMsgDeliverNow,
                               mCompFields->GetBcc(),
                               fcc2,
@@ -4237,17 +4237,17 @@ nsMsgComposeAndSend::CreateAndSendMessag
   rv = Init(aUserIdentity, aAccountKey, (nsMsgCompFields *)fields, nsnull,
           digest_p, dont_deliver_p, mode, msgToReplace,
           attachment1_type, attachment1_body,
           attachment1_body_length,
           attachments, preloaded_attachments,
           password, aOriginalMsgURI, aType);
 
   if (NS_FAILED(rv) && mSendReport)
-    mSendReport->SetError(nsIMsgSendReport::process_Current, rv, PR_FALSE);
+    mSendReport->SetError(nsIMsgSendReport::process_Current, rv, false);
 
   return rv;
 }
 
 NS_IMETHODIMP
 nsMsgComposeAndSend::CreateRFC822Message(
               nsIMsgIdentity *aUserIdentity,
               nsIMsgCompFields *aFields,
@@ -4282,17 +4282,17 @@ nsMsgComposeAndSend::CreateRFC822Message
   rv = Init(aUserIdentity, nsnull, (nsMsgCompFields *)aFields, nsnull,
             false, true, mode, nsnull,
             aMsgType, aMsgBody,
             aMsgBodyLength,
             nsnull, aAttachments,
             nsnull, EmptyCString(), nsnull);
 
   if (NS_FAILED(rv) && mSendReport)
-    mSendReport->SetError(nsIMsgSendReport::process_Current, rv, PR_FALSE);
+    mSendReport->SetError(nsIMsgSendReport::process_Current, rv, false);
 
   return rv;
 }
 
 nsresult
 nsMsgComposeAndSend::SendMessageFile(
               nsIMsgIdentity                    *aUserIndentity,
               const char                        *aAccountKey,
@@ -4330,26 +4330,26 @@ nsMsgComposeAndSend::SendMessageFile(
   // Setup the listener...
   mListener = aListener;
 
   // Should we delete the temp file when done?
   if (!deleteSendFileOnCompletion)
     mReturnFile = sendIFile;
 
   rv = Init(aUserIndentity, aAccountKey, (nsMsgCompFields *)fields, sendIFile,
-            digest_p, PR_FALSE, mode, msgToReplace,
+            digest_p, false, mode, msgToReplace,
             nsnull, nsnull, nsnull,
             nsnull, nsnull,
             password, EmptyCString(), nsnull);
 
   if (NS_SUCCEEDED(rv))
     rv = DeliverMessage();
 
   if (NS_FAILED(rv) && mSendReport)
-    mSendReport->SetError(nsIMsgSendReport::process_Current, rv, PR_FALSE);
+    mSendReport->SetError(nsIMsgSendReport::process_Current, rv, false);
 
   return rv;
 }
 
 nsMsgAttachmentData *
 BuildURLAttachmentData(nsIURI *url)
 {
   int                 attachCount = 2;  // one entry and one empty entry
@@ -4479,17 +4479,17 @@ nsMsgComposeAndSend::MimeDoFCC(nsIFile  
   nsCOMPtr<nsIOutputStream> tempOutfile;
   rv = MsgNewBufferedFileOutputStream(getter_AddRefs(tempOutfile), mCopyFile, -1, 00600);
   if (NS_FAILED(rv))
   {
     if (mSendReport)
     {
       nsAutoString error_msg;
       nsMsgBuildMessageWithTmpFile(mCopyFile, error_msg);
-      mSendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg.get(), PR_FALSE);
+      mSendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg.get(), false);
     }
     status = NS_MSG_UNABLE_TO_OPEN_TMP_FILE;
 
     mCopyFile = nsnull;
     return status;
   }
 
   //
@@ -4498,17 +4498,17 @@ nsMsgComposeAndSend::MimeDoFCC(nsIFile  
   nsCOMPtr<nsIInputStream> inputFile;
   rv = NS_NewLocalFileInputStream(getter_AddRefs(inputFile), input_file);
   if (NS_FAILED(rv))
   {
     if (mSendReport)
     {
       nsAutoString error_msg;
       nsMsgBuildMessageWithFile(mTempFile, error_msg);
-      mSendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg.get(), PR_FALSE);
+      mSendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg.get(), false);
     }
     status = NS_MSG_UNABLE_TO_OPEN_FILE;
     goto FAIL;
   }
 
   // now the buffers...
   ibuffer = nsnull;
   while (!ibuffer && (ibuffer_size >= 1024))
@@ -4738,17 +4738,17 @@ nsMsgComposeAndSend::MimeDoFCC(nsIFile  
   if (bcc_header && *bcc_header
 #ifndef SAVE_BCC_IN_FCC_FILE
       && (mode == MSG_QueueForLater || mode == MSG_SaveAsDraft ||
           mode == MSG_SaveAsTemplate)
 #endif
     )
   {
     char *convBcc;
-    convBcc = nsMsgI18NEncodeMimePartIIStr(bcc_header, PR_TRUE,
+    convBcc = nsMsgI18NEncodeMimePartIIStr(bcc_header, true,
                     mCompFields->GetCharacterSet(), sizeof("BCC: "),
                     nsMsgMIMEGetConformToStandard());
 
     PRInt32 L = strlen(convBcc ? convBcc : bcc_header) + 20;
     char *buf = (char *) PR_Malloc (L);
     if (!buf)
     {
       status = NS_ERROR_OUT_OF_MEMORY;
@@ -4949,17 +4949,17 @@ nsMsgComposeAndSend::GetSendReport(nsIMs
 nsresult nsMsgComposeAndSend::Abort()
 {
   PRUint32 i;
   nsresult rv;
 
   if (mAbortInProcess)
     return NS_OK;
 
-  mAbortInProcess = PR_TRUE;
+  mAbortInProcess = true;
 
   if (m_plaintext)
     rv = m_plaintext->Abort();
 
   if (m_attachments)
   {
     for (i = 0; i < m_attachment_count; i ++)
     {
@@ -4978,17 +4978,17 @@ nsresult nsMsgComposeAndSend::Abort()
 
   if (mCopyObj)
   {
     nsCOMPtr<nsIMsgCopyService> copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     copyService->NotifyCompletion(mCopyFile, mCopyObj->mDstFolder, NS_ERROR_ABORT);
   }
-  mAbortInProcess = PR_FALSE;
+  mAbortInProcess = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgComposeAndSend::GetProcessAttachmentsSynchronously(bool *_retval)
 {
   NS_ENSURE_ARG(_retval);
   *_retval = m_be_synchronous_p;
   return NS_OK;
@@ -5079,17 +5079,17 @@ NS_IMETHODIMP nsMsgComposeAndSend::SetCr
 {
   m_crypto_closure = aCryptoclosure;
   return NS_OK;
 }
 
 NS_IMPL_ISUPPORTS1(nsMsgAttachmentData, nsIMsgAttachmentData)
 
 nsMsgAttachmentData::nsMsgAttachmentData() :  m_size(0), m_isExternalAttachment(0),
-  m_isDownloaded(PR_FALSE), m_hasFilename(PR_FALSE)
+  m_isDownloaded(false), m_hasFilename(false)
 {
 }
 
 nsMsgAttachmentData::~nsMsgAttachmentData()
 {
 }
 
 NS_IMETHODIMP nsMsgAttachmentData::GetUrl(nsIURI **aUrl)
--- a/mailnews/compose/src/nsMsgSendLater.cpp
+++ b/mailnews/compose/src/nsMsgSendLater.cpp
@@ -75,31 +75,31 @@ NS_IMPL_ISUPPORTS7(nsMsgSendLater,
                    nsIRequestObserver,
                    nsIStreamListener,
                    nsIObserver,
                    nsIUrlListener,
                    nsIMsgShutdownTask)
 
 nsMsgSendLater::nsMsgSendLater()
 {
-  mSendingMessages = PR_FALSE;
-  mTimerSet = PR_FALSE;
+  mSendingMessages = false;
+  mTimerSet = false;
   mTotalSentSuccessfully = 0;
   mTotalSendCount = 0;
   mLeftoverBuffer = nsnull;
 
   m_to = nsnull;
   m_bcc = nsnull;
   m_fcc = nsnull;
   m_newsgroups = nsnull;
   m_newshost = nsnull;
   m_headers = nsnull;
   m_flags = 0;
   m_headersFP = 0;
-  m_inhead = PR_TRUE;
+  m_inhead = true;
   m_headersPosition = 0;
 
   m_bytesRead = 0;
   m_position = 0;
   m_flagsPosition = 0;
   m_headersSize = 0;
 
   mIdentityKey = nsnull;
@@ -132,23 +132,23 @@ nsMsgSendLater::Init()
   if (NS_FAILED(rv) || !sendInBackground)
     return NS_OK;
 
   // We need to know when we're shutting down.
   nsCOMPtr<nsIObserverService> observerService =
     do_GetService("@mozilla.org/observer-service;1", &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = observerService->AddObserver(this, "xpcom-shutdown", PR_FALSE);
+  rv = observerService->AddObserver(this, "xpcom-shutdown", false);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = observerService->AddObserver(this, "quit-application", PR_FALSE);
+  rv = observerService->AddObserver(this, "quit-application", false);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = observerService->AddObserver(this, "msg-shutdown", PR_FALSE);
+  rv = observerService->AddObserver(this, "msg-shutdown", false);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Subscribe to the unsent messages folder
   // XXX This code should be set up for multiple unsent folders, however we
   // don't support that at the moment, so for now just assume one folder.
   rv = GetUnsentMessagesFolder(nsnull, getter_AddRefs(mMessageFolder));
   NS_ENSURE_SUCCESS(rv, rv);
 
@@ -166,30 +166,30 @@ nsMsgSendLater::Observe(nsISupports *aSu
 {
   if (aSubject == mTimer && !strcmp(aTopic, "timer-callback"))
   {
     if (mTimer)
       mTimer->Cancel();
     else
       NS_ERROR("mTimer was null in nsMsgSendLater::Observe");
 
-    mTimerSet = PR_FALSE;
+    mTimerSet = false;
     // If we've already started a send since the timer fired, don't start
     // another
     if (!mSendingMessages)
-      InternalSendMessages(PR_FALSE, nsnull);
+      InternalSendMessages(false, nsnull);
   }
   else if (!strcmp(aTopic, "quit-application"))
   {
     // If the timer is set, cancel it - we're quitting, the shutdown service
     // interfaces will sort out sending etc.
     if (mTimer)
       mTimer->Cancel();
 
-    mTimerSet = PR_FALSE;
+    mTimerSet = false;
   }
   else if (!strcmp(aTopic, "xpcom-shutdown"))
   {
     // We're shutting down. Unsubscribe from the unsentFolder notifications
     // they aren't any use to us now, we don't want to start sending more
     // messages.
     nsresult rv;
     if (mMessageFolder)
@@ -569,39 +569,39 @@ nsMsgSendLater::CompleteMailFileSend()
   //
   nsCString author;
   mMessage->GetAuthor(getter_Copies(author));
 
   nsMsgCompFields * fields = (nsMsgCompFields *)compFields.get();
 
   nsCString decodedString;
   // decoded string is null if the input is not MIME encoded
-  mimeConverter->DecodeMimeHeaderToCharPtr(author.get(), nsnull, PR_FALSE,
-                                           PR_TRUE,
+  mimeConverter->DecodeMimeHeaderToCharPtr(author.get(), nsnull, false,
+                                           true,
                                            getter_Copies(decodedString));
 
   fields->SetFrom(decodedString.IsEmpty() ? author.get() : decodedString.get());
 
   if (m_to)
   {
-    mimeConverter->DecodeMimeHeaderToCharPtr(m_to, nsnull, PR_FALSE, PR_TRUE,
+    mimeConverter->DecodeMimeHeaderToCharPtr(m_to, nsnull, false, true,
                                              getter_Copies(decodedString));
     fields->SetTo(decodedString.IsEmpty() ? m_to : decodedString.get());
   }
 
   if (m_bcc)
   {
-    mimeConverter->DecodeMimeHeaderToCharPtr(m_bcc, nsnull, PR_FALSE, PR_TRUE,
+    mimeConverter->DecodeMimeHeaderToCharPtr(m_bcc, nsnull, false, true,
                                              getter_Copies(decodedString));
     fields->SetBcc(decodedString.IsEmpty() ? m_bcc : decodedString.get());
   }
 
   if (m_fcc)
   {
-    mimeConverter->DecodeMimeHeaderToCharPtr(m_fcc, nsnull, PR_FALSE, PR_TRUE,
+    mimeConverter->DecodeMimeHeaderToCharPtr(m_fcc, nsnull, false, true,
                                              getter_Copies(decodedString));
     fields->SetFcc(decodedString.IsEmpty() ? m_fcc : decodedString.get());
   }
 
   if (m_newsgroups)
     fields->SetNewsgroups(m_newsgroups);
 
 #if 0
@@ -690,17 +690,17 @@ nsMsgSendLater::StartNextMailFileSend(ns
   rv = GetIdentityFromKey(identityKey.get(), getter_AddRefs(identity));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Notify that we're just about to start sending this message
   NotifyListenersOnMessageStartSending(mTotalSendCount, mMessagesToSend.Count(),
                                        identity);
 
   // Setup what we need to parse the data stream correctly
-  m_inhead = PR_TRUE;
+  m_inhead = true;
   m_headersFP = 0;
   m_headersPosition = 0;
   m_bytesRead = 0;
   m_position = 0;
   m_flagsPosition = 0;
   m_headersSize = 0;
   PR_FREEIF(mLeftoverBuffer);
 
@@ -739,17 +739,17 @@ nsMsgSendLater::HasUnsentMessages(nsIMsg
     rv = GetUnsentMessagesFolder(nsnull,
                                  getter_AddRefs(mMessageFolder));
     NS_ENSURE_SUCCESS(rv, rv);
   }
   rv = ReparseDBIfNeeded(nsnull);
   NS_ENSURE_SUCCESS(rv, rv);
 
   PRInt32 totalMessages;
-  rv = mMessageFolder->GetTotalMessages(PR_FALSE, &totalMessages);
+  rv = mMessageFolder->GetTotalMessages(false, &totalMessages);
   NS_ENSURE_SUCCESS(rv, rv);
 
   *aResult = totalMessages > 0;
   return NS_OK;
 }
 
 //
 // To really finalize this capability, we need to have the ability to get
@@ -772,17 +772,17 @@ nsMsgSendLater::HasUnsentMessages(nsIMsg
 //          when send is complete
 //            Copy from Outbox to FCC folder
 //            Delete from Outbox folder
 //
 //
 NS_IMETHODIMP 
 nsMsgSendLater::SendUnsentMessages(nsIMsgIdentity *aIdentity)
 {
-  return InternalSendMessages(PR_TRUE, aIdentity);
+  return InternalSendMessages(true, aIdentity);
 }
 
 // Returns NS_OK if the db is OK, an error otherwise, e.g., we had to reparse.
 nsresult nsMsgSendLater::ReparseDBIfNeeded(nsIUrlListener *aListener)
 {
   // This will kick off a reparse, if needed. So the next time we check if
   // there are unsent messages, the db will be up to date.
   nsCOMPtr<nsIMsgDatabase> unsentDB;
@@ -857,17 +857,17 @@ nsMsgSendLater::InternalSendMessages(boo
     }
   }
 
   // Now get an enumerator for our array.
   rv = NS_NewArrayEnumerator(getter_AddRefs(mEnumerator), mMessagesToSend);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // We're now sending messages so its time to signal that and reset our counts.
-  mSendingMessages = PR_TRUE;
+  mSendingMessages = true;
   mTotalSentSuccessfully = 0;
   mTotalSendCount = 0;
 
   // Notify the listeners that we are starting a send.
   NotifyListenersOnStartSending(mMessagesToSend.Count());
 
   return StartNextMailFileSend(NS_OK);
 }
@@ -925,19 +925,19 @@ nsMsgSendLater::DeleteCurrentMessage()
   // Get the composition fields interface
   nsCOMPtr<nsIMutableArray> msgArray(do_CreateInstance(NS_ARRAY_CONTRACTID));
   if (!msgArray)
     return NS_ERROR_FACTORY_NOT_LOADED;
 
   if (!mMessageFolder)
     return NS_ERROR_UNEXPECTED;
 
-  msgArray->InsertElementAt(mMessage, 0, PR_FALSE);
+  msgArray->InsertElementAt(mMessage, 0, false);
 
-  nsresult res = mMessageFolder->DeleteMessages(msgArray, nsnull, PR_TRUE, PR_FALSE, nsnull, PR_FALSE /*allowUndo*/);
+  nsresult res = mMessageFolder->DeleteMessages(msgArray, nsnull, true, false, nsnull, false /*allowUndo*/);
   if (NS_FAILED(res))
     return NS_ERROR_FAILURE;
 
   // Null out the message so we don't try and delete it again.
   mMessage = nsnull;
 
   return NS_OK;
 }
@@ -989,74 +989,74 @@ nsMsgSendLater::BuildHeaders()
       end--;
 
     switch (buf [0])
     {
     case 'B': case 'b':
       if (!PL_strncasecmp ("BCC", buf, end - buf))
       {
         header = &m_bcc;
-        prune_p = PR_TRUE;
+        prune_p = true;
       }
       break;
     case 'C': case 'c':
       if (!PL_strncasecmp ("CC", buf, end - buf))
       header = &m_to;
       else if (!PL_strncasecmp (HEADER_CONTENT_LENGTH, buf, end - buf))
-      prune_p = PR_TRUE;
+      prune_p = true;
       break;
     case 'F': case 'f':
       if (!PL_strncasecmp ("FCC", buf, end - buf))
       {
         header = &m_fcc;
-        prune_p = PR_TRUE;
+        prune_p = true;
       }
       break;
     case 'L': case 'l':
       if (!PL_strncasecmp ("Lines", buf, end - buf))
-      prune_p = PR_TRUE;
+      prune_p = true;
       break;
     case 'N': case 'n':
       if (!PL_strncasecmp ("Newsgroups", buf, end - buf))
         header = &m_newsgroups;
       break;
     case 'S': case 's':
       if (!PL_strncasecmp ("Sender", buf, end - buf))
-      prune_p = PR_TRUE;
+      prune_p = true;
       break;
     case 'T': case 't':
       if (!PL_strncasecmp ("To", buf, end - buf))
       header = &m_to;
       break;
     case 'X': case 'x':
       {
         PRInt32 headLen = PL_strlen(HEADER_X_MOZILLA_STATUS2);
         if (headLen == end - buf &&
           !PL_strncasecmp(HEADER_X_MOZILLA_STATUS2, buf, end - buf))
-          prune_p = PR_TRUE;
+          prune_p = true;
         else if (PL_strlen(HEADER_X_MOZILLA_STATUS) == end - buf &&
           !PL_strncasecmp(HEADER_X_MOZILLA_STATUS, buf, end - buf))
-          prune_p = do_flags_p = PR_TRUE;
+          prune_p = do_flags_p = true;
         else if (!PL_strncasecmp(HEADER_X_MOZILLA_DRAFT_INFO, buf, end - buf))
-          prune_p = PR_TRUE;
+          prune_p = true;
         else if (!PL_strncasecmp(HEADER_X_MOZILLA_KEYWORDS, buf, end - buf))
-          prune_p = PR_TRUE;
+          prune_p = true;
         else if (!PL_strncasecmp(HEADER_X_MOZILLA_NEWSHOST, buf, end - buf))
         {
-          prune_p = PR_TRUE;
+          prune_p = true;
           header = &m_newshost;
         }
         else if (!PL_strncasecmp(HEADER_X_MOZILLA_IDENTITY_KEY, buf, end - buf))
         {
-          prune_p = PR_TRUE;
+          prune_p = true;
           header = &mIdentityKey;
         }
         else if (!PL_strncasecmp(HEADER_X_MOZILLA_ACCOUNT_KEY, buf, end - buf))
         {
-          prune_p = PR_TRUE;
+          prune_p = true;
           header = &mAccountKey;
         }
         break;
       }
     }
 
     buf = colon + 1;
     while (*buf == ' ' || *buf == '\t')
@@ -1228,17 +1228,17 @@ nsMsgSendLater::DeliverQueuedLine(char *
       PR_FREEIF(m_fcc);
       PR_FREEIF(mIdentityKey);
     }
     
     if (line[0] == '\r' || line[0] == '\n' || line[0] == 0)
     {
       // End of headers.  Now parse them; open the temp file;
       // and write the appropriate subset of the headers out. 
-      m_inhead = PR_FALSE;
+      m_inhead = false;
 
       nsresult rv = MsgNewBufferedFileOutputStream(getter_AddRefs(mOutFile), mTempFile, -1, 00600);
       if (NS_FAILED(rv))
         return NS_MSG_ERROR_WRITING_FILE;
 
       nsresult status = BuildHeaders();
       if (NS_FAILED(status))
         return status;
@@ -1358,17 +1358,17 @@ nsMsgSendLater::NotifyListenersOnMessage
 void
 nsMsgSendLater::EndSendMessages(nsresult aStatus, const PRUnichar *aMsg,
                                 PRUint32 aTotalTried, PRUint32 aSuccessful)
 {
   // Catch-all, we may have had an issue sending, so we may not be calling
   // StartNextMailFileSend to fully finish the sending. Therefore set
   // mSendingMessages to false here so that we don't think we're still trying
   // to send messages
-  mSendingMessages = PR_FALSE;
+  mSendingMessages = false;
 
   // Clear out our array of messages.
   mMessagesToSend.Clear();
 
   // We don't need to keep hold of the database now we've finished sending.
   (void)mMessageFolder->SetMsgDatabase(nsnull);
 
   // or the enumerator, temp file or output stream
@@ -1400,29 +1400,29 @@ nsMsgSendLater::OnSendStepFinished(nsres
   {
     SetOrigMsgDisposition();
     DeleteCurrentMessage();
 
     // Send finished, so that is now 100%, copy to proceed...
     NotifyListenersOnProgress(mTotalSendCount, mMessagesToSend.Count(), 100, 0);
 
     ++mTotalSentSuccessfully;
-    return PR_TRUE;
+    return true;
   }
   else
   {
     // XXX we don't currently get a message string from the send service.
     NotifyListenersOnMessageSendError(mTotalSendCount, aStatus, nsnull);
     nsresult rv = StartNextMailFileSend(aStatus);
     // if this is the last message we're sending, we should report
     // the status failure.
     if (NS_FAILED(rv))
       EndSendMessages(rv, nsnull, mTotalSendCount, mTotalSentSuccessfully);
   }
-  return PR_FALSE;
+  return false;
 }
 
 /**
  * Called when the copy part of sending a message is finished. This will send
  * the next message or handle failure as appropriate.
  *
  * @param aStatus  The success or fail result of the copy step.
  */
@@ -1503,17 +1503,17 @@ nsMsgSendLater::OnItemAdded(nsIMsgFolder
     mTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);
     NS_ENSURE_SUCCESS(rv, NS_OK);
   }
 
   rv = mTimer->Init(static_cast<nsIObserver*>(this), kInitialMessageSendTime,
                     nsITimer::TYPE_ONE_SHOT);
   NS_ENSURE_SUCCESS(rv, NS_OK);
 
-  mTimerSet = PR_TRUE;
+  mTimerSet = true;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgSendLater::OnItemRemoved(nsIMsgFolder *aParentItem, nsISupports *aItem)
 {
   return NS_OK;
--- a/mailnews/compose/src/nsMsgSendPart.cpp
+++ b/mailnews/compose/src/nsMsgSendPart.cpp
@@ -68,31 +68,31 @@ nsMsgSendPart::nsMsgSendPart(nsIMsgSend*
   // if we're not added as a child, the default part number will be "1".
   m_partNum = "1";
   SetMimeDeliveryState(state);
 
   m_parent = nsnull;
   m_buffer = nsnull;
   m_type = nsnull;
   m_other = nsnull;
-  m_strip_sensitive_headers = PR_FALSE;
+  m_strip_sensitive_headers = false;
   m_encoder_data = nsnull;
   
-  m_firstBlock = PR_FALSE;
-  m_needIntlConversion = PR_FALSE;
+  m_firstBlock = false;
+  m_needIntlConversion = false;
   
-  m_mainpart = PR_FALSE;
-  m_just_hit_CR = PR_FALSE;
+  m_mainpart = false;
+  m_just_hit_CR = false;
 }
 
 
 nsMsgSendPart::~nsMsgSendPart()
 {
   if (m_encoder_data) {
-    MIME_EncoderDestroy(m_encoder_data, PR_FALSE);
+    MIME_EncoderDestroy(m_encoder_data, false);
     m_encoder_data = nsnull;
   }
   for (int i=0 ; i < m_numchildren; i++)
     delete m_children[i];
 
   delete [] m_children;
     PR_FREEIF(m_buffer);
   PR_FREEIF(m_other);
@@ -279,17 +279,17 @@ int nsMsgSendPart::PushBody(const char* 
     buffer = mime_get_stream_write_buffer();
     if (!buffer) return NS_ERROR_OUT_OF_MEMORY;
     
     NS_ASSERTION(encoded_data != buffer, "encoded_data == buffer");
     out = buffer;
     
     for (; in < end; in++) {
       if (m_just_hit_CR) {
-        m_just_hit_CR = PR_FALSE;
+        m_just_hit_CR = false;
         if (*in == '\n') {
           // The last thing we wrote was a CRLF from hitting a CR.
           // So, we don't want to do anything from a following LF;
           // we want to ignore it.
           continue;
         }
       }
       if (*in == '\r' || *in == '\n') {
@@ -298,17 +298,17 @@ int nsMsgSendPart::PushBody(const char* 
         *out++ = '\n';
         
         status = mime_write_message_body(m_state, buffer,
           out - buffer);
         if (status < 0) return status;
         out = buffer;
         
         if (*in == '\r') {
-          m_just_hit_CR = PR_TRUE;
+          m_just_hit_CR = true;
         }
         
         out = buffer;
       } else {
         
       /*  Fix for bug #95985. We can't assume that all lines are shorter
       than 4096 chars (MIME_BUFFER_SIZE), so we need to test
       for this here. sfraser.
@@ -384,17 +384,17 @@ divide_content_headers(const char *heade
     content_tail = *content_headers;
     type_tail    = *content_type_header;
     tail = headers;
     
     while (*tail)
     {
       const char *head = tail;
       char **out;
-      while(PR_TRUE) {
+      while(true) {
       /* Loop until we reach a newline that is not followed by whitespace.
         */
         if (tail[0] == 0 ||
           ((tail[0] == '\r' || tail[0] == '\n') &&
           !(tail[1] == ' ' || tail[1] == '\t' || tail[1] == '\n')))
         {
           /* Swallow the whole newline. */
           if (tail[0] == '\r' && tail[1] == '\n')
@@ -636,17 +636,17 @@ nsMsgSendPart::Write()
       PUSH(content_headers);
       PR_Free(content_headers);
       content_headers = 0;
     }
   }
 
   PUSH(CRLF);         // A blank line, to mark the end of headers.
 
-  m_firstBlock = PR_TRUE;
+  m_firstBlock = true;
   /* only convert if we need to tag charset */
   m_needIntlConversion = mime_type_needs_charset(m_type);
   
   if (m_buffer) 
   {
     status = PushBody(m_buffer, PL_strlen(m_buffer));
     if (status < 0)
       goto FAIL;
@@ -659,17 +659,17 @@ nsMsgSendPart::Write()
     {
       // mysteriously disappearing?
       nsCOMPtr<nsIMsgSendReport> sendReport;
       m_state->GetSendReport(getter_AddRefs(sendReport));
       if (sendReport)
       {
         nsAutoString error_msg;
         nsMsgBuildMessageWithTmpFile(m_file, error_msg);
-        sendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg.get(), PR_FALSE);
+        sendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg.get(), false);
       }
       status = NS_MSG_UNABLE_TO_OPEN_TMP_FILE;
       goto FAIL;
     }
 
     nsCString curLine;
     bool more = true;
 
@@ -702,33 +702,33 @@ nsMsgSendPart::Write()
       
         curLine.Append(CRLF);
         
         char *line = (char *) curLine.get();
         if (skipping) {
           if (*line == ' ' || *line == '\t')
             continue;
           else
-            skipping = PR_FALSE;
+            skipping = false;
         }
                 
         if (!PL_strncasecmp(line, "From -", 6) ||
             !PL_strncasecmp(line, "BCC:", 4) ||
             !PL_strncasecmp(line, "FCC:", 4) ||
             !PL_strncasecmp(line, CONTENT_LENGTH ":", CONTENT_LENGTH_LEN+1) ||
             !PL_strncasecmp(line, "Lines:", 6) ||
             !PL_strncasecmp(line, "Status:", 7) ||
             !PL_strncasecmp(line, X_MOZILLA_STATUS ":", X_MOZILLA_STATUS_LEN+1) ||
             !PL_strncasecmp(line, X_MOZILLA_STATUS2 ":", X_MOZILLA_STATUS2_LEN+1) ||
             !PL_strncasecmp(line, X_MOZILLA_DRAFT_INFO ":", X_MOZILLA_DRAFT_INFO_LEN+1) ||
             !PL_strncasecmp(line, X_MOZILLA_NEWSHOST ":", X_MOZILLA_NEWSHOST_LEN+1) ||
             !PL_strncasecmp(line, X_UIDL ":", X_UIDL_LEN+1) ||
             !PL_strncasecmp(line, "X-VM-", 5)) /* hi Kyle */
         {
-          skipping = PR_TRUE;
+          skipping = true;
           continue;
         }
         
         PUSH(line);
         
         if (curLine.Length() == 2) {
           nsCOMPtr <nsISeekableStream> seekableStream = do_QueryInterface(inputStream);
           // seek back the amount of data left in the line buffer...
@@ -746,32 +746,32 @@ nsMsgSendPart::Write()
       if (NS_FAILED(rv))
       {  
         nsCOMPtr<nsIMsgSendReport> sendReport;
         m_state->GetSendReport(getter_AddRefs(sendReport));
         if (sendReport)
         {
           nsAutoString error_msg;
           nsMsgBuildMessageWithFile(m_file, error_msg);
-          sendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg.get(), PR_FALSE);
+          sendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg.get(), false);
           status = NS_MSG_UNABLE_TO_OPEN_FILE;
           goto FAIL;
         }
       }
       status = PushBody(buffer, bytesRead);
       if (status < 0)
         goto FAIL;
       if (bytesRead < MIME_BUFFER_SIZE)
         break;
     }
   }
   
   if (m_encoder_data) 
   {
-    status = MIME_EncoderDestroy(m_encoder_data, PR_FALSE);
+    status = MIME_EncoderDestroy(m_encoder_data, false);
     m_encoder_data = nsnull;
     needToWriteCRLFAfterEncodedBody = !m_parent;
     if (status < 0)
       goto FAIL;
   }
   
   // 
   // Ok, from here we loop and drive the the output of all children 
@@ -792,19 +792,19 @@ nsMsgSendPart::Write()
         PUSH(CRLF);
       }
 
       status = m_children[i]->Write();
       if (status < 0)
         goto FAIL;
 
       if (status == SKIP_EMPTY_PART)
-        writeSeparator = PR_FALSE;
+        writeSeparator = false;
       else
-        writeSeparator = PR_TRUE;
+        writeSeparator = true;
     }
 
     PUSH(CRLF);
     PUSH("--");
     PUSH(separator);
     PUSH("--");
     PUSH(CRLF);
   }
--- a/mailnews/compose/src/nsMsgSendReport.cpp
+++ b/mailnews/compose/src/nsMsgSendReport.cpp
@@ -95,17 +95,17 @@ NS_IMETHODIMP nsMsgProcessReport::SetMes
 {
   mMessage = aMessage;
   return NS_OK;
 }
 
 /* void Reset (); */
 NS_IMETHODIMP nsMsgProcessReport::Reset()
 {
-  mProceeded = PR_FALSE;
+  mProceeded = false;
   mError = NS_OK;
   mMessage.Truncate();
 
   return NS_OK;
 }
 
 
 NS_IMPL_ISUPPORTS1(nsMsgSendReport, nsIMsgSendReport)
@@ -135,17 +135,17 @@ NS_IMETHODIMP nsMsgSendReport::GetCurren
 }
 NS_IMETHODIMP nsMsgSendReport::SetCurrentProcess(PRInt32 aCurrentProcess)
 {
   if (aCurrentProcess < 0 || aCurrentProcess > SEND_LAST_PROCESS)
     return NS_ERROR_ILLEGAL_VALUE;
 
   mCurrentProcess = aCurrentProcess;
   if (mProcessReport[mCurrentProcess])
-    mProcessReport[mCurrentProcess]->SetProceeded(PR_TRUE);
+    mProcessReport[mCurrentProcess]->SetProceeded(true);
 
   return NS_OK;
 }
 
 /* attribute long deliveryMode; */
 NS_IMETHODIMP nsMsgSendReport::GetDeliveryMode(PRInt32 *aDeliveryMode)
 {
   NS_ENSURE_ARG_POINTER(aDeliveryMode);
@@ -163,17 +163,17 @@ NS_IMETHODIMP nsMsgSendReport::Reset()
 {
   PRUint32 i;
   for (i = 0; i <= SEND_LAST_PROCESS; i ++)
     if (mProcessReport[i])
       mProcessReport[i]->Reset();
 
   mCurrentProcess = 0;
   mDeliveryMode = 0;
-  mAlreadyDisplayReport = PR_FALSE;
+  mAlreadyDisplayReport = false;
 
   return NS_OK;
 }
 
 /* void setProceeded (in long process, in boolean proceeded); */
 NS_IMETHODIMP nsMsgSendReport::SetProceeded(PRInt32 process, bool proceeded)
 {
   if (process < process_Current || process > SEND_LAST_PROCESS)
@@ -263,17 +263,17 @@ NS_IMETHODIMP nsMsgSendReport::DisplayRe
   nsresult rv; // don't step on currError.
   nsCOMPtr<nsIStringBundleService> bundleService(do_GetService("@mozilla.org/intl/stringbundle;1", &rv));
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr<nsIStringBundle> bundle;
   rv = bundleService->CreateBundle("chrome://messenger/locale/messengercompose/composeMsgs.properties", getter_AddRefs(bundle));
   if (NS_FAILED(rv))
   {
     //TODO need to display a generic hardcoded message
-    mAlreadyDisplayReport = PR_TRUE;
+    mAlreadyDisplayReport = true;
     return NS_OK;  
   }
 
   nsString dialogTitle;
   nsString dialogMessage;
 
   if (NS_SUCCEEDED(currError))
   {
@@ -302,42 +302,42 @@ NS_IMETHODIMP nsMsgSendReport::DisplayRe
   }
 
   if (mDeliveryMode == nsIMsgCompDeliverMode::Now || mDeliveryMode == nsIMsgCompDeliverMode::SendUnsent)
   {
     // SMTP is taking care of it's own error message and will return NS_ERROR_BUT_DONT_SHOW_ALERT as error code.
     // In that case, we must not show an alert ourself.
     if (currError == NS_ERROR_BUT_DONT_SHOW_ALERT)
     {
-      mAlreadyDisplayReport = PR_TRUE;
+      mAlreadyDisplayReport = true;
       return NS_OK;
     }
 
     bundle->GetStringFromID(NS_MSG_SEND_ERROR_TITLE, getter_Copies(dialogTitle));
 
     PRInt32 preStrId = NS_ERROR_SEND_FAILED;
     bool askToGoBackToCompose = false;
     switch (mCurrentProcess)
     {
       case process_BuildMessage :
         preStrId = NS_ERROR_SEND_FAILED;
-        askToGoBackToCompose = PR_FALSE;
+        askToGoBackToCompose = false;
         break;
       case process_NNTP :
         preStrId = NS_ERROR_SEND_FAILED;
-        askToGoBackToCompose = PR_FALSE;
+        askToGoBackToCompose = false;
         break;
       case process_SMTP :
         bool nntpProceeded;
         mProcessReport[process_NNTP]->GetProceeded(&nntpProceeded);
         if (nntpProceeded)
           preStrId = NS_ERROR_SEND_FAILED_BUT_NNTP_OK;
         else
           preStrId = NS_ERROR_SEND_FAILED;
-        askToGoBackToCompose = PR_FALSE;
+        askToGoBackToCompose = false;
         break;
       case process_Copy:
         preStrId = NS_MSG_FAILED_COPY_OPERATION;
         askToGoBackToCompose = (mDeliveryMode == nsIMsgCompDeliverMode::Now);
         break;
       case process_FCC:
         preStrId = NS_MSG_FAILED_COPY_OPERATION;
         askToGoBackToCompose = (mDeliveryMode == nsIMsgCompDeliverMode::Now);
@@ -423,12 +423,12 @@ NS_IMETHODIMP nsMsgSendReport::DisplayRe
     {
       if (!dialogMessage.IsEmpty())
         dialogMessage.Append(PRUnichar('\n'));
       dialogMessage.Append(currMessage);
     }
     nsMsgDisplayMessageByString(prompt, dialogMessage.get(), dialogTitle.get());
   }
 
-  mAlreadyDisplayReport = PR_TRUE;
+  mAlreadyDisplayReport = true;
   return NS_OK;
 }
 
--- a/mailnews/compose/src/nsSmtpProtocol.cpp
+++ b/mailnews/compose/src/nsSmtpProtocol.cpp
@@ -255,19 +255,19 @@ void nsSmtpProtocol::Initialize(nsIURI *
 {
     NS_PRECONDITION(aURL, "invalid URL passed into Smtp Protocol");
     nsresult rv = NS_OK;
 
     m_flags = 0;
     m_prefAuthMethods = 0;
     m_failedAuthMethods = 0;
     m_currentAuthMethod = 0;
-    m_usernamePrompted = PR_FALSE;
+    m_usernamePrompted = false;
     m_prefSocketType = nsMsgSocketType::trySTARTTLS;
-    m_tlsInitiated = PR_FALSE;
+    m_tlsInitiated = false;
 
     m_urlErrorState = NS_ERROR_FAILURE;
 
     if (!SMTPLogModule)
         SMTPLogModule = PR_NewLogModule("SMTP");
 
     if (aURL)
         m_runningURL = do_QueryInterface(aURL);
@@ -280,38 +280,38 @@ void nsSmtpProtocol::Initialize(nsIURI *
     m_dataBuf = (char *) PR_Malloc(sizeof(char) * OUTPUT_BUFFER_SIZE);
     m_dataBufSize = OUTPUT_BUFFER_SIZE;
 
     m_nextState = SMTP_START_CONNECT;
     m_nextStateAfterResponse = SMTP_START_CONNECT;
     m_responseCode = 0;
     m_previousResponseCode = 0;
     m_continuationResponse = -1;
-    m_tlsEnabled = PR_FALSE;
+    m_tlsEnabled = false;
     m_addressCopy = nsnull;
     m_addresses = nsnull;
     m_addressesLeft = 0;
 
 #ifdef UNREADY_CODE
     m_totalAmountWritten = 0;
 #endif /* UNREADY_CODE */
 
-    m_sendDone = PR_FALSE;
+    m_sendDone = false;
 
     m_sizelimit = 0;
     m_totalMessageSize = 0;
     nsCOMPtr<nsIFile> file;
     m_runningURL->GetPostMessageFile(getter_AddRefs(file));
     if (file)
         file->GetFileSize(&m_totalMessageSize);
 
     m_originalContentLength = 0;
     m_totalAmountRead = 0;
 
-    m_lineStreamBuffer = new nsMsgLineStreamBuffer(OUTPUT_BUFFER_SIZE, PR_TRUE);
+    m_lineStreamBuffer = new nsMsgLineStreamBuffer(OUTPUT_BUFFER_SIZE, true);
     // ** may want to consider caching the server capability to save lots of
     // round trip communication between the client and server
     PRInt32 authMethod = 0;
     nsCOMPtr<nsISmtpServer> smtpServer;
     m_runningURL->GetSmtpServer(getter_AddRefs(smtpServer));
     if (smtpServer) {
         smtpServer->GetAuthMethod(&authMethod);
         smtpServer->GetSocketType(&m_prefSocketType);
@@ -835,24 +835,24 @@ PRInt32 nsSmtpProtocol::SendTLSResponse(
           if (NS_SUCCEEDED(rv) && sslControl)
               rv = sslControl->StartTLS();
       }
 
       if (NS_SUCCEEDED(rv))
       {
           m_nextState = SMTP_EXTN_LOGIN_RESPONSE;
           m_nextStateAfterResponse = SMTP_EXTN_LOGIN_RESPONSE;
-          m_tlsEnabled = PR_TRUE;
+          m_tlsEnabled = true;
           m_flags = 0; // resetting the flags
           return rv;
       }
   }
 
   ClearFlag(SMTP_EHLO_STARTTLS_ENABLED);
-  m_tlsInitiated = PR_FALSE;
+  m_tlsInitiated = false;
   m_nextState = SMTP_AUTH_PROCESS_STATE;
 
   return rv;
 }
 
 void nsSmtpProtocol::InitPrefAuthMethods(PRInt32 authMethodPrefValue)
 {
   // for m_prefAuthMethods, using the same flags as server capablities.
@@ -977,17 +977,17 @@ PRInt32 nsSmtpProtocol::ProcessAuth()
             if (m_prefSocketType == nsMsgSocketType::trySTARTTLS ||
                 m_prefSocketType == nsMsgSocketType::alwaysSTARTTLS)
             {
                 buffer = "STARTTLS";
                 buffer += CRLF;
 
                 status = SendData(url, buffer.get());
 
-                m_tlsInitiated = PR_TRUE;
+                m_tlsInitiated = true;
 
                 m_nextState = SMTP_RESPONSE;
                 m_nextStateAfterResponse = SMTP_TLS_RESPONSE;
                 SetFlag(SMTP_PAUSE_FOR_READ);
                 return status;
             }
         }
         else if (m_prefSocketType == nsMsgSocketType::alwaysSTARTTLS)
@@ -1296,17 +1296,17 @@ PRInt32 nsSmtpProtocol::AuthLoginStep1()
   nsCOMPtr<nsISmtpServer> smtpServer;
   rv = m_runningURL->GetSmtpServer(getter_AddRefs(smtpServer));
   if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
 
   rv = smtpServer->GetUsername(username);
   if (username.IsEmpty())
   {
     rv = GetUsernamePassword(username, password);
-    m_usernamePrompted = PR_TRUE;
+    m_usernamePrompted = true;
     if (username.IsEmpty() || password.IsEmpty())
       return NS_ERROR_SMTP_PASSWORD_UNDEFINED;
   }
   PR_LOG(SMTPLogModule, PR_LOG_DEBUG, ("SMTP AuthLoginStep1() for %s@%s",
       username.get(), smtpServer.get()));
 
   GetPassword(password);
   if (password.IsEmpty())
@@ -1353,17 +1353,17 @@ PRInt32 nsSmtpProtocol::AuthLoginStep1()
     base64Str = PL_Base64Encode(username.get(),
         username.Length(), nsnull);
     PR_snprintf(buffer, sizeof(buffer), "%.256s" CRLF, base64Str);
   }
   else
     return (NS_ERROR_COMMUNICATIONS_ERROR);
 
   nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);
-  status = SendData(url, buffer, PR_TRUE);
+  status = SendData(url, buffer, true);
   m_nextState = SMTP_RESPONSE;
   m_nextStateAfterResponse = SMTP_AUTH_LOGIN_RESPONSE;
   SetFlag(SMTP_PAUSE_FOR_READ);
   NS_Free(base64Str);
 
   return (status);
 }
 
@@ -1443,17 +1443,17 @@ PRInt32 nsSmtpProtocol::AuthLoginStep2()
       char *base64Str = PL_Base64Encode(password.get(), password.Length(), nsnull);
       PR_snprintf(buffer, sizeof(buffer), "%.256s" CRLF, base64Str);
       NS_Free(base64Str);
     }
     else
       return NS_ERROR_COMMUNICATIONS_ERROR;
 
     nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);
-    status = SendData(url, buffer, PR_TRUE);
+    status = SendData(url, buffer, true);
     m_nextState = SMTP_RESPONSE;
     m_nextStateAfterResponse = SMTP_AUTH_LOGIN_RESPONSE;
     SetFlag(SMTP_PAUSE_FOR_READ);
     return (status);
   }
 
   return -1;
 }
@@ -1715,17 +1715,17 @@ PRInt32 nsSmtpProtocol::SendMessageRespo
   UpdateStatus(SMTP_PROGRESS_MAILSENT);
 
   /* else */
   return SendQuit();
 }
 
 PRInt32 nsSmtpProtocol::SendQuit()
 {
-  m_sendDone = PR_TRUE;
+  m_sendDone = true;
   nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);
   SendData(url, "QUIT"CRLF); // send a quit command to close the connection with the server.
   m_nextState = SMTP_RESPONSE;
   m_nextStateAfterResponse = SMTP_DONE;
   return(0);
 }
 
 nsresult nsSmtpProtocol::LoadUrl(nsIURI * aURL, nsISupports * aConsumer )
@@ -1746,19 +1746,19 @@ nsresult nsSmtpProtocol::LoadUrl(nsIURI 
   // run the url...
   nsCAutoString hostName;
   aURL->GetHost(hostName);
   if (hostName.IsEmpty())
   {
     nsCOMPtr <nsIMsgMailNewsUrl> aMsgUrl = do_QueryInterface(aURL);
     if (aMsgUrl)
     {
-      aMsgUrl->SetUrlState(PR_TRUE, NS_OK);
+      aMsgUrl->SetUrlState(true, NS_OK);
       // set the url as a url currently being run...
-      aMsgUrl->SetUrlState(PR_FALSE /* we aren't running the url */,
+      aMsgUrl->SetUrlState(false /* we aren't running the url */,
                            NS_ERROR_SMTP_AUTH_FAILURE);
     }
     return NS_ERROR_BUT_DONT_SHOW_ALERT;
   }
 
   bool postMessage = false;
   m_runningURL->GetPostMessage(&postMessage);
 
@@ -1931,27 +1931,27 @@ nsresult nsSmtpProtocol::LoadUrl(nsIURI 
         if (inputStream == nsnull)
           SetFlag(SMTP_PAUSE_FOR_READ);
         else
           status = SendMessageResponse();
         break;
       case SMTP_DONE:
         {
           nsCOMPtr <nsIMsgMailNewsUrl> mailNewsUrl = do_QueryInterface(m_runningURL);
-          mailNewsUrl->SetUrlState(PR_FALSE, NS_OK);
+          mailNewsUrl->SetUrlState(false, NS_OK);
         }
 
         m_nextState = SMTP_FREE;
         break;
 
       case SMTP_ERROR_DONE:
         {
           nsCOMPtr <nsIMsgMailNewsUrl> mailNewsUrl = do_QueryInterface(m_runningURL);
           // propagate the right error code
-          mailNewsUrl->SetUrlState(PR_FALSE, m_urlErrorState);
+          mailNewsUrl->SetUrlState(false, m_urlErrorState);
         }
 
         m_nextState = SMTP_FREE;
         break;
 
       case SMTP_FREE:
         // smtp is a one time use connection so kill it if we get here...
         nsMsgAsyncWriteProtocol::CloseSocket();
--- a/mailnews/compose/src/nsSmtpServer.cpp
+++ b/mailnews/compose/src/nsSmtpServer.cpp
@@ -55,17 +55,17 @@ NS_INTERFACE_MAP_BEGIN(nsSmtpServer)
     NS_INTERFACE_MAP_ENTRY(nsISmtpServer)
     NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
     NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsISmtpServer)
 NS_INTERFACE_MAP_END
 
 nsSmtpServer::nsSmtpServer():
     mKey("")
 {
-    m_logonFailed = PR_FALSE;
+    m_logonFailed = false;
     getPrefs();
 }
 
 nsSmtpServer::~nsSmtpServer()
 {
 }
 
 NS_IMETHODIMP
@@ -542,17 +542,17 @@ nsSmtpServer::ForgetPassword()
       // If this fails, just continue, we'll still want to remove the password
       // from our local cache.
       loginMgr->RemoveLogin(logins[i]);
     }
   }
   NS_FREE_XPCOM_ISUPPORTS_POINTER_ARRAY(count, logins);
 
   rv = SetPassword(EmptyCString());
-  m_logonFailed = PR_TRUE;
+  m_logonFailed = true;
   return rv;
 }
 
 NS_IMETHODIMP
 nsSmtpServer::GetServerURI(nsACString &aResult)
 {
     nsCAutoString uri(NS_LITERAL_CSTRING("smtp://"));
 
--- a/mailnews/compose/src/nsSmtpService.cpp
+++ b/mailnews/compose/src/nsSmtpService.cpp
@@ -91,17 +91,17 @@ NS_MsgBuildSmtpUrl(nsIFile * aFilePath,
                    nsIMsgStatusFeedback *aStatusFeedback,
                    nsIInterfaceRequestor* aNotificationCallbacks,
                    nsIURI ** aUrl,
                    bool aRequestDSN);
 
 nsresult NS_MsgLoadSmtpUrl(nsIURI * aUrl, nsISupports * aConsumer, nsIRequest ** aRequest);
 
 nsSmtpService::nsSmtpService() :
-    mSmtpServersLoaded(PR_FALSE)
+    mSmtpServersLoaded(false)
 {
 }
 
 nsSmtpService::~nsSmtpService()
 {
     // save the SMTP servers to disk
 
 }
@@ -264,17 +264,17 @@ NS_IMETHODIMP nsSmtpService::VerifyLogon
 {
   NS_ENSURE_ARG_POINTER(aServer);
   nsCString popHost;
   nsCString popUser;
   nsCOMPtr <nsIURI> urlToRun;
 
   nsresult rv = NS_MsgBuildSmtpUrl(nsnull, aServer,
                           nsnull, nsnull, aUrlListener, nsnull,
-                          nsnull , getter_AddRefs(urlToRun), PR_FALSE);
+                          nsnull , getter_AddRefs(urlToRun), false);
   if (NS_SUCCEEDED(rv) && urlToRun)
   {
     nsCOMPtr<nsIMsgMailNewsUrl> url(do_QueryInterface(urlToRun, &rv));
     NS_ENSURE_SUCCESS(rv, rv);
     url->SetMsgWindow(aMsgWindow);
     rv = NS_MsgLoadSmtpUrl(urlToRun, nsnull, nsnull /* aRequest */);
     if (aURL)
       urlToRun.forget(aURL);
@@ -297,17 +297,17 @@ NS_IMETHODIMP nsSmtpService::GetDefaultP
         rv = NS_ERROR_NULL_POINTER;
     return rv;
 }
 
 NS_IMETHODIMP 
 nsSmtpService::AllowPort(PRInt32 port, const char *scheme, bool *_retval)
 {
     // allow smtp to run on any port
-    *_retval = PR_TRUE;
+    *_retval = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP nsSmtpService::GetProtocolFlags(PRUint32 *result)
 {
     *result = URI_NORELATIVE | ALLOWS_PROXY | URI_LOADABLE_BY_ANYONE |
       URI_NON_PERSISTABLE | URI_DOES_NOT_RETURN_DATA |
       URI_FORBIDS_COOKIE_ACCESS;
@@ -348,17 +348,17 @@ NS_IMETHODIMP nsSmtpService::NewURI(cons
 
 NS_IMETHODIMP nsSmtpService::NewChannel(nsIURI *aURI, nsIChannel **_retval)
 {
   NS_ENSURE_ARG_POINTER(aURI);
   // create an empty pipe for use with the input stream channel.
   nsCOMPtr<nsIAsyncInputStream> pipeIn;
   nsCOMPtr<nsIAsyncOutputStream> pipeOut;
   nsCOMPtr<nsIPipe> pipe = do_CreateInstance("@mozilla.org/pipe;1");
-  nsresult rv = pipe->Init(PR_FALSE, PR_FALSE, 0, 0, nsnull);
+  nsresult rv = pipe->Init(false, false, 0, 0, nsnull);
   if (NS_FAILED(rv)) 
     return rv;
   
   pipe->GetInputStream(getter_AddRefs(pipeIn));
   pipe->GetOutputStream(getter_AddRefs(pipeOut));
 
   pipeOut->Close();
 
@@ -451,17 +451,17 @@ nsSmtpService::loadSmtpServers()
 
   for (PRUint32 i = 0; i < servers.Length(); i++) {
     nsCOMPtr<nsISmtpServer> server;
     GetServerByKey(servers[i].get(), getter_AddRefs(server));
   }
 
   saveKeyList();
 
-  mSmtpServersLoaded = PR_TRUE;
+  mSmtpServersLoaded = true;
   return NS_OK;
 }
 
 // save the list of keys
 nsresult
 nsSmtpService::saveKeyList()
 {
     nsresult rv;
@@ -590,25 +590,25 @@ nsSmtpService::SetDefaultServer(nsISmtpS
 bool
 nsSmtpService::findServerByKey(nsISmtpServer *aServer, void *aData)
 {
   findServerByKeyEntry *entry = (findServerByKeyEntry*) aData;
 
   nsCString key;
   nsresult rv = aServer->GetKey(getter_Copies(key));
   if (NS_FAILED(rv))
-    return PR_TRUE;
+    return true;
 
   if (key.Equals(entry->key)) 
   {
     entry->server = aServer;
-    return PR_FALSE;
+    return false;
   }
     
-  return PR_TRUE;
+  return true;
 }
 
 NS_IMETHODIMP
 nsSmtpService::CreateSmtpServer(nsISmtpServer **aResult)
 {
     if (!aResult) return NS_ERROR_NULL_POINTER;
 
     loadSmtpServers();
@@ -621,34 +621,34 @@ nsSmtpService::CreateSmtpServer(nsISmtpS
 
     do {
         key = "smtp";
         key.AppendInt(++i);
         entry.key = key.get();
         entry.server = nsnull;
 
         mSmtpServers.EnumerateForwards(findServerByKey, (void *)&entry);
-        if (!entry.server) unique=PR_TRUE;
+        if (!entry.server) unique=true;
 
     } while (!unique);
 
     rv = createKeyedServer(key.get(), aResult);
     NS_ENSURE_SUCCESS(rv, rv);
     return saveKeyList();
 }
 
 
 nsresult
 nsSmtpService::GetServerByKey(const char* aKey, nsISmtpServer **aResult)
 {
     NS_ENSURE_ARG_POINTER(aResult);
 
     if (!aKey || !*aKey)
     {
-      NS_ASSERTION(PR_FALSE, "bad key");
+      NS_ASSERTION(false, "bad key");
       return NS_ERROR_FAILURE;
     }
     findServerByKeyEntry entry;
     entry.key = aKey;
     entry.server = nsnull;
     mSmtpServers.EnumerateForwards(findServerByKey, (void *)&entry);
 
     if (entry.server) {
@@ -707,35 +707,35 @@ nsSmtpService::DeleteSmtpServer(nsISmtpS
 bool
 nsSmtpService::findServerByHostname(nsISmtpServer *aServer, void *aData)
 {
   findServerByHostnameEntry *entry = (findServerByHostnameEntry*)aData;
 
   nsCString hostname;
   nsresult rv = aServer->GetHostname(hostname);
   if (NS_FAILED(rv))
-    return PR_TRUE;
+    return true;
 
   nsCString username;
   rv = aServer->GetUsername(username);
   if (NS_FAILED(rv))
-    return PR_TRUE;
+    return true;
 
   bool checkHostname = !entry->hostname.IsEmpty();
   bool checkUsername = !entry->username.IsEmpty();
     
   if ((!checkHostname ||
        (entry->hostname.Equals(hostname, nsCaseInsensitiveCStringComparator())) &&
        (!checkUsername ||
         entry->username.Equals(username, nsCaseInsensitiveCStringComparator()))))
   {
     entry->server = aServer;
-    return PR_FALSE;        // stop when found
+    return false;        // stop when found
   }
-  return PR_TRUE;
+  return true;
 }
 
 NS_IMETHODIMP
 nsSmtpService::FindServer(const char *aUsername,
                           const char *aHostname, nsISmtpServer ** aResult)
 {
     NS_ENSURE_ARG_POINTER(aResult);
 
--- a/mailnews/compose/src/nsSmtpUrl.cpp
+++ b/mailnews/compose/src/nsSmtpUrl.cpp
@@ -226,157 +226,157 @@ nsresult nsMailtoUrl::ParseMailtoUrl(cha
 
   // Now unescape everything, and mime-decode the things that can be encoded.
   if (!escapedToPart.IsEmpty())
   {
     MsgUnescapeString(escapedToPart, 0, m_toPart);
     if (mimeConverter)
     {
       if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeaderToCharPtr(
-                           m_toPart.get(), "UTF-8", PR_FALSE, PR_TRUE,
+                           m_toPart.get(), "UTF-8", false, true,
                            &decodedString)) && decodedString)
         m_toPart.Adopt(decodedString);
     }
   }
   if (!escapedCcPart.IsEmpty())
   {
     MsgUnescapeString(escapedCcPart, 0, m_ccPart);
     if (mimeConverter)
     {
       if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeaderToCharPtr(
-                           m_ccPart.get(), "UTF-8", PR_FALSE, PR_TRUE,
+                           m_ccPart.get(), "UTF-8", false, true,
                            &decodedString)) && decodedString)
         m_ccPart.Adopt(decodedString);
     }
   }
   if (!escapedBccPart.IsEmpty())
   {
     MsgUnescapeString(escapedBccPart, 0, m_bccPart);
     if (mimeConverter)
     {
       if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeaderToCharPtr(
-                           m_bccPart.get(),"UTF-8", PR_FALSE, PR_TRUE,
+                           m_bccPart.get(),"UTF-8", false, true,
                            &decodedString)) && decodedString)
         m_bccPart.Adopt(decodedString);
     }
   }
   if (!escapedSubjectPart.IsEmpty())
   {
     MsgUnescapeString(escapedSubjectPart, 0, m_subjectPart);
     if (mimeConverter)
     {
       if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeaderToCharPtr(
-                           m_subjectPart.get(),"UTF-8", PR_FALSE, PR_TRUE,
+                           m_subjectPart.get(),"UTF-8", false, true,
                            &decodedString)) && decodedString)
         m_subjectPart.Adopt(decodedString);
     }
   }
   if (!escapedNewsgroupPart.IsEmpty())
   {
     MsgUnescapeString(escapedNewsgroupPart, 0, m_newsgroupPart);
     if (mimeConverter)
     {
       if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeaderToCharPtr(
-                         m_newsgroupPart.get(), "UTF-8", PR_FALSE, PR_TRUE,
+                         m_newsgroupPart.get(), "UTF-8", false, true,
                          &decodedString)) && decodedString)
         m_newsgroupPart.Adopt(decodedString);
     }
   }
   if (!escapedReferencePart.IsEmpty())
   {
     MsgUnescapeString(escapedReferencePart, 0, m_referencePart);
     // Mime encoding allowed, but only useless such (only ascii allowed).
     if (mimeConverter)
     {
       if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeaderToCharPtr(
-                         m_referencePart.get(), "UTF-8", PR_FALSE, PR_TRUE,
+                         m_referencePart.get(), "UTF-8", false, true,
                          &decodedString)) && decodedString)
         m_referencePart.Adopt(decodedString);
     }
   }
   if (!escapedBodyPart.IsEmpty())
     MsgUnescapeString(escapedBodyPart, 0, m_bodyPart);
   if (!escapedHtmlPart.IsEmpty())
     MsgUnescapeString(escapedHtmlPart, 0, m_htmlPart);
   if (!escapedNewsHostPart.IsEmpty())
   {
     MsgUnescapeString(escapedNewsHostPart, 0, m_newsHostPart);
     if (mimeConverter)
     {
       if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeaderToCharPtr(
-                         m_newsHostPart.get(), "UTF-8", PR_FALSE, PR_TRUE,
+                         m_newsHostPart.get(), "UTF-8", false, true,
                          &decodedString)) && decodedString)
         m_newsHostPart.Adopt(decodedString);
     }
   }
   if (!escapedFollowUpToPart.IsEmpty())
   {
     MsgUnescapeString(escapedFollowUpToPart, 0, m_followUpToPart);
     if (mimeConverter)
     {
       if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeaderToCharPtr(
-                         m_followUpToPart.get(), "UTF-8", PR_FALSE, PR_TRUE,
+                         m_followUpToPart.get(), "UTF-8", false, true,
                          &decodedString)) && decodedString)
         m_followUpToPart.Adopt(decodedString);
     }
   }
   if (!escapedFromPart.IsEmpty())
   {
     MsgUnescapeString(escapedFromPart, 0, m_fromPart);
     if (mimeConverter)
     {
       if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeaderToCharPtr(
-                         m_fromPart.get(), "UTF-8", PR_FALSE, PR_TRUE,
+                         m_fromPart.get(), "UTF-8", false, true,
                          &decodedString)) && decodedString)
         m_fromPart.Adopt(decodedString);
     }
   }
   if (!escapedOrganizationPart.IsEmpty())
   {
     MsgUnescapeString(escapedOrganizationPart, 0, m_organizationPart);
     if (mimeConverter)
     {
       if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeaderToCharPtr(
-                         m_organizationPart.get(), "UTF-8", PR_FALSE, PR_TRUE,
+                         m_organizationPart.get(), "UTF-8", false, true,
                          &decodedString)) && decodedString)
         m_organizationPart.Adopt(decodedString);
     }
   }
   if (!escapedReplyToPart.IsEmpty())
   {
     MsgUnescapeString(escapedReplyToPart, 0, m_replyToPart);
     if (mimeConverter)
     {
       if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeaderToCharPtr(
-                         m_replyToPart.get(), "UTF-8", PR_FALSE, PR_TRUE,
+                         m_replyToPart.get(), "UTF-8", false, true,
                          &decodedString)) && decodedString)
         m_replyToPart.Adopt(decodedString);
     }
   }
   if (!escapedPriorityPart.IsEmpty())
   {
     MsgUnescapeString(escapedPriorityPart, 0, m_priorityPart);
     if (mimeConverter)
     {
       if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeaderToCharPtr(
-                         m_priorityPart.get(), "UTF-8", PR_FALSE, PR_TRUE,
+                         m_priorityPart.get(), "UTF-8", false, true,
                          &decodedString)) && decodedString)
         m_priorityPart.Adopt(decodedString);
     }
   }
 
   nsCString inReplyToPart; // Not a member like the others...
   if (!escapedInReplyToPart.IsEmpty())
   {
     MsgUnescapeString(escapedInReplyToPart, 0, inReplyToPart);
     // Mime encoding allowed, but only useless such (non ascii not allowed).
     if (mimeConverter)
     {
       if (NS_SUCCEEDED(mimeConverter->DecodeMimeHeaderToCharPtr(
-                         inReplyToPart.get(), "UTF-8", PR_FALSE, PR_TRUE,
+                         inReplyToPart.get(), "UTF-8", false, true,
                          &decodedString)) && decodedString)
         inReplyToPart.Adopt(decodedString);
     }
   }
 
   if (!inReplyToPart.IsEmpty())
   {
     // Ensure that References and In-Reply-To are consistent... The last
@@ -732,19 +732,19 @@ nsMailtoUrl::GetHasRef(bool *result)
 /////////////////////////////////////////////////////////////////////////////////////
 // smtp url definition
 /////////////////////////////////////////////////////////////////////////////////////
 
 nsSmtpUrl::nsSmtpUrl() : nsMsgMailNewsUrl()
 {
   // nsISmtpUrl specific state...
 
-  m_isPostMessage = PR_TRUE;
-  m_requestDSN = PR_FALSE;
-  m_verifyLogon = PR_FALSE;
+  m_isPostMessage = true;
+  m_requestDSN = false;
+  m_verifyLogon = false;
 }
  
 nsSmtpUrl::~nsSmtpUrl()
 {
 }
   
 NS_IMPL_ISUPPORTS_INHERITED1(nsSmtpUrl, nsMsgMailNewsUrl, nsISmtpUrl)  
 
--- a/mailnews/compose/src/nsURLFetcher.cpp
+++ b/mailnews/compose/src/nsURLFetcher.cpp
@@ -76,27 +76,27 @@ NS_IMPL_ISUPPORTS7(nsURLFetcher,
  * Inherited methods for nsMimeConverter
  */
 nsURLFetcher::nsURLFetcher()
 {
   // Init member variables...
   mTotalWritten = 0;
   mBuffer = nsnull;
   mBufferSize = 0;
-  mStillRunning = PR_TRUE;
+  mStillRunning = true;
   mCallback = nsnull;
-  mOnStopRequestProcessed = PR_FALSE;
-  mIsFile=PR_FALSE;
+  mOnStopRequestProcessed = false;
+  mIsFile=false;
   nsURLFetcherStreamConsumer *consumer = new nsURLFetcherStreamConsumer(this);
   mConverter = do_QueryInterface(consumer);
 }
 
 nsURLFetcher::~nsURLFetcher()
 {
-  mStillRunning = PR_FALSE;
+  mStillRunning = false;
   
   PR_FREEIF(mBuffer);
   // Remove the DocShell as a listener of the old WebProgress...
   if (mLoadCookie) 
   {
     nsCOMPtr<nsIWebProgress> webProgress(do_QueryInterface(mLoadCookie));
 
     if (webProgress)
@@ -118,46 +118,46 @@ nsURLFetcher::OnStartURIOpen(nsIURI* aUR
 }
 
 NS_IMETHODIMP 
 nsURLFetcher::IsPreferred(const char * aContentType,
                                 char ** aDesiredContentType,
                                 bool * aCanHandleContent)
 
 {
-  return CanHandleContent(aContentType, PR_TRUE, aDesiredContentType,
+  return CanHandleContent(aContentType, true, aDesiredContentType,
                           aCanHandleContent);
 }
 
 NS_IMETHODIMP 
 nsURLFetcher::CanHandleContent(const char * aContentType,
                                 bool aIsContentPreferred,
                                 char ** aDesiredContentType,
                                 bool * aCanHandleContent)
 
 {
     if (!mIsFile && PL_strcasecmp(aContentType, MESSAGE_RFC822) == 0)
       *aDesiredContentType = strdup("text/html");
 
     // since we explicilty loaded the url, we always want to handle it!
-    *aCanHandleContent = PR_TRUE;
+    *aCanHandleContent = true;
   return NS_OK;
 } 
 
 NS_IMETHODIMP 
 nsURLFetcher::DoContent(const char * aContentType,
                       bool aIsContentPreferred,
                       nsIRequest *request,
                       nsIStreamListener ** aContentHandler,
                       bool * aAbortProcess)
 {
   nsresult rv = NS_OK;
 
   if (aAbortProcess)
-    *aAbortProcess = PR_FALSE;
+    *aAbortProcess = false;
   QueryInterface(NS_GET_IID(nsIStreamListener), (void **) aContentHandler);
 
   /*
     Check the content-type to see if we need to insert a converter
   */
   if (PL_strcasecmp(aContentType, UNKNOWN_CONTENT_TYPE) == 0 ||
       PL_strcasecmp(aContentType, MULTIPART_MIXED_REPLACE) == 0 ||
       PL_strcasecmp(aContentType, MULTIPART_MIXED) == 0 ||
@@ -278,30 +278,30 @@ nsURLFetcher::OnStopRequest(nsIRequest *
   nsresult rv = NS_OK;
 
   // it's possible we could get in here from the channel calling us with an OnStopRequest and from our
   // onStatusChange method (in the case of an error). So we should protect against this to make sure we
   // don't process the on stop request twice...
 
   if (mOnStopRequestProcessed)
     return NS_OK;
-  mOnStopRequestProcessed = PR_TRUE;
+  mOnStopRequestProcessed = true;
   
   /* first, call our converter or consumer */
   if (mConverter)
     rv = mConverter->OnStopRequest(request, ctxt, aStatus);
 
   nsMsgAttachmentHandler *attachmentHdl = (nsMsgAttachmentHandler *)mTagData;
   if (attachmentHdl)
     attachmentHdl->mRequest = nsnull;
 
   //
   // Now complete the stream!
   //
-  mStillRunning = PR_FALSE;
+  mStillRunning = false;
 
   // time to close the output stream...
   if (mOutStream)
   {
     mOutStream->Close();
     mOutStream = nsnull;
   
     /* In case of multipart/x-mixed-replace, we need to truncate the file to the current part size */
@@ -345,26 +345,26 @@ nsURLFetcher::FireURLRequest(nsIURI *aUR
 
   rv = Initialize(localFile, outputStream, cb, tagData);
   NS_ENSURE_SUCCESS(rv, rv);
 
   //check to see if aURL is a local file or not
   aURL->SchemeIs("file", &mIsFile);
   
   // we're about to fire a new url request so make sure the on stop request flag is cleared...
-  mOnStopRequestProcessed = PR_FALSE;
+  mOnStopRequestProcessed = false;
 
   // let's try uri dispatching...
   nsCOMPtr<nsIURILoader> pURILoader (do_GetService(NS_URI_LOADER_CONTRACTID));
   NS_ENSURE_TRUE(pURILoader, NS_ERROR_FAILURE);
 
   nsCOMPtr<nsIChannel> channel;
   NS_ENSURE_SUCCESS(NS_NewChannel(getter_AddRefs(channel), aURL, nsnull, nsnull, this), NS_ERROR_FAILURE);
  
-  return pURILoader->OpenURI(channel, PR_FALSE, this);
+  return pURILoader->OpenURI(channel, false, this);
 }
 
 nsresult
 nsURLFetcher::InsertConverter(const char * aContentType)
 {
   nsresult rv;
 
   nsCOMPtr<nsIStreamConverterService> convServ(do_GetService("@mozilla.org/streamConverters;1", &rv));
--- a/mailnews/db/msgdb/src/nsDBFolderInfo.cpp
+++ b/mailnews/db/msgdb/src/nsDBFolderInfo.cpp
@@ -186,18 +186,18 @@ nsDBFolderInfo::nsDBFolderInfo(nsMsgData
 
   m_numUnreadMessages = 0;
   m_numMessages = 0;
   // IMAP only
   m_ImapUidValidity = kUidUnknown;
   m_totalPendingMessages =0;
   m_unreadPendingMessages = 0;
 
-  m_mdbTokensInitialized = PR_FALSE;
-  m_charSetOverride = PR_FALSE;
+  m_mdbTokensInitialized = false;
+  m_charSetOverride = false;
 
   if (!gFolderCharsetObserver)
   {
     nsresult rv;
     nsCOMPtr<nsIPrefService> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
     nsCOMPtr<nsIPrefBranch> prefBranch;
     if (NS_SUCCEEDED(rv))
     {
@@ -227,25 +227,25 @@ nsDBFolderInfo::nsDBFolderInfo(nsMsgData
       NS_ASSERTION(gFolderCharsetObserver, "failed to create observer");
 
       // register prefs callbacks
       if (gFolderCharsetObserver)
       {
         NS_ADDREF(gFolderCharsetObserver);
         nsCOMPtr<nsIPrefBranch2> pbi = do_QueryInterface(prefBranch);
         if (pbi) {
-          rv = pbi->AddObserver(kMAILNEWS_VIEW_DEFAULT_CHARSET, gFolderCharsetObserver, PR_FALSE);
-          rv = pbi->AddObserver(kMAILNEWS_DEFAULT_CHARSET_OVERRIDE, gFolderCharsetObserver, PR_FALSE);
+          rv = pbi->AddObserver(kMAILNEWS_VIEW_DEFAULT_CHARSET, gFolderCharsetObserver, false);
+          rv = pbi->AddObserver(kMAILNEWS_DEFAULT_CHARSET_OVERRIDE, gFolderCharsetObserver, false);
         }
 
         // also register for shutdown
         nsCOMPtr<nsIObserverService> observerService = do_GetService("@mozilla.org/observer-service;1", &rv);
         if (NS_SUCCEEDED(rv))
         {
-          rv = observerService->AddObserver(gFolderCharsetObserver, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_FALSE);
+          rv = observerService->AddObserver(gFolderCharsetObserver, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false);
         }
       }
     }
   }
 
   m_mdb = mdb;
   if (mdb)
   {
@@ -296,17 +296,17 @@ void nsDBFolderInfo::ReleaseExternalRefe
 nsresult nsDBFolderInfo::AddToNewMDB()
 {
   nsresult ret = NS_OK;
   if (m_mdb && m_mdb->GetStore())
   {
     nsIMdbStore *store = m_mdb->GetStore();
     // create the unique table for the dbFolderInfo.
     mdb_err err = store->NewTable(m_mdb->GetEnv(), m_rowScopeToken,
-      m_tableKindToken, PR_TRUE, nsnull, &m_mdbTable);
+      m_tableKindToken, true, nsnull, &m_mdbTable);
 
     // make sure the oid of the table is 1.
     struct mdbOid folderInfoTableOID;
     folderInfoTableOID.mOid_Id = 1;
     folderInfoTableOID.mOid_Scope = m_rowScopeToken;
 
     // create the singleton row for the dbFolderInfo.
     err  = store->NewRowWithOid(m_mdb->GetEnv(),
@@ -382,17 +382,17 @@ nsresult nsDBFolderInfo::InitMDBInfo()
     store->StringToToken(env,  kHighWaterMessageKeyColumnName, &m_highWaterMessageKeyColumnToken);
     store->StringToToken(env,  kMailboxNameColumnName, &m_mailboxNameColumnToken);
 
     store->StringToToken(env,  kImapUidValidityColumnName, &m_imapUidValidityColumnToken);
     store->StringToToken(env,  kTotalPendingMessagesColumnName, &m_totalPendingMessagesColumnToken);
     store->StringToToken(env,  kUnreadPendingMessagesColumnName, &m_unreadPendingMessagesColumnToken);
     store->StringToToken(env,  kExpiredMarkColumnName, &m_expiredMarkColumnToken);
     store->StringToToken(env,  kVersionColumnName, &m_versionColumnToken);
-    m_mdbTokensInitialized  = PR_TRUE;
+    m_mdbTokensInitialized  = true;
   }
 
   return ret;
 }
 
 nsresult nsDBFolderInfo::LoadMemberVariables()
 {
   // it's really not an error for these properties to not exist...
@@ -440,22 +440,22 @@ nsresult nsDBFolderInfo::AdjustHighWater
     SetUint32PropertyWithToken(m_highWaterMessageKeyColumnToken, highWater);
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsDBFolderInfo::SetHighWater(nsMsgKey highWater)
 {
-  return AdjustHighWater(highWater, PR_TRUE);
+  return AdjustHighWater(highWater, true);
 }
 
 NS_IMETHODIMP nsDBFolderInfo::OnKeyAdded(nsMsgKey aNewKey)
 {
-  return AdjustHighWater(aNewKey, PR_FALSE);
+  return AdjustHighWater(aNewKey, false);
 }
 
 NS_IMETHODIMP
 nsDBFolderInfo::GetFolderSize(PRUint64 *size)
 {
   NS_ENSURE_ARG_POINTER(size);
   *size = m_folderSize;
   return NS_OK;
@@ -547,31 +547,31 @@ NS_IMETHODIMP nsDBFolderInfo::GetMailbox
 
 NS_IMETHODIMP nsDBFolderInfo::ChangeNumUnreadMessages(PRInt32 delta)
 {
   m_numUnreadMessages += delta;
   // m_numUnreadMessages can never be set to negative.
   if (m_numUnreadMessages < 0)
   {
 #ifdef DEBUG_bienvenu1
-     NS_ASSERTION(PR_FALSE, "Hardcoded assertion");
+     NS_ASSERTION(false, "Hardcoded assertion");
 #endif
       m_numUnreadMessages = 0;
   }
   return SetUint32PropertyWithToken(m_numUnreadMessagesColumnToken, m_numUnreadMessages);
 }
 
 NS_IMETHODIMP nsDBFolderInfo::ChangeNumMessages(PRInt32 delta)
 {
   m_numMessages += delta;
   // m_numMessages can never be set to negative.
   if (m_numMessages < 0)
   {
 #ifdef DEBUG_bienvenu
-    NS_ASSERTION(PR_FALSE, "num messages can't be < 0");
+    NS_ASSERTION(false, "num messages can't be < 0");
 #endif
     m_numMessages = 0;
   }
   return SetUint32PropertyWithToken(m_numMessagesColumnToken, m_numMessages);
 }
 
 
 NS_IMETHODIMP nsDBFolderInfo::GetNumUnreadMessages(PRInt32 *result)
--- a/mailnews/db/msgdb/src/nsImapMailDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsImapMailDatabase.cpp
@@ -59,17 +59,17 @@ NS_IMETHODIMP	nsImapMailDatabase::GetSum
   NS_ENSURE_ARG_POINTER(aResult);
   if (m_dbFolderInfo)
   {
     PRUint32 version;
     m_dbFolderInfo->GetVersion(&version);
     *aResult = (GetCurVersion() == version);
   }
   else
-      *aResult = PR_FALSE;
+      *aResult = false;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP	nsImapMailDatabase::SetSummaryValid(bool valid)
 {
   if (m_dbFolderInfo)
   {
--- a/mailnews/db/msgdb/src/nsMailDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsMailDatabase.cpp
@@ -50,26 +50,26 @@
 
 extern PRLogModuleInfo *IMAPOffline;
 
 // scope for all offine ops table
 const char *kOfflineOpsScope = "ns:msg:db:row:scope:ops:all";
 const char *kOfflineOpsTableKind = "ns:msg:db:table:kind:ops";
 struct mdbOid gAllOfflineOpsTableOID;
 
-nsMailDatabase::nsMailDatabase() : m_reparse(PR_FALSE)
+nsMailDatabase::nsMailDatabase() : m_reparse(false)
 {
   m_mdbAllOfflineOpsTable = nsnull;
 }
 
 nsMailDatabase::~nsMailDatabase()
 {
 }
 
-// caller passes in upgrading==PR_TRUE if they want back a db even if the db is out of date.
+// caller passes in upgrading==true if they want back a db even if the db is out of date.
 // If so, they'll extract out the interesting info from the db, close it, delete it, and
 // then try to open the db again, prior to reparsing.
 nsresult nsMailDatabase::Open(nsILocalFile *aSummaryFile, bool aCreate,
                               bool aUpgrading)
 {
 #ifdef DEBUG
   nsString leafName;
   aSummaryFile->GetLeafName(leafName);
@@ -99,46 +99,46 @@ nsresult nsMailDatabase::GetAllOfflineOp
 
 NS_IMETHODIMP nsMailDatabase::StartBatch()
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMailDatabase::EndBatch()
 {
-  SetSummaryValid(PR_TRUE);
+  SetSummaryValid(true);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMailDatabase::DeleteMessages(PRUint32 aNumKeys, nsMsgKey* nsMsgKeys, nsIDBChangeListener *instigator)
 {
   nsresult rv;
   if (m_folder)
   {
     bool isLocked;
     m_folder->GetLocked(&isLocked);
     if (isLocked)
     {
-      NS_ASSERTION(PR_FALSE, "Some other operation is in progress");
+      NS_ASSERTION(false, "Some other operation is in progress");
       return NS_MSG_FOLDER_BUSY;
     }
   }
 
   rv = nsMsgDatabase::DeleteMessages(aNumKeys, nsMsgKeys, instigator);
   SetSummaryValid(true);
   return rv;
 }
 
 NS_IMETHODIMP nsMailDatabase::GetSummaryValid(bool *aResult)
 {
   PRUint32 version;
   m_dbFolderInfo->GetVersion(&version);
   if (GetCurVersion() != version)
   {
-    *aResult = PR_FALSE;
+    *aResult = false;
     return NS_OK;
   }
   nsCOMPtr<nsIMsgPluggableStore> msgStore;
   if (!m_folder)
     return NS_ERROR_NULL_POINTER;
   nsresult rv = m_folder->GetMsgStore(getter_AddRefs(msgStore));
   NS_ENSURE_SUCCESS(rv, rv);
   return msgStore->IsSummaryFileValid(m_folder, this, aResult);
@@ -230,17 +230,17 @@ NS_IMETHODIMP nsMailDatabase::GetOffline
   }
   
   return (err == 0) ? NS_OK : NS_ERROR_FAILURE;
 
 }
 
 NS_IMETHODIMP nsMailDatabase::EnumerateOfflineOps(nsISimpleEnumerator **enumerator)
 {
-  NS_ASSERTION(PR_FALSE, "not impl yet");
+  NS_ASSERTION(false, "not impl yet");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 
 NS_IMETHODIMP nsMailDatabase::ListAllOfflineOpIds(nsTArray<nsMsgKey> *offlineOpIds)
 {
   NS_ENSURE_ARG(offlineOpIds);
   nsresult rv = GetAllOfflineOpsTable();
@@ -262,17 +262,17 @@ NS_IMETHODIMP nsMailDatabase::ListAllOff
       if (outPos < 0 || outOid.mOid_Id == (mdb_id) -1)	
         break;
       if (err == NS_OK)
       {
         offlineOpIds->AppendElement(outOid.mOid_Id);
         if (PR_LOG_TEST(IMAPOffline, PR_LOG_ALWAYS))
         {
           nsCOMPtr <nsIMsgOfflineImapOperation> offlineOp;
-          GetOfflineOpForKey(outOid.mOid_Id, PR_FALSE, getter_AddRefs(offlineOp));
+          GetOfflineOpForKey(outOid.mOid_Id, false, getter_AddRefs(offlineOp));
           if (offlineOp)
           {
             nsMsgOfflineImapOperation *logOp = static_cast<nsMsgOfflineImapOperation *>(static_cast<nsIMsgOfflineImapOperation *>(offlineOp.get()));
             if (logOp)
               logOp->Log(IMAPOffline);
 
           }
         }
@@ -357,34 +357,34 @@ protected:
   nsMailDatabase*              mDB;
   nsIMdbTableRowCursor*       mRowCursor;
   nsCOMPtr <nsIMsgOfflineImapOperation> mResultOp;
   bool              mDone;
   bool						mNextPrefetched;
 };
 
 nsMsgOfflineOpEnumerator::nsMsgOfflineOpEnumerator(nsMailDatabase* db)
-    : mDB(db), mRowCursor(nsnull), mDone(PR_FALSE)
+    : mDB(db), mRowCursor(nsnull), mDone(false)
 {
   NS_ADDREF(mDB);
-  mNextPrefetched = PR_FALSE;
+  mNextPrefetched = false;
 }
 
 nsMsgOfflineOpEnumerator::~nsMsgOfflineOpEnumerator()
 {
   NS_IF_RELEASE(mRowCursor);
   NS_RELEASE(mDB);
 }
 
 NS_IMPL_ISUPPORTS1(nsMsgOfflineOpEnumerator, nsISimpleEnumerator)
 
 nsresult nsMsgOfflineOpEnumerator::GetRowCursor()
 {
   nsresult rv = 0;
-  mDone = PR_FALSE;
+  mDone = false;
 
   if (!mDB || !mDB->m_mdbAllOfflineOpsTable)
     return NS_ERROR_NULL_POINTER;
 
   rv = mDB->m_mdbAllOfflineOpsTable->GetTableRowCursor(mDB->GetEnv(), -1, &mRowCursor);
   return rv;
 }
 
@@ -396,17 +396,17 @@ NS_IMETHODIMP nsMsgOfflineOpEnumerator::
   if (!mNextPrefetched)
     rv = PrefetchNext();
   if (NS_SUCCEEDED(rv))
   {
     if (mResultOp) 
     {
       *aItem = mResultOp;
       NS_ADDREF(*aItem);
-      mNextPrefetched = PR_FALSE;
+      mNextPrefetched = false;
     }
   }
   return rv;
 }
 
 nsresult nsMsgOfflineOpEnumerator::PrefetchNext()
 {
   nsresult rv = NS_OK;
@@ -418,38 +418,38 @@ nsresult nsMsgOfflineOpEnumerator::Prefe
     rv = GetRowCursor();
     if (NS_FAILED(rv))
       return rv;
   }
 
   rv = mRowCursor->NextRow(mDB->GetEnv(), &offlineOpRow, &rowPos);
   if (!offlineOpRow) 
   {
-    mDone = PR_TRUE;
+    mDone = true;
     return NS_ERROR_FAILURE;
   }
   if (NS_FAILED(rv)) 
   {
-    mDone = PR_TRUE;
+    mDone = true;
     return rv;
   }
 	//Get key from row
   mdbOid outOid;
   nsMsgKey key=0;
   if (offlineOpRow->GetOid(mDB->GetEnv(), &outOid) == NS_OK)
     key = outOid.mOid_Id;
 
   nsIMsgOfflineImapOperation *op = new nsMsgOfflineImapOperation(mDB, offlineOpRow);
   mResultOp = op;
   if (!op)
     return NS_ERROR_OUT_OF_MEMORY;
 
   if (mResultOp) 
   {
-    mNextPrefetched = PR_TRUE;
+    mNextPrefetched = true;
     return NS_OK;
   }
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP nsMsgOfflineOpEnumerator::HasMoreElements(bool *aResult)
 {
   if (!aResult)
--- a/mailnews/db/msgdb/src/nsMsgDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsMsgDatabase.cpp
@@ -137,31 +137,31 @@ NS_IMETHODIMP nsMsgDBService::OpenFolder
     // this db could have ended up in the folder cache w/o an m_folder pointer via
     // OpenMailDBFromFile. If so, take this chance to fix the folder.
     if (!cacheDB->m_folder)
       cacheDB->m_folder = aFolder;
     *_retval = cacheDB; // FindInCache already addRefed.
     // if m_thumb is set, someone is asynchronously opening the db. But our
     // caller wants to synchronously open it, so just do it.
     if (cacheDB->m_thumb)
-      return cacheDB->Open(summaryFilePath, PR_FALSE, aLeaveInvalidDB);
+      return cacheDB->Open(summaryFilePath, false, aLeaveInvalidDB);
     return NS_OK;
   }
 
   nsCString localStoreType;
   incomingServer->GetLocalStoreType(localStoreType);
   nsCAutoString dbContractID(NS_MSGDB_CONTRACTID);
   dbContractID.Append(localStoreType.get());
   nsCOMPtr <nsIMsgDatabase> msgDB = do_CreateInstance(dbContractID.get(), &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Don't try to create the database yet--let the createNewDB call do that.
   nsMsgDatabase *msgDatabase = static_cast<nsMsgDatabase *>(msgDB.get());
   msgDatabase->m_folder = aFolder;
-  rv = msgDatabase->Open(summaryFilePath, PR_FALSE, aLeaveInvalidDB);
+  rv = msgDatabase->Open(summaryFilePath, false, aLeaveInvalidDB);
   if (NS_FAILED(rv) && rv != NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE)
     return rv;
 
   NS_ADDREF(*_retval = msgDB);
 
   if (NS_FAILED(rv))
   {
 #ifdef DEBUG
@@ -214,18 +214,18 @@ NS_IMETHODIMP nsMsgDBService::AsyncOpenF
   nsCString localStoreType;
   incomingServer->GetLocalStoreType(localStoreType);
   nsCAutoString dbContractID(NS_MSGDB_CONTRACTID);
   dbContractID.Append(localStoreType.get());
   nsCOMPtr <nsIMsgDatabase> msgDB = do_CreateInstance(dbContractID.get(), &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsMsgDatabase *msgDatabase = static_cast<nsMsgDatabase *>(msgDB.get());
-  rv = msgDatabase->OpenInternal(summaryFilePath, PR_FALSE, aLeaveInvalidDB,
-                                 PR_FALSE /* open asynchronously */);
+  rv = msgDatabase->OpenInternal(summaryFilePath, false, aLeaveInvalidDB,
+                                 false /* open asynchronously */);
 
   NS_ADDREF(*_retval = msgDB);
   msgDatabase->m_folder = aFolder;
 
   if (NS_FAILED(rv))
   {
 #ifdef DEBUG
     // Doing these checks for debug only as we don't want to report certain
@@ -251,27 +251,27 @@ NS_IMETHODIMP nsMsgDBService::OpenMore(n
                                        bool *_retval)
 {
   NS_ENSURE_ARG_POINTER(_retval);
   nsMsgDatabase *msgDatabase = static_cast<nsMsgDatabase *>(aDB);
   NS_ENSURE_TRUE(msgDatabase, NS_ERROR_INVALID_ARG);
   // Check if this db has been opened.
   if (!msgDatabase->m_thumb)
   {
-    *_retval = PR_TRUE;
+    *_retval = true;
     return NS_OK;
   }
   nsresult ret;
-  *_retval = PR_FALSE;
+  *_retval = false;
   PRIntervalTime startTime = PR_IntervalNow();
   do
   {
     mdb_count outTotal;    // total somethings to do in operation
     mdb_count outCurrent;  // subportion of total completed so far
-    mdb_bool outDone = PR_FALSE;      // is operation finished?
+    mdb_bool outDone = false;      // is operation finished?
     mdb_bool outBroken;     // is operation irreparably dead and broken?
     ret = msgDatabase->m_thumb->DoMore(msgDatabase->m_mdbEnv,
                                        &outTotal, &outCurrent, &outDone,
                                        &outBroken);
     if (NS_FAILED(ret))
       break;
     if (outDone)
     {
@@ -283,17 +283,17 @@ NS_IMETHODIMP nsMsgDBService::OpenMore(n
       nsCOMPtr<nsILocalFile> folderPath;
       nsresult rv = msgDatabase->m_folder->GetFilePath(getter_AddRefs(folderPath));
       nsCOMPtr <nsILocalFile> summaryFile;
       rv = GetSummaryFileLocation(folderPath, getter_AddRefs(summaryFile));
 
       if (NS_SUCCEEDED(ret))
         ret = (msgDatabase->m_mdbStore) ? msgDatabase->InitExistingDB() : NS_ERROR_FAILURE;
       if (NS_SUCCEEDED(ret))
-        ret = msgDatabase->CheckForErrors(ret, PR_FALSE, summaryFile);
+        ret = msgDatabase->CheckForErrors(ret, false, summaryFile);
 
       FinishDBOpen(msgDatabase->m_folder, msgDatabase);
       break;
     }
   }
   while (PR_IntervalToMilliseconds(PR_IntervalNow() - startTime) <= aTimeHint);
   *_retval = !msgDatabase->m_thumb;
   return ret;
@@ -393,17 +393,17 @@ NS_IMETHODIMP nsMsgDBService::CreateNewD
   dbContractID.Append(localStoreType.get());
   
   nsCOMPtr <nsIMsgDatabase> msgDB = do_CreateInstance(dbContractID.get(), &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsMsgDatabase *msgDatabase = static_cast<nsMsgDatabase *>(msgDB.get());
 
   msgDatabase->m_folder = aFolder;
-  rv = msgDatabase->Open(summaryFilePath, PR_TRUE, PR_TRUE);
+  rv = msgDatabase->Open(summaryFilePath, true, true);
   NS_ENSURE_TRUE(rv == NS_MSG_ERROR_FOLDER_SUMMARY_MISSING, rv);
 
   NS_ADDREF(*_retval = msgDB);
 
   HookupPendingListeners(msgDB, aFolder);
 
   return NS_OK;
 }
@@ -455,32 +455,32 @@ static bool gCorrectThreading = false;
 
 void nsMsgDatabase::GetGlobalPrefs()
 {
   if (!gGotGlobalPrefs)
   {
     GetBoolPref("mail.thread_without_re", &gThreadWithoutRe);
     GetBoolPref("mail.strict_threading", &gStrictThreading);
     GetBoolPref("mail.correct_threading", &gCorrectThreading);
-    gGotGlobalPrefs = PR_TRUE;
+    gGotGlobalPrefs = true;
   }
 }
 
 nsresult nsMsgDatabase::AddHdrToCache(nsIMsgDBHdr *hdr, nsMsgKey key) // do we want key? We could get it from hdr
 {
   if (m_bCacheHeaders)
   {
     if (!m_cachedHeaders)
       m_cachedHeaders = PL_NewDHashTable(&gMsgDBHashTableOps, (void *) nsnull, sizeof(struct MsgHdrHashElement), m_cacheSize );
     if (m_cachedHeaders)
     {
       if (key == nsMsgKey_None)
         hdr->GetMessageKey(&key);
       if (m_cachedHeaders->entryCount > m_cacheSize)
-        ClearHdrCache(PR_TRUE);
+        ClearHdrCache(true);
       PLDHashEntryHdr *entry = PL_DHashTableOperate(m_cachedHeaders, (void *) key, PL_DHASH_ADD);
       if (!entry)
         return NS_ERROR_OUT_OF_MEMORY; // XXX out of memory
 
       MsgHdrHashElement* element = reinterpret_cast<MsgHdrHashElement*>(entry);
       element->mHdr = hdr;
       element->mKey = key;
       NS_ADDREF(hdr);     // make the cache hold onto the header
@@ -527,21 +527,21 @@ NS_IMETHODIMP nsMsgDatabase::GetMsgHdrCa
 {
   NS_ENSURE_ARG_POINTER(aSize);
   *aSize = m_cacheSize;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDatabase::ClearCachedHdrs()
 {
-  ClearCachedObjects(PR_FALSE);
+  ClearCachedObjects(false);
 #ifdef DEBUG_bienvenu1
   if (mRefCnt > 1)
   {
-    NS_ASSERTION(PR_FALSE, "");
+    NS_ASSERTION(false, "");
     printf("someone's holding onto db - refs = %ld\n", mRefCnt);
   }
 #endif
   return NS_OK;
 }
 
 void nsMsgDatabase::ClearEnumerators()
 {
@@ -572,21 +572,21 @@ void nsMsgDatabase::ClearThreads()
 
   PRInt32 numThreads = copyThreads.Length();
   for (PRUint32 i = 0; i < numThreads; i++)
     copyThreads[i]->Clear();
 }
 
 void nsMsgDatabase::ClearCachedObjects(bool dbGoingAway)
 {
-  ClearHdrCache(PR_FALSE);
+  ClearHdrCache(false);
 #ifdef DEBUG_DavidBienvenu
   if (m_headersInUse && m_headersInUse->entryCount > 0)
   {
-        NS_ASSERTION(PR_FALSE, "leaking headers");
+        NS_ASSERTION(false, "leaking headers");
     printf("leaking %d headers in %s\n", m_headersInUse->entryCount, (const char *) m_dbName);
   }
 #endif
   m_cachedThread = nsnull;
   m_cachedThreadId = nsMsgKey_None;
   // We should only clear the use hdr cache when the db is going away, or we could
   // end up with multiple copies of the same logical msg hdr, which will lead to
   // ref-counting problems.
@@ -995,20 +995,20 @@ void nsMsgDatabase::DumpCache()
   }
 }
 
 nsMsgDatabase::nsMsgDatabase()
         : m_dbFolderInfo(nsnull),
         m_nextPseudoMsgKey(kFirstPseudoKey),
         m_mdbEnv(nsnull), m_mdbStore(nsnull),
         m_mdbAllMsgHeadersTable(nsnull), m_mdbAllThreadsTable(nsnull),
-        m_create(PR_FALSE),
-        m_leaveInvalidDB(PR_FALSE),
+        m_create(false),
+        m_leaveInvalidDB(false),
         m_dbName(""),
-        m_mdbTokensInitialized(PR_FALSE),
+        m_mdbTokensInitialized(false),
         m_hdrRowScopeToken(0),
         m_hdrTableKindToken(0),
         m_threadTableKindToken(0),
         m_subjectColumnToken(0),
         m_senderColumnToken(0),
         m_messageIdColumnToken(0),
         m_referencesColumnToken(0),
         m_recipientsColumnToken(0),
@@ -1031,28 +1031,28 @@ nsMsgDatabase::nsMsgDatabase()
         m_threadParentColumnToken(0),
         m_threadRootKeyColumnToken(0),
         m_threadNewestMsgDateColumnToken(0),
         m_offlineMsgOffsetColumnToken(0),
         m_offlineMessageSizeColumnToken(0),
         m_HeaderParser(nsnull),
         m_headersInUse(nsnull),
         m_cachedHeaders(nsnull),
-        m_bCacheHeaders(PR_TRUE),
+        m_bCacheHeaders(true),
         m_cachedThreadId(nsMsgKey_None),
         m_msgReferences(nsnull),
         m_cacheSize(kMaxHdrsInCache)
 {
   static int dbCount = 0;
 }
 
 nsMsgDatabase::~nsMsgDatabase()
 {
   //  Close(FALSE);  // better have already been closed.
-  ClearCachedObjects(PR_TRUE);
+  ClearCachedObjects(true);
   ClearEnumerators();
   delete m_cachedHeaders;
   delete m_headersInUse;
 
   if (m_msgReferences)
   {
     PL_DHashTableDestroy(m_msgReferences);
     m_msgReferences = nsnull;
@@ -1117,24 +1117,24 @@ void nsMsgDatabase::GetMDBFactory(nsIMdb
     nsresult rv;
     nsCOMPtr <nsIMdbFactoryService> mdbFactoryService = do_GetService(NS_MORK_CONTRACTID, &rv);
     if (NS_SUCCEEDED(rv) && mdbFactoryService)
       mdbFactoryService->GetMdbFactory(getter_AddRefs(mMdbFactory));
   }
   NS_IF_ADDREF(*aMdbFactory = mMdbFactory);
 }
 
-// aLeaveInvalidDB: PR_TRUE if caller wants back a db even out of date.
+// aLeaveInvalidDB: true if caller wants back a db even out of date.
 // If so, they'll extract out the interesting info from the db, close it,
 // delete it, and then try to open the db again, prior to reparsing.
 nsresult nsMsgDatabase::Open(nsILocalFile *aFolderName, bool aCreate,
                              bool aLeaveInvalidDB)
 {
   return nsMsgDatabase::OpenInternal(aFolderName, aCreate, aLeaveInvalidDB,
-                                     PR_TRUE /* open synchronously */);
+                                     true /* open synchronously */);
 }
 
 nsresult nsMsgDatabase::OpenInternal(nsILocalFile *summaryFile, bool aCreate,
                                      bool aLeaveInvalidDB, bool sync)
 {
   nsCAutoString summaryFilePath;
   summaryFile->GetNativePath(summaryFilePath);
 
@@ -1156,34 +1156,34 @@ nsresult nsMsgDatabase::OpenInternal(nsI
   m_create = aCreate;
   m_leaveInvalidDB = aLeaveInvalidDB;
   if (!sync && NS_SUCCEEDED(rv))
   {
     AddToCache(this);
     // remember open options for when the parsing is complete.
     return rv;
   }
-  return CheckForErrors(rv, PR_TRUE, summaryFile);
+  return CheckForErrors(rv, true, summaryFile);
 }
 
 nsresult nsMsgDatabase::CheckForErrors(nsresult err, bool sync,
                                        nsILocalFile *summaryFile)
 {
   nsCOMPtr<nsIDBFolderInfo> folderInfo;
   bool summaryFileExists;
   bool newFile = false;
   bool deleteInvalidDB = false;
 
   bool exists;
   PRInt64 fileSize;
   summaryFile->Exists(&exists);
   summaryFile->GetFileSize(&fileSize);
   // if the old summary doesn't exist, we're creating a new one.
   if ((!exists || !fileSize) && m_create)
-    newFile = PR_TRUE;
+    newFile = true;
 
   summaryFileExists = exists && fileSize > 0;
 
   if (NS_SUCCEEDED(err))
   {
     if (!m_dbFolderInfo)
     {
       err = NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE;
@@ -1199,44 +1199,44 @@ nsresult nsMsgDatabase::CheckForErrors(n
       }
       // compare current version of db versus filed out version info.
       PRUint32 version;
       m_dbFolderInfo->GetVersion(&version);
       if (GetCurVersion() != version)
         err = NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE;
     }
     if (NS_FAILED(err) && !m_leaveInvalidDB)
-      deleteInvalidDB = PR_TRUE;
+      deleteInvalidDB = true;
   }
   else
   {
     err = NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE;
-    deleteInvalidDB = PR_TRUE;
+    deleteInvalidDB = true;
   }
 
   if (deleteInvalidDB)
   {
     // this will make the db folder info release its ref to the mail db...
     NS_IF_RELEASE(m_dbFolderInfo);
     ForceClosed();
     if (err == NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE)
-      summaryFile->Remove(PR_FALSE);
+      summaryFile->Remove(false);
   }
   if (err != NS_OK || newFile)
   {
     // if we couldn't open file, or we have a blank one, and we're supposed
     // to upgrade, updgrade it.
     if (newFile && !m_leaveInvalidDB)  // caller is upgrading, and we have empty summary file,
     {          // leave db around and open so caller can upgrade it.
       err = NS_MSG_ERROR_FOLDER_SUMMARY_MISSING;
     }
     else if (err != NS_OK && err != NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE)
     {
-      Close(PR_FALSE);
-      summaryFile->Remove(PR_FALSE);  // blow away the db if it's corrupt.
+      Close(false);
+      summaryFile->Remove(false);  // blow away the db if it's corrupt.
     }
   }
   if (sync && (err == NS_OK || err == NS_MSG_ERROR_FOLDER_SUMMARY_MISSING))
     AddToCache(this);
   return (summaryFileExists) ? err : NS_MSG_ERROR_FOLDER_SUMMARY_MISSING;
 }
 
 /**
@@ -1254,17 +1254,17 @@ nsresult nsMsgDatabase::OpenMDB(const ch
     ret = mdbFactory->MakeEnv(NULL, &m_mdbEnv);
     if (NS_SUCCEEDED(ret))
     {
       struct stat st;
       nsIMdbHeap* dbHeap = 0;
       mdb_bool dbFrozen = mdbBool_kFalse; // not readonly, we want modifiable
 
       if (m_mdbEnv)
-        m_mdbEnv->SetAutoClear(PR_TRUE);
+        m_mdbEnv->SetAutoClear(true);
       m_dbName = dbName;
       if (stat(dbName, &st))
       {
         ret = NS_MSG_ERROR_FOLDER_SUMMARY_MISSING;
       }
       // If m_thumb is set, we're asynchronously opening the db already.
       else if (!m_thumb) 
       {
@@ -1295,24 +1295,24 @@ nsresult nsMsgDatabase::OpenMDB(const ch
           }
           NS_RELEASE(oldFile); // always release our file ref, store has own
         }
       }
       if (NS_SUCCEEDED(ret) && m_thumb && sync)
       {
         mdb_count outTotal;    // total somethings to do in operation
         mdb_count outCurrent;  // subportion of total completed so far
-        mdb_bool outDone = PR_FALSE;      // is operation finished?
+        mdb_bool outDone = false;      // is operation finished?
         mdb_bool outBroken;     // is operation irreparably dead and broken?
         do
         {
           ret = m_thumb->DoMore(m_mdbEnv, &outTotal, &outCurrent, &outDone, &outBroken);
           if (ret != 0)
           {// mork isn't really doing NS errors yet.
-            outDone = PR_TRUE;
+            outDone = true;
             break;
           }
         }
         while (NS_SUCCEEDED(ret) && !outBroken && !outDone);
         //        m_mdbEnv->ClearErrors(); // ### temporary...
         // only 0 is a non-error return.
         if (ret == 0 && outDone)
         {
@@ -1397,18 +1397,18 @@ NS_IMETHODIMP nsMsgDatabase::ForceClosed
   // make sure someone has a reference so object won't get deleted out from under us.
   AddRef();
   NotifyAnnouncerGoingAway();
   // make sure dbFolderInfo isn't holding onto mork stuff because mork db is going away
   if (m_dbFolderInfo)
     m_dbFolderInfo->ReleaseExternalReferences();
   NS_IF_RELEASE(m_dbFolderInfo);
 
-  err = CloseMDB(PR_TRUE);  // Backup DB will try to recover info, so commit
-  ClearCachedObjects(PR_TRUE);
+  err = CloseMDB(true);  // Backup DB will try to recover info, so commit
+  ClearCachedObjects(true);
   ClearEnumerators();
 if (m_mdbAllMsgHeadersTable)
   {
     m_mdbAllMsgHeadersTable->Release();
     m_mdbAllMsgHeadersTable = nsnull;
   }
   if (m_mdbAllThreadsTable)
   {
@@ -1477,18 +1477,18 @@ NS_IMETHODIMP nsMsgDatabase::Commit(nsMs
       err = m_mdbStore->CompressCommit(GetEnv(), &commitThumb);
       break;
     }
   }
   if (commitThumb)
   {
     mdb_count outTotal = 0;    // total somethings to do in operation
     mdb_count outCurrent = 0;  // subportion of total completed so far
-    mdb_bool outDone = PR_FALSE;      // is operation finished?
-    mdb_bool outBroken = PR_FALSE;     // is operation irreparably dead and broken?
+    mdb_bool outDone = false;      // is operation finished?
+    mdb_bool outBroken = false;     // is operation irreparably dead and broken?
     while (!outDone && !outBroken && err == NS_OK)
     {
       err = commitThumb->DoMore(GetEnv(), &outTotal, &outCurrent, &outDone, &outBroken);
     }
 
     NS_IF_RELEASE(commitThumb);
   }
   // ### do something with error, but clear it now because mork errors out on commits.
@@ -1501,30 +1501,30 @@ NS_IMETHODIMP nsMsgDatabase::Commit(nsMs
   if (NS_SUCCEEDED(rv) && accountManager)
   {
     nsCOMPtr<nsIMsgFolderCache> folderCache;
 
     rv = accountManager->GetFolderCache(getter_AddRefs(folderCache));
     if (NS_SUCCEEDED(rv) && folderCache)
     {
       nsCOMPtr <nsIMsgFolderCacheElement> cacheElement;
-      rv = folderCache->GetCacheElement(m_dbName, PR_FALSE, getter_AddRefs(cacheElement));
+      rv = folderCache->GetCacheElement(m_dbName, false, getter_AddRefs(cacheElement));
       if (NS_SUCCEEDED(rv) && cacheElement && m_dbFolderInfo)
       {
         PRInt32 totalMessages, unreadMessages, pendingMessages, pendingUnreadMessages;
 
         m_dbFolderInfo->GetNumMessages(&totalMessages);
         m_dbFolderInfo->GetNumUnreadMessages(&unreadMessages);
         m_dbFolderInfo->GetImapUnreadPendingMessages(&pendingUnreadMessages);
         m_dbFolderInfo->GetImapTotalPendingMessages(&pendingMessages);
         cacheElement->SetInt32Property("totalMsgs", totalMessages);
         cacheElement->SetInt32Property("totalUnreadMsgs", unreadMessages);
         cacheElement->SetInt32Property("pendingMsgs", pendingMessages);
         cacheElement->SetInt32Property("pendingUnreadMsgs", pendingUnreadMessages);
-        folderCache->Commit(PR_FALSE);
+        folderCache->Commit(false);
       }
     }
   }
 
   return err;
 }
 
 NS_IMETHODIMP nsMsgDatabase::Close(bool forceCommit /* = TRUE */)
@@ -1576,36 +1576,36 @@ nsresult nsMsgDatabase::InitNewDB()
   if (err == NS_OK)
   {
     nsDBFolderInfo *dbFolderInfo = new nsDBFolderInfo(this);
     if (dbFolderInfo)
     {
       NS_ADDREF(dbFolderInfo);
       err = dbFolderInfo->AddToNewMDB();
       dbFolderInfo->SetVersion(GetCurVersion());
-      dbFolderInfo->SetBooleanProperty(kFixedBadRefThreadingProp, PR_TRUE);
+      dbFolderInfo->SetBooleanProperty(kFixedBadRefThreadingProp, true);
       nsIMdbStore *store = GetStore();
       // create the unique table for the dbFolderInfo.
       mdb_err mdberr;
       struct mdbOid allMsgHdrsTableOID;
       struct mdbOid allThreadsTableOID;
       if (!store)
         return NS_ERROR_NULL_POINTER;
 
       allMsgHdrsTableOID.mOid_Scope = m_hdrRowScopeToken;
       allMsgHdrsTableOID.mOid_Id = kAllMsgHdrsTableKey;
       allThreadsTableOID.mOid_Scope = m_threadRowScopeToken;
       allThreadsTableOID.mOid_Id = kAllThreadsTableKey;
 
       mdberr  = store->NewTableWithOid(GetEnv(), &allMsgHdrsTableOID, m_hdrTableKindToken,
-        PR_FALSE, nsnull, &m_mdbAllMsgHeadersTable);
+        false, nsnull, &m_mdbAllMsgHeadersTable);
 
       // error here is not fatal.
       store->NewTableWithOid(GetEnv(), &allThreadsTableOID, m_allThreadsTableKindToken,
-        PR_FALSE, nsnull, &m_mdbAllThreadsTable);
+        false, nsnull, &m_mdbAllThreadsTable);
 
       m_dbFolderInfo = dbFolderInfo;
 
     }
     else
       err = NS_ERROR_OUT_OF_MEMORY;
   }
   return err;
@@ -1626,17 +1626,17 @@ nsresult nsMsgDatabase::GetTableCreateIf
   nsresult rv = m_mdbStore->GetTable(GetEnv(), &tableOID, table);
   if (rv != NS_OK)
     rv = NS_ERROR_FAILURE;
 
   // create new all all offline ops table, if it doesn't exist.
   if (NS_SUCCEEDED(rv) && !*table)
   {
     rv = m_mdbStore->NewTable(GetEnv(), scopeToken,kindToken,
-                                          PR_FALSE, nsnull, table);
+                                          false, nsnull, table);
     if (rv != NS_OK || !*table)
       rv = NS_ERROR_FAILURE;
   }
   NS_ASSERTION(NS_SUCCEEDED(rv), "couldn't create offline ops table");
   return rv;
 }
 
 nsresult nsMsgDatabase::InitExistingDB()
@@ -1664,37 +1664,37 @@ nsresult nsMsgDatabase::InitExistingDB()
     // create new all msg hdrs table, if it doesn't exist.
     if (NS_SUCCEEDED(err) && !m_mdbAllMsgHeadersTable)
     {
       struct mdbOid allMsgHdrsTableOID;
       allMsgHdrsTableOID.mOid_Scope = m_hdrRowScopeToken;
       allMsgHdrsTableOID.mOid_Id = kAllMsgHdrsTableKey;
 
       mdb_err mdberr  = GetStore()->NewTableWithOid(GetEnv(), &allMsgHdrsTableOID, m_hdrTableKindToken,
-        PR_FALSE, nsnull, &m_mdbAllMsgHeadersTable);
+        false, nsnull, &m_mdbAllMsgHeadersTable);
       if (mdberr != NS_OK || !m_mdbAllMsgHeadersTable)
         err = NS_ERROR_FAILURE;
     }
     struct mdbOid allThreadsTableOID;
     allThreadsTableOID.mOid_Scope = m_threadRowScopeToken;
     allThreadsTableOID.mOid_Id = kAllThreadsTableKey;
     err = GetStore()->GetTable(GetEnv(), &gAllThreadsTableOID, &m_mdbAllThreadsTable);
     if (!m_mdbAllThreadsTable)
     {
 
       mdb_err mdberr  = GetStore()->NewTableWithOid(GetEnv(), &allThreadsTableOID, m_allThreadsTableKindToken,
-        PR_FALSE, nsnull, &m_mdbAllThreadsTable);
+        false, nsnull, &m_mdbAllThreadsTable);
       if (mdberr != NS_OK || !m_mdbAllThreadsTable)
         err = NS_ERROR_FAILURE;
     }
   }
   if (NS_SUCCEEDED(err) && m_dbFolderInfo)
   {
     bool fixedBadRefThreading;
-    m_dbFolderInfo->GetBooleanProperty(kFixedBadRefThreadingProp, PR_FALSE, &fixedBadRefThreading);
+    m_dbFolderInfo->GetBooleanProperty(kFixedBadRefThreadingProp, false, &fixedBadRefThreading);
     if (!fixedBadRefThreading)
     {
       nsCOMPtr <nsISimpleEnumerator> enumerator;
       err = EnumerateMessages(getter_AddRefs(enumerator));
       if (NS_SUCCEEDED(err) && enumerator)
       {
         bool hasMore;
 
@@ -1714,31 +1714,31 @@ nsresult nsMsgDatabase::InitExistingDB()
             {
               err = NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE;
               break;
             }
           }
         }
       }
 
-      m_dbFolderInfo->SetBooleanProperty(kFixedBadRefThreadingProp, PR_TRUE);
+      m_dbFolderInfo->SetBooleanProperty(kFixedBadRefThreadingProp, true);
     }
 
   }
   return err;
 }
 
 // initialize the various tokens and tables in our db's env
 nsresult nsMsgDatabase::InitMDBInfo()
 {
   nsresult err = NS_OK;
 
   if (!m_mdbTokensInitialized && GetStore())
   {
-    m_mdbTokensInitialized = PR_TRUE;
+    m_mdbTokensInitialized = true;
     err  = GetStore()->StringToToken(GetEnv(), kMsgHdrsScope, &m_hdrRowScopeToken);
     if (err == NS_OK)
     {
       GetStore()->StringToToken(GetEnv(),  kSubjectColumnName, &m_subjectColumnToken);
       GetStore()->StringToToken(GetEnv(),  kSenderColumnName, &m_senderColumnToken);
       GetStore()->StringToToken(GetEnv(),  kMessageIdColumnName, &m_messageIdColumnToken);
       // if we just store references as a string, we won't get any savings from the
       // fact there's a lot of duplication. So we may want to break them up into
@@ -1792,17 +1792,17 @@ NS_IMETHODIMP nsMsgDatabase::ContainsKey
 {
 
   nsresult  err = NS_OK;
   mdb_bool  hasOid;
   mdbOid    rowObjectId;
 
   if (!containsKey || !m_mdbAllMsgHeadersTable)
     return NS_ERROR_NULL_POINTER;
-  *containsKey = PR_FALSE;
+  *containsKey = false;
 
   rowObjectId.mOid_Id = key;
   rowObjectId.mOid_Scope = m_hdrRowScopeToken;
   err = m_mdbAllMsgHeadersTable->HasOid(GetEnv(), &rowObjectId, &hasOid);
   if(NS_SUCCEEDED(err))
     *containsKey = hasOid;
 
   return err;
@@ -1865,17 +1865,17 @@ NS_IMETHODIMP nsMsgDatabase::EndBatch()
 NS_IMETHODIMP nsMsgDatabase::DeleteMessage(nsMsgKey key, nsIDBChangeListener *instigator, bool commit)
 {
   nsCOMPtr <nsIMsgDBHdr> msgHdr;
 
   nsresult rv = GetMsgHdrForKey(key, getter_AddRefs(msgHdr));
   if (!msgHdr)
     return NS_MSG_MESSAGE_NOT_FOUND;
 
-  rv = DeleteHeader(msgHdr, instigator, commit, PR_TRUE);
+  rv = DeleteHeader(msgHdr, instigator, commit, true);
   return rv;
 }
 
 
 NS_IMETHODIMP nsMsgDatabase::DeleteMessages(PRUint32 aNumKeys, nsMsgKey* nsMsgKeys, nsIDBChangeListener *instigator)
 {
   nsresult  err = NS_OK;
 
@@ -1891,17 +1891,17 @@ NS_IMETHODIMP nsMsgDatabase::DeleteMessa
     {
       err = GetMsgHdrForKey(key, getter_AddRefs(msgHdr));
       if (NS_FAILED(err))
       {
         err = NS_MSG_MESSAGE_NOT_FOUND;
         break;
       }
       if (msgHdr)
-        err = DeleteHeader(msgHdr, instigator, kindex % 300 == 0, PR_TRUE);
+        err = DeleteHeader(msgHdr, instigator, kindex % 300 == 0, true);
       if (err != NS_OK)
         break;
     }
   }
   Commit(nsMsgDBCommitType::kSmallCommit);
   return err;
 }
 
@@ -1916,17 +1916,17 @@ NS_IMETHODIMP nsMsgDatabase::DeleteHeade
 {
   if (!msg)
     return NS_ERROR_NULL_POINTER;
 
   nsMsgHdr* msgHdr = static_cast<nsMsgHdr*>(msg);  // closed system, so this is ok
   nsMsgKey key;
   (void)msg->GetMessageKey(&key);
   // only need to do this for mail - will this speed up news expiration?
-  SetHdrFlag(msg, PR_TRUE, nsMsgMessageFlags::Expunged);  // tell mailbox (mail)
+  SetHdrFlag(msg, true, nsMsgMessageFlags::Expunged);  // tell mailbox (mail)
 
   bool hdrWasNew = m_newSet.BinaryIndexOf(key) != -1;
   m_newSet.RemoveElement(key);
 
   if (m_dbFolderInfo != NULL)
   {
     bool isRead;
     m_dbFolderInfo->ChangeNumMessages(-1);
@@ -1967,17 +1967,17 @@ NS_IMETHODIMP nsMsgDatabase::DeleteHeade
 NS_IMETHODIMP
 nsMsgDatabase::UndoDelete(nsIMsgDBHdr *aMsgHdr)
 {
     if (aMsgHdr)
     {
         nsMsgHdr* msgHdr = static_cast<nsMsgHdr*>(aMsgHdr);  // closed system, so this is ok
         // force deleted flag, so SetHdrFlag won't bail out because  deleted flag isn't set
         msgHdr->m_flags |= nsMsgMessageFlags::Expunged;
-        SetHdrFlag(msgHdr, PR_FALSE, nsMsgMessageFlags::Expunged); // clear deleted flag in db
+        SetHdrFlag(msgHdr, false, nsMsgMessageFlags::Expunged); // clear deleted flag in db
     }
     return NS_OK;
 }
 
 nsresult nsMsgDatabase::RemoveHeaderFromThread(nsMsgHdr *msgHdr)
 {
   if (!msgHdr)
     return NS_ERROR_NULL_POINTER;
@@ -2201,17 +2201,17 @@ nsMsgDatabase::MarkThreadRead(nsIMsgThre
     {
       bool isRead = true;
       IsHeaderRead(child, &isRead);
       if (!isRead)
       {
         nsMsgKey key;
         if (NS_SUCCEEDED(child->GetMessageKey(&key)))
           thoseMarked.AppendElement(key);
-        MarkHdrRead(child, PR_TRUE, instigator);
+        MarkHdrRead(child, true, instigator);
       }
     }
   }
   *aThoseMarked =
     (nsMsgKey *) nsMemory::Clone(&thoseMarked[0],
                                  thoseMarked.Length() * sizeof(nsMsgKey));
   *aNumMarked = thoseMarked.Length();
   if (!*aThoseMarked)
@@ -2326,17 +2326,17 @@ NS_IMETHODIMP nsMsgDatabase::SetStringPr
   PRUint32 status;
   nsCOMPtr<nsIDBChangeListener> listener;
   if (notify)
   {
     nsTObserverArray<nsCOMPtr<nsIDBChangeListener> >::ForwardIterator listeners(m_ChangeListeners);
     while (listeners.HasMore())
     {
       listener = listeners.GetNext();
-      listener->OnHdrPropertyChanged(msgHdr, PR_TRUE, &status, nsnull);
+      listener->OnHdrPropertyChanged(msgHdr, true, &status, nsnull);
       // ignore errors, but append element to keep arrays in sync
       statusArray.AppendElement(status);
     }
   }
 
   rv = msgHdr->SetStringProperty(aProperty, aValue);
   NS_ENSURE_SUCCESS(rv,rv);
 
@@ -2348,17 +2348,17 @@ NS_IMETHODIMP nsMsgDatabase::SetStringPr
     if (!strcmp(aProperty, "junkscore") && !(oldValue.IsEmpty() && !strcmp(aValue, "0")))
       NotifyJunkScoreChanged(nsnull);
 
     nsTObserverArray<nsCOMPtr<nsIDBChangeListener> >::ForwardIterator listeners(m_ChangeListeners);
     for (PRUint32 i = 0; listeners.HasMore(); i++)
     {
       listener = listeners.GetNext();
       status = statusArray[i];
-      listener->OnHdrPropertyChanged(msgHdr, PR_FALSE, &status, nsnull);
+      listener->OnHdrPropertyChanged(msgHdr, false, &status, nsnull);
       // ignore errors
     }
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
@@ -2384,34 +2384,34 @@ nsMsgDatabase::SetUint32PropertyByHdr(ns
   PRUint32 status;
   nsCOMPtr<nsIDBChangeListener> listener;
   if (notify)
   {
     nsTObserverArray<nsCOMPtr<nsIDBChangeListener> >::ForwardIterator listeners(m_ChangeListeners);
     while (listeners.HasMore())
     {
       listener = listeners.GetNext();
-      listener->OnHdrPropertyChanged(aMsgHdr, PR_TRUE, &status, nsnull);
+      listener->OnHdrPropertyChanged(aMsgHdr, true, &status, nsnull);
       // Ignore errors, but append element to keep arrays in sync.
       statusArray.AppendElement(status);
     }
   }
 
   rv = aMsgHdr->SetUint32Property(aProperty, aValue);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Postcall OnHdrPropertyChanged to process the change.
   if (notify)
   {
     nsTObserverArray<nsCOMPtr<nsIDBChangeListener> >::ForwardIterator listeners(m_ChangeListeners);
     for (PRUint32 i = 0; listeners.HasMore(); i++)
     {
       listener = listeners.GetNext();
       status = statusArray[i];
-      listener->OnHdrPropertyChanged(aMsgHdr, PR_FALSE, &status, nsnull);
+      listener->OnHdrPropertyChanged(aMsgHdr, false, &status, nsnull);
       // Ignore errors.
     }
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDatabase::SetLabel(nsMsgKey key, nsMsgLabelValue label)
@@ -2425,19 +2425,19 @@ NS_IMETHODIMP nsMsgDatabase::SetLabel(ns
   nsMsgLabelValue oldLabel;
   msgHdr->GetLabel(&oldLabel);
 
   msgHdr->SetLabel(label);
   // clear old label
   if (oldLabel != label)
   {
     if (oldLabel != 0)
-      rv = SetKeyFlag(key, PR_FALSE, oldLabel << 25, nsnull);
+      rv = SetKeyFlag(key, false, oldLabel << 25, nsnull);
     // set the flag in the x-mozilla-status2 line.
-    rv = SetKeyFlag(key, PR_TRUE, label << 25, nsnull);
+    rv = SetKeyFlag(key, true, label << 25, nsnull);
   }
   return rv;
 }
 
 NS_IMETHODIMP nsMsgDatabase::MarkImapDeleted(nsMsgKey key, bool deleted,
                                              nsIDBChangeListener *instigator)
 {
   return SetKeyFlag(key, deleted, nsMsgMessageFlags::IMAPDeleted, instigator);
@@ -2521,35 +2521,35 @@ nsresult nsMsgDatabase::SetMsgHdrFlag(ns
   (void)msgHdr->GetFlags(&flags);
 
   if (oldFlags == flags)
     return NS_OK;
 
   return NotifyHdrChangeAll(msgHdr, oldFlags, flags, instigator);
 }
 
-// Helper routine - lowest level of flag setting - returns PR_TRUE if flags change,
-// PR_FALSE otherwise.
+// Helper routine - lowest level of flag setting - returns true if flags change,
+// false otherwise.
 bool nsMsgDatabase::SetHdrFlag(nsIMsgDBHdr *msgHdr, bool bSet, nsMsgMessageFlagType flag)
 {
   PRUint32 statusFlags;
   (void)msgHdr->GetFlags(&statusFlags);
   PRUint32 currentStatusFlags = GetStatusFlags(msgHdr, statusFlags);
   bool flagAlreadySet = (currentStatusFlags & flag) != 0;
 
   if ((flagAlreadySet && !bSet) || (!flagAlreadySet && bSet))
   {
     PRUint32 resultFlags;
     if (bSet)
       msgHdr->OrFlags(flag, &resultFlags);
     else
       msgHdr->AndFlags(~flag, &resultFlags);
-    return PR_TRUE;
+    return true;
   }
-  return PR_FALSE;
+  return false;
 }
 
 
 NS_IMETHODIMP nsMsgDatabase::MarkHdrRead(nsIMsgDBHdr *msgHdr, bool bRead,
                                          nsIDBChangeListener *instigator)
 {
   bool isReadInDB = true;
   nsresult rv = nsMsgDatabase::IsHeaderRead(msgHdr, &isReadInDB);
@@ -2599,17 +2599,17 @@ NS_IMETHODIMP nsMsgDatabase::MarkHdrMark
 NS_IMETHODIMP
 nsMsgDatabase::MarkHdrNotNew(nsIMsgDBHdr *aMsgHdr,
                              nsIDBChangeListener *aInstigator)
 {
   NS_ENSURE_ARG_POINTER(aMsgHdr);
   nsMsgKey msgKey;
   aMsgHdr->GetMessageKey(&msgKey);
   m_newSet.RemoveElement(msgKey);
-  return SetMsgHdrFlag(aMsgHdr, PR_FALSE, nsMsgMessageFlags::New, aInstigator);
+  return SetMsgHdrFlag(aMsgHdr, false, nsMsgMessageFlags::New, aInstigator);
 }
 
 NS_IMETHODIMP nsMsgDatabase::MarkAllRead(PRUint32 *aNumKeys, nsMsgKey **aThoseMarked)
 {
   NS_ENSURE_ARG_POINTER(aNumKeys);
   NS_ENSURE_ARG_POINTER(aThoseMarked);
   nsMsgHdr  *pHeader;
 
@@ -2630,17 +2630,17 @@ NS_IMETHODIMP nsMsgDatabase::MarkAllRead
     bool isRead;
     IsHeaderRead(pHeader, &isRead);
 
     if (!isRead)
     {
       nsMsgKey key;
       (void)pHeader->GetMessageKey(&key);
       thoseMarked.AppendElement(key);
-      rv = MarkHdrRead(pHeader, PR_TRUE, nsnull);   // ### dmb - blow off error?
+      rv = MarkHdrRead(pHeader, true, nsnull);   // ### dmb - blow off error?
     }
     NS_RELEASE(pHeader);
   }
   *aThoseMarked = (nsMsgKey *) nsMemory::Clone(&thoseMarked[0],
                                        thoseMarked.Length() * sizeof(nsMsgKey));
   if (!*aThoseMarked)
     return NS_ERROR_OUT_OF_MEMORY;
   *aNumKeys = thoseMarked.Length();
@@ -2718,23 +2718,23 @@ NS_IMETHODIMP nsMsgDatabase::GetFirstNew
 ////////////////////////////////////////////////////////////////////////////////
 
 nsMsgDBEnumerator::nsMsgDBEnumerator(nsMsgDatabase* db,
                                      nsIMdbTable *table,
                                      nsMsgDBEnumeratorFilter filter,
                                      void* closure,
                                      bool iterateForwards)
     : mDB(db),
-      mDone(PR_FALSE),
+      mDone(false),
       mIterateForwards(iterateForwards),
       mFilter(filter),
       mClosure(closure),
       mStopPos(-1)
 {
-  mNextPrefetched = PR_FALSE;
+  mNextPrefetched = false;
   mTable = table;
   mRowPos = 0;
   mDB->m_enumerators.AppendElement(this);
 }
 
 nsMsgDBEnumerator::~nsMsgDBEnumerator()
 {
   Clear();
@@ -2749,17 +2749,17 @@ void nsMsgDBEnumerator::Clear()
     mDB->m_enumerators.RemoveElement(this);
   mDB = nsnull;
 }
 
 NS_IMPL_ISUPPORTS1(nsMsgDBEnumerator, nsISimpleEnumerator)
 
 nsresult nsMsgDBEnumerator::GetRowCursor()
 {
-  mDone = PR_FALSE;
+  mDone = false;
 
   if (!mDB || !mTable)
     return NS_ERROR_NULL_POINTER;
 
   if (mIterateForwards)
   {
     mRowPos = -1;
   }
@@ -2780,17 +2780,17 @@ NS_IMETHODIMP nsMsgDBEnumerator::GetNext
   if (!mNextPrefetched)
     rv = PrefetchNext();
   if (NS_SUCCEEDED(rv))
   {
     if (mResultHdr)
     {
       *aItem = mResultHdr;
       NS_ADDREF(*aItem);
-      mNextPrefetched = PR_FALSE;
+      mNextPrefetched = false;
     }
   }
   return rv;
 }
 
 nsresult nsMsgDBEnumerator::PrefetchNext()
 {
   nsresult rv = NS_OK;
@@ -2808,22 +2808,22 @@ nsresult nsMsgDBEnumerator::PrefetchNext
   {
     mResultHdr = nsnull;
     if (mIterateForwards)
       rv = mRowCursor->NextRow(mDB->GetEnv(), &hdrRow, &mRowPos);
     else
       rv = mRowCursor->PrevRow(mDB->GetEnv(), &hdrRow, &mRowPos);
     if (!hdrRow)
     {
-      mDone = PR_TRUE;
+      mDone = true;
       return NS_ERROR_FAILURE;
     }
     if (NS_FAILED(rv))
     {
-      mDone = PR_TRUE;
+      mDone = true;
       return rv;
     }
     //Get key from row
     mdbOid outOid;
     nsMsgKey key=0;
     if (hdrRow->GetOid(mDB->GetEnv(), &outOid) == NS_OK)
       key = outOid.mOid_Id;
 
@@ -2839,31 +2839,31 @@ nsresult nsMsgDBEnumerator::PrefetchNext
       mResultHdr->GetFlags(&flags);
     else
       flags = 0;
   }
   while (mFilter && NS_FAILED(mFilter(mResultHdr, mClosure)) && !(flags & nsMsgMessageFlags::Expunged));
 
   if (mResultHdr)
   {
-    mNextPrefetched = PR_TRUE;
+    mNextPrefetched = true;
     return NS_OK;
   }
   else
-    mNextPrefetched = PR_FALSE;
+    mNextPrefetched = false;
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP nsMsgDBEnumerator::HasMoreElements(bool *aResult)
 {
   if (!aResult)
     return NS_ERROR_NULL_POINTER;
 
   if (!mNextPrefetched && (NS_FAILED(PrefetchNext())))
-    mDone = PR_TRUE;
+    mDone = true;
   *aResult = !mDone;
   return NS_OK;
 }
 
 nsMsgFilteredDBEnumerator::nsMsgFilteredDBEnumerator(nsMsgDatabase* db,
                                                      nsIMdbTable *table,
                                                      bool reverse,
                                                      nsIArray *searchTerms)
@@ -2914,17 +2914,17 @@ nsresult nsMsgFilteredDBEnumerator::Pref
         break;
       mResultHdr = nsnull;
     }
     else
       break;
   } while (mStopPos == -1 || mRowPos != mStopPos);
 
   if (!mResultHdr)
-    mNextPrefetched = PR_FALSE;
+    mNextPrefetched = false;
 
   return rv;
 }
 
 
 ////////////////////////////////////////////////////////////////////////////////
 
 NS_IMETHODIMP
@@ -2939,17 +2939,17 @@ nsMsgDatabase::EnumerateMessages(nsISimp
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgDatabase::ReverseEnumerateMessages(nsISimpleEnumerator* *result)
 {
   NS_ENSURE_ARG_POINTER(result);
   nsMsgDBEnumerator* e = new nsMsgDBEnumerator(this, m_mdbAllMsgHeadersTable,
-                                               nsnull, nsnull, PR_FALSE);
+                                               nsnull, nsnull, false);
   if (!e)
     return NS_ERROR_OUT_OF_MEMORY;
   NS_ADDREF(*result = e);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgDatabase::GetFilterEnumerator(nsIArray *searchTerms, bool aReverse,
@@ -2993,25 +2993,25 @@ nsMsgDatabase::NextMatchingHdrs(nsISimpl
   nsresult rv;
   do
   {
     nsCOMPtr <nsIMsgDBHdr> nextMessage;
     rv = enumerator->GetNext(getter_AddRefs(nextMessage));
     if (NS_SUCCEEDED(rv) && nextMessage)
     {
       if (aMatchingHdrs)
-        aMatchingHdrs->AppendElement(nextMessage, PR_FALSE);
+        aMatchingHdrs->AppendElement(nextMessage, false);
       ++numMatches;
       if (aMaxResults && numMatches == aMaxResults)
         break;
     }
     else
       break;
   }
-  while (PR_TRUE);
+  while (true);
 
   if (aNumMatches)
     *aNumMatches = numMatches;
 
   *aResult = !enumerator->mDone;
   return NS_OK;
 }
 
@@ -3112,21 +3112,21 @@ protected:
     nsIMsgThread*                 mResultThread;
     bool                        mDone;
     bool              mNextPrefetched;
     nsMsgDBThreadEnumeratorFilter     mFilter;
 };
 
 nsMsgDBThreadEnumerator::nsMsgDBThreadEnumerator(nsMsgDatabase* db,
                                      nsMsgDBThreadEnumeratorFilter filter)
-    : mDB(db), mTableCursor(nsnull), mResultThread(nsnull), mDone(PR_FALSE),
+    : mDB(db), mTableCursor(nsnull), mResultThread(nsnull), mDone(false),
       mFilter(filter)
 {
     mDB->AddListener(this);
-    mNextPrefetched = PR_FALSE;
+    mNextPrefetched = false;
 }
 
 nsMsgDBThreadEnumerator::~nsMsgDBThreadEnumerator()
 {
   mTableCursor = nsnull;
   NS_IF_RELEASE(mResultThread);
   if (mDB)
     mDB->RemoveListener(this);
@@ -3219,17 +3219,17 @@ NS_IMETHODIMP nsMsgDBThreadEnumerator::G
   if (!mNextPrefetched)
     rv = PrefetchNext();
   if (NS_SUCCEEDED(rv))
   {
     if (mResultThread)
     {
       *aItem = mResultThread;
       NS_ADDREF(mResultThread);
-      mNextPrefetched = PR_FALSE;
+      mNextPrefetched = false;
     }
   }
   return rv;
 }
 
 
 nsresult nsMsgDBThreadEnumerator::PrefetchNext()
 {
@@ -3240,29 +3240,29 @@ nsresult nsMsgDBThreadEnumerator::Prefet
     return NS_ERROR_NULL_POINTER;
 
   if (!mTableCursor)
   {
     rv = GetTableCursor();
     if (NS_FAILED(rv))
       return rv;
   }
-  while (PR_TRUE)
+  while (true)
   {
     NS_IF_RELEASE(mResultThread);
     mResultThread = nsnull;
     rv = mTableCursor->NextTable(mDB->GetEnv(), getter_AddRefs(table));
     if (!table)
     {
-      mDone = PR_TRUE;
+      mDone = true;
       return NS_ERROR_FAILURE;
     }
     if (NS_FAILED(rv))
     {
-      mDone = PR_TRUE;
+      mDone = true;
       return rv;
     }
 
     if (NS_FAILED(rv))
       return rv;
 
     mdbOid tableId;
     table->GetOid(mDB->GetEnv(), &tableId);
@@ -3282,17 +3282,17 @@ nsresult nsMsgDBThreadEnumerator::Prefet
     }
     if (mFilter && NS_FAILED(mFilter(mResultThread)))
       continue;
     else
       break;
   }
   if (mResultThread)
   {
-    mNextPrefetched = PR_TRUE;
+    mNextPrefetched = true;
     return NS_OK;
   }
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP nsMsgDBThreadEnumerator::HasMoreElements(bool *aResult)
 {
   if (!aResult)
@@ -3443,17 +3443,17 @@ NS_IMETHODIMP nsMsgDatabase::CopyHdrFrom
     nsIMdbRow  *destRow = destMsgHdr->GetMDBRow();
     err = destRow->SetRow(GetEnv(), sourceRow);
     if (NS_SUCCEEDED(err))
     {
       // we may have gotten the header from a cache - calling SetRow
       // basically invalidates any cached values, so invalidate them.
       destMsgHdr->m_initedValues = 0;
       if(addHdrToDB)
-        err = AddNewHdrToDB(destMsgHdr, PR_TRUE);
+        err = AddNewHdrToDB(destMsgHdr, true);
       if (NS_SUCCEEDED(err) && newHdr)
         *newHdr = destMsgHdr;
     }
   }
   return err;
 }
 
 nsresult nsMsgDatabase::RowCellColumnTonsString(nsIMdbRow *hdrRow, mdb_token columnToken, nsAString &resultStr)
@@ -3513,17 +3513,17 @@ nsresult nsMsgDatabase::RowCellColumnToM
       err = RowCellColumnToCharPtr(row, m_messageCharSetColumnToken, getter_Copies(charSet));
       if (NS_FAILED(err) || charSet.IsEmpty() || charSet.Equals("us-ascii") ||
           characterSetOverride)
       {
         m_dbFolderInfo->GetEffectiveCharacterSet(charSet);
       }
 
       err = m_mimeConverter->DecodeMimeHeader(nakedString, charSet.get(),
-        characterSetOverride, PR_TRUE, resultStr);
+        characterSetOverride, true, resultStr);
     }
   }
   return err;
 }
 
 nsresult nsMsgDatabase::RowCellColumnToAddressCollationKey(nsIMdbRow *row, mdb_token colToken, PRUint8 **result, PRUint32 *len)
 {
   const char *cSender = nsnull;
@@ -3552,17 +3552,17 @@ nsresult nsMsgDatabase::RowCellColumnToA
   rv = RowCellColumnToCharPtr(row, m_messageCharSetColumnToken, getter_Copies(charset));
   if (NS_FAILED(rv) || charset.IsEmpty() || charset.Equals("us-ascii") ||
       characterSetOverride)
   {
     m_dbFolderInfo->GetEffectiveCharacterSet(charset);
   }
 
   rv = converter->DecodeMimeHeaderToCharPtr(cSender, charset.get(),
-                                            characterSetOverride, PR_TRUE,
+                                            characterSetOverride, true,
                                             getter_Copies(resultStr));
   if (NS_SUCCEEDED(rv) && !resultStr.IsEmpty())
     rv = headerParser->ExtractHeaderAddressName(resultStr, name);
   else
     rv = headerParser->ExtractHeaderAddressName(nsDependentCString(cSender),
                                                      name);
 
   if (NS_SUCCEEDED(rv))
@@ -3621,17 +3621,17 @@ nsresult nsMsgDatabase::RowCellColumnToC
       err = RowCellColumnToCharPtr(row, m_messageCharSetColumnToken, getter_Copies(charSet));
       if (NS_FAILED(err) || charSet.IsEmpty() || charSet.Equals("us-ascii") ||
           characterSetOverride)
       {
         m_dbFolderInfo->GetEffectiveCharacterSet(charSet);
       }
 
       err = m_mimeConverter->DecodeMimeHeaderToCharPtr(nakedString,
-        charSet.get(), characterSetOverride, PR_TRUE,
+        charSet.get(), characterSetOverride, true,
         getter_Copies(decodedStr));
       if (NS_SUCCEEDED(err))
         err = CreateCollationKey(NS_ConvertUTF8toUTF16(decodedStr), len, result);
     }
   }
   return err;
 }
 
@@ -4035,17 +4035,17 @@ NS_IMETHODIMP nsMsgDatabase::SetSummaryV
   // for default db (and news), there's no nothing to set to make it it valid
   return NS_OK;
 }
 
 
 NS_IMETHODIMP  nsMsgDatabase::GetSummaryValid(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = PR_TRUE;
+  *aResult = true;
   return NS_OK;
 }
 
 
 // protected routines
 
 // should we thread messages with common subjects that don't start with Re: together?
 // I imagine we might have separate preferences for mail and news, so this is a virtual method.
@@ -4246,17 +4246,17 @@ nsresult nsMsgDatabase::CreateNewThread(
 
   // Under some circumstances, mork seems to reuse an old table when we create one.
   // Prevent problems from that by finding any old table first, and deleting its rows.
   mdb_err res = GetStore()->GetTable(GetEnv(), &threadTableOID, getter_AddRefs(threadTable));
   if (NS_SUCCEEDED(res) && threadTable)
     threadTable->CutAllRows(GetEnv());
 
   err  = GetStore()->NewTableWithOid(GetEnv(), &threadTableOID, m_threadTableKindToken,
-    PR_FALSE, nsnull, getter_AddRefs(threadTable));
+    false, nsnull, getter_AddRefs(threadTable));
   if (NS_FAILED(err))
     return err;
 
   allThreadsTableOID.mOid_Scope = m_threadRowScopeToken;
   allThreadsTableOID.mOid_Id = threadId;
 
   // add a row for this thread in the table of all threads that we'll use
   // to do our mapping between subject strings and threads.
@@ -4364,17 +4364,17 @@ nsIMsgThread *  nsMsgDatabase::GetThread
       nsRefPtr<nsMsgThread> pThread;
 
       nsCOMPtr <nsIMdbPortTableCursor> tableCursor;
       m_mdbStore->GetPortTableCursor(GetEnv(), m_hdrRowScopeToken, m_threadTableKindToken,
                                      getter_AddRefs(tableCursor));
 
         nsCOMPtr<nsIMdbTable> table;
 
-        while (PR_TRUE)
+        while (true)
         {
           rv = tableCursor->NextTable(GetEnv(), getter_AddRefs(table));
           if (!table)
             break;
           if (NS_FAILED(rv))
             break;
 
           pThread = new nsMsgThread(this, table);
@@ -4456,17 +4456,17 @@ nsresult nsMsgDatabase::ThreadNewHdr(nsM
           // bad references - throw them all away.
           newHdr->SetMessageId("");
           thread = nsnull;
           break;
         }
       }
       thread->GetThreadKey(&threadId);
       newHdr->SetThreadId(threadId);
-      result = AddToThread(newHdr, thread, replyToHdr, PR_TRUE);
+      result = AddToThread(newHdr, thread, replyToHdr, true);
       break;
     }
   }
   // if user hasn't said "only thread by ref headers", thread by subject
   if (!thread && !UseStrictThreading())
   {
     // try subject threading if we couldn't find a reference and the subject starts with Re:
     nsCString subject;
@@ -4477,60 +4477,60 @@ nsresult nsMsgDatabase::ThreadNewHdr(nsM
       thread = getter_AddRefs(GetThreadForSubject(cSubject));
       if(thread)
       {
         thread->GetThreadKey(&threadId);
         newHdr->SetThreadId(threadId);
         //TRACE("threading based on subject %s\n", (const char *) msgHdr->m_subject);
         // if we move this and do subject threading after, ref threading,
         // don't thread within children, since we know it won't work. But for now, pass TRUE.
-        result = AddToThread(newHdr, thread, nsnull, PR_TRUE);
+        result = AddToThread(newHdr, thread, nsnull, true);
       }
     }
   }
 
   // Check if this is a new parent to an existing message (that has a reference to this message)
   if (!thread && UseCorrectThreading())
   {
     nsCString msgId;
     newHdr->GetMessageId(getter_Copies(msgId));
 
     thread = getter_AddRefs(GetThreadForMessageId(msgId));
     if (thread)
     {
       thread->GetThreadKey(&threadId);
       newHdr->SetThreadId(threadId);
-      result = AddToThread(newHdr, thread, nsnull, PR_TRUE);
+      result = AddToThread(newHdr, thread, nsnull, true);
     }
   }
 
   if (!thread)
   {
     // Not a parent or child, make it a new thread for now
     result = AddNewThread(newHdr);
-    newThread = PR_TRUE;
+    newThread = true;
   }
   else
   {
-    newThread = PR_FALSE;
+    newThread = false;
   }
   return result;
 }
 
 nsresult nsMsgDatabase::AddToThread(nsMsgHdr *newHdr, nsIMsgThread *thread, nsIMsgDBHdr *inReplyTo, bool threadInThread)
 {
   // don't worry about real threading yet.
   nsCOMPtr <nsIDBChangeAnnouncer> announcer = do_QueryInterface(this);
 
   return thread->AddChild(newHdr, inReplyTo, threadInThread, announcer);
 }
 
 nsMsgHdr * nsMsgDatabase::GetMsgHdrForReference(nsCString &reference)
 {
-  NS_ASSERTION(PR_FALSE, "not implemented yet.");
+  NS_ASSERTION(false, "not implemented yet.");
   return nsnull;
 }
 
 NS_IMETHODIMP nsMsgDatabase::GetMsgHdrForMessageID(const char *aMsgID, nsIMsgDBHdr **aHdr)
 {
   NS_ENSURE_ARG_POINTER(aHdr);
   NS_ENSURE_ARG_POINTER(aMsgID);
   nsIMsgDBHdr  *msgHdr = nsnull;
@@ -4695,17 +4695,17 @@ nsresult nsMsgDatabase::AddNewThread(nsM
   msgHdr->SetThreadId(threadKey);
   if (threadHdr)
   {
     threadHdr->AddRef();
     // err = msgHdr->GetSubject(subject);
     // threadHdr->SetThreadKey(msgHdr->m_messageKey);
     // threadHdr->SetSubject(subject.get());
     // need to add the thread table to the db.
-    AddToThread(msgHdr, threadHdr, nsnull, PR_FALSE);
+    AddToThread(msgHdr, threadHdr, nsnull, false);
     threadHdr->Release();
   }
   return err;
 }
 
 nsresult nsMsgDatabase::GetBoolPref(const char *prefName, bool *result)
 {
   bool prefValue = false;
@@ -4782,23 +4782,23 @@ nsMsgDatabase::SetUint64AttributeOnPendi
 NS_IMETHODIMP
 nsMsgDatabase::UpdatePendingAttributes(nsIMsgDBHdr *aNewHdr)
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDatabase::GetOfflineOpForKey(nsMsgKey msgKey, bool create, nsIMsgOfflineImapOperation **offlineOp)
 {
-  NS_ASSERTION(PR_FALSE, "overridden by nsMailDatabase");
+  NS_ASSERTION(false, "overridden by nsMailDatabase");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP  nsMsgDatabase::RemoveOfflineOp(nsIMsgOfflineImapOperation *op)
 {
-  NS_ASSERTION(PR_FALSE, "overridden by nsMailDatabase");
+  NS_ASSERTION(false, "overridden by nsMailDatabase");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 
 NS_IMETHODIMP nsMsgDatabase::ListAllOfflineMsgs(nsIMsgKeyArray *aKeys)
 {
   NS_ENSURE_ARG_POINTER(aKeys);
   nsCOMPtr <nsISimpleEnumerator> enumerator;
@@ -4828,23 +4828,23 @@ NS_IMETHODIMP nsMsgDatabase::ListAllOffl
     }
   }
   aKeys->Sort();
   return rv;
 }
 
 NS_IMETHODIMP nsMsgDatabase::EnumerateOfflineOps(nsISimpleEnumerator **enumerator)
 {
-  NS_ASSERTION(PR_FALSE, "overridden by nsMailDatabase");
+  NS_ASSERTION(false, "overridden by nsMailDatabase");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsMsgDatabase::ListAllOfflineOpIds(nsTArray<nsMsgKey> *offlineOpIds)
 {
-  NS_ASSERTION(PR_FALSE, "overridden by nsMailDatabase");
+  NS_ASSERTION(false, "overridden by nsMailDatabase");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsMsgDatabase::ListAllOfflineDeletes(nsTArray<nsMsgKey> *offlineDeletes)
 {
   nsresult ret = NS_OK;
   if (!offlineDeletes)
     return NS_ERROR_NULL_POINTER;
@@ -5041,20 +5041,20 @@ NS_IMETHODIMP nsMsgDatabase::GetMsgReten
       bool cleanupBodiesByDays = false;
       bool applyToFlaggedMessages;
 
       rv = m_dbFolderInfo->GetUint32Property("retainBy", nsIMsgRetentionSettings::nsMsgRetainAll, &retainByPreference);
       m_dbFolderInfo->GetUint32Property("daysToKeepHdrs", 0, &daysToKeepHdrs);
       m_dbFolderInfo->GetUint32Property("numHdrsToKeep", 0, &numHeadersToKeep);
       m_dbFolderInfo->GetUint32Property("daysToKeepBodies", 0, &daysToKeepBodies);
       m_dbFolderInfo->GetUint32Property("keepUnreadOnly", 0, &keepUnreadMessagesProp);
-      m_dbFolderInfo->GetBooleanProperty("useServerDefaults", PR_TRUE, &useServerDefaults);
-      m_dbFolderInfo->GetBooleanProperty("cleanupBodies", PR_FALSE, &cleanupBodiesByDays);
+      m_dbFolderInfo->GetBooleanProperty("useServerDefaults", true, &useServerDefaults);
+      m_dbFolderInfo->GetBooleanProperty("cleanupBodies", false, &cleanupBodiesByDays);
       keepUnreadMessagesOnly = (keepUnreadMessagesProp == 1);
-      m_dbFolderInfo->GetBooleanProperty("applyToFlaggedMessages", PR_FALSE,
+      m_dbFolderInfo->GetBooleanProperty("applyToFlaggedMessages", false,
                                          &applyToFlaggedMessages);
       m_retentionSettings->SetRetainByPreference(retainByPreference);
       m_retentionSettings->SetDaysToKeepHdrs(daysToKeepHdrs);
       m_retentionSettings->SetNumHeadersToKeep(numHeadersToKeep);
       m_retentionSettings->SetKeepUnreadMessagesOnly(keepUnreadMessagesOnly);
       m_retentionSettings->SetDaysToKeepBodies(daysToKeepBodies);
       m_retentionSettings->SetUseServerDefaults(useServerDefaults);
       m_retentionSettings->SetCleanupBodiesByDays(cleanupBodiesByDays);
@@ -5104,19 +5104,19 @@ NS_IMETHODIMP nsMsgDatabase::GetMsgDownl
     m_downloadSettings = new nsMsgDownloadSettings;
     if (m_downloadSettings && m_dbFolderInfo)
     {
       bool useServerDefaults;
       bool downloadByDate;
       PRUint32 ageLimitOfMsgsToDownload;
       bool downloadUnreadOnly;
 
-      m_dbFolderInfo->GetBooleanProperty("useServerDefaults", PR_TRUE, &useServerDefaults);
-      m_dbFolderInfo->GetBooleanProperty("downloadByDate", PR_FALSE, &downloadByDate);
-      m_dbFolderInfo->GetBooleanProperty("downloadUnreadOnly", PR_FALSE, &downloadUnreadOnly);
+      m_dbFolderInfo->GetBooleanProperty("useServerDefaults", true, &useServerDefaults);
+      m_dbFolderInfo->GetBooleanProperty("downloadByDate", false, &downloadByDate);
+      m_dbFolderInfo->GetBooleanProperty("downloadUnreadOnly", false, &downloadUnreadOnly);
       m_dbFolderInfo->GetUint32Property("ageLimit", 0, &ageLimitOfMsgsToDownload);
 
       m_downloadSettings->SetUseServerDefaults(useServerDefaults);
       m_downloadSettings->SetDownloadByDate(downloadByDate);
       m_downloadSettings->SetDownloadUnreadOnly(downloadUnreadOnly);
       m_downloadSettings->SetAgeLimitOfMsgsToDownload(ageLimitOfMsgsToDownload);
     }
   }
@@ -5132,17 +5132,17 @@ NS_IMETHODIMP nsMsgDatabase::ApplyRetent
   nsresult rv = NS_OK;
 
   if (!m_folder)
     return NS_ERROR_NULL_POINTER;
 
   bool isDraftsTemplatesOutbox;
   PRUint32 dtoFlags = nsMsgFolderFlags::Drafts | nsMsgFolderFlags::Templates |
                         nsMsgFolderFlags::Queue;
-  (void) m_folder->IsSpecialFolder(dtoFlags, PR_TRUE, &isDraftsTemplatesOutbox);
+  (void) m_folder->IsSpecialFolder(dtoFlags, true, &isDraftsTemplatesOutbox);
   // Never apply retention settings to Drafts/Templates/Outbox.
   if (isDraftsTemplatesOutbox)
     return NS_OK;
 
   nsCOMPtr <nsIMutableArray> msgHdrsToDelete;
   if (aDeleteViaFolder)
   {
     msgHdrsToDelete = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
@@ -5161,17 +5161,17 @@ NS_IMETHODIMP nsMsgDatabase::ApplyRetent
   PRUint32 numHeadersToKeep = 0;
   switch (retainByPreference)
   {
   case nsIMsgRetentionSettings::nsMsgRetainAll:
     if (keepUnreadMessagesOnly && m_mdbAllMsgHeadersTable)
     {
       mdb_count numHdrs = 0;
       m_mdbAllMsgHeadersTable->GetCount(GetEnv(), &numHdrs);
-      rv = PurgeExcessMessages(numHdrs, PR_TRUE, applyToFlaggedMessages,
+      rv = PurgeExcessMessages(numHdrs, true, applyToFlaggedMessages,
                                msgHdrsToDelete);
     }
     break;
   case nsIMsgRetentionSettings::nsMsgRetainByAge:
     aMsgRetentionSettings->GetDaysToKeepHdrs(&daysToKeepHdrs);
     rv = PurgeMessagesOlderThan(daysToKeepHdrs, keepUnreadMessagesOnly,
                                 applyToFlaggedMessages, msgHdrsToDelete);
     break;
@@ -5191,17 +5191,17 @@ NS_IMETHODIMP nsMsgDatabase::ApplyRetent
     PR_FormatTimeUSEnglish(dateBuf, sizeof(dateBuf), "%a %b %d %H:%M:%S %Y", &exploded);
     m_folder->SetStringProperty("LastPurgeTime", nsDependentCString(dateBuf));
   }
   if (msgHdrsToDelete)
   {
     PRUint32 count;
     msgHdrsToDelete->GetLength(&count);
     if (count > 0)
-      rv = m_folder->DeleteMessages(msgHdrsToDelete, nsnull, PR_TRUE, PR_FALSE, nsnull, PR_FALSE);
+      rv = m_folder->DeleteMessages(msgHdrsToDelete, nsnull, true, false, nsnull, false);
   }
   return rv;
 }
 
 nsresult nsMsgDatabase::PurgeMessagesOlderThan(PRUint32 daysToKeepHdrs,
                                                bool keepUnreadMessagesOnly,
                                                bool applyToFlaggedMessages,
                                                nsIMutableArray *hdrsToDelete)
@@ -5244,33 +5244,33 @@ nsresult nsMsgDatabase::PurgeMessagesOld
         continue;
     }
 
     if (keepUnreadMessagesOnly)
     {
       bool isRead;
       IsHeaderRead(pHeader, &isRead);
       if (isRead)
-        purgeHdr = PR_TRUE;
+        purgeHdr = true;
 
     }
     if (!purgeHdr)
     {
       PRTime date;
       pHeader->GetDate(&date);
       if (LL_CMP(date, <, cutOffDay))
-        purgeHdr = PR_TRUE;
+        purgeHdr = true;
     }
     if (purgeHdr)
     {
       nsMsgKey msgKey;
       pHeader->GetMessageKey(&msgKey);
       keysToDelete.AppendElement(msgKey);
       if (hdrsToDelete)
-        hdrsToDelete->AppendElement(pHeader, PR_FALSE);
+        hdrsToDelete->AppendElement(pHeader, false);
     }
     NS_RELEASE(pHeader);
   }
 
   if (!hdrsToDelete)
   {
     DeleteMessages(keysToDelete.Length(), keysToDelete.Elements(), nsnull);
 
@@ -5318,31 +5318,31 @@ nsresult nsMsgDatabase::PurgeExcessMessa
         continue;
     }
 
     if (keepUnreadMessagesOnly)
     {
       bool isRead;
       IsHeaderRead(pHeader, &isRead);
       if (isRead)
-        purgeHdr = PR_TRUE;
+        purgeHdr = true;
 
     }
     // this isn't quite right - we want to prefer unread messages (keep all of those we can)
     if (numHdrs > numHeadersToKeep)
-      purgeHdr = PR_TRUE;
+      purgeHdr = true;
 
     if (purgeHdr)
     {
       nsMsgKey msgKey;
       pHeader->GetMessageKey(&msgKey);
       keysToDelete.AppendElement(msgKey);
       numHdrs--;
       if (hdrsToDelete)
-        hdrsToDelete->AppendElement(pHeader, PR_FALSE);
+        hdrsToDelete->AppendElement(pHeader, false);
     }
     NS_RELEASE(pHeader);
   }
 
   if (!hdrsToDelete)
   {
     PRInt32 numKeysToDelete = keysToDelete.Length();
     if (numKeysToDelete > 0)
@@ -5359,21 +5359,21 @@ nsresult nsMsgDatabase::PurgeExcessMessa
 
 NS_IMPL_ISUPPORTS1(nsMsgRetentionSettings, nsIMsgRetentionSettings)
 
 // Initialise the member variables to resonable defaults.
 nsMsgRetentionSettings::nsMsgRetentionSettings()
 : m_retainByPreference(1),
   m_daysToKeepHdrs(0),
   m_numHeadersToKeep(0),
-  m_keepUnreadMessagesOnly(PR_FALSE),
-  m_useServerDefaults(PR_TRUE),
-  m_cleanupBodiesByDays(PR_FALSE),
+  m_keepUnreadMessagesOnly(false),
+  m_useServerDefaults(true),
+  m_cleanupBodiesByDays(false),
   m_daysToKeepBodies(0),
-  m_applyToFlaggedMessages(PR_FALSE)
+  m_applyToFlaggedMessages(false)
 {
 }
 
 nsMsgRetentionSettings::~nsMsgRetentionSettings()
 {
 }
 
 /* attribute unsigned long retainByPreference */
@@ -5481,19 +5481,19 @@ NS_IMETHODIMP nsMsgRetentionSettings::Se
   m_applyToFlaggedMessages = aApplyToFlaggedMessages;
   return NS_OK;
 }
 
 NS_IMPL_ISUPPORTS1(nsMsgDownloadSettings, nsIMsgDownloadSettings)
 
 nsMsgDownloadSettings::nsMsgDownloadSettings()
 {
-  m_useServerDefaults = PR_FALSE;
-  m_downloadUnreadOnly = PR_FALSE;
-  m_downloadByDate = PR_FALSE;
+  m_useServerDefaults = false;
+  m_downloadUnreadOnly = false;
+  m_downloadByDate = false;
   m_ageLimitOfMsgsToDownload = 0;
 }
 
 nsMsgDownloadSettings::~nsMsgDownloadSettings()
 {
 }
 
 /* attribute boolean useServerDefaults; */
@@ -5584,17 +5584,17 @@ NS_IMETHODIMP nsMsgDatabase::GetDefaultS
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDatabase::ResetHdrCacheSize(PRUint32 aSize)
 {
   if (m_cacheSize > aSize)
   {
     m_cacheSize = aSize;
-    ClearHdrCache(PR_FALSE);
+    ClearHdrCache(false);
   }
   return NS_OK;
 }
 
 /**
   void getNewList(out unsigned long count, [array, size_is(count)] out long newKeys);
  */
 NS_IMETHODIMP
@@ -5622,40 +5622,40 @@ nsresult nsMsgDatabase::GetSearchResults
 {
   mdb_kind kindToken;
   mdb_count numTables;
   mdb_bool mustBeUnique;
   mdb_err err = m_mdbStore->StringToToken(GetEnv(), searchFolderUri, &kindToken);
   err = m_mdbStore->GetTableKind(GetEnv(), m_hdrRowScopeToken,  kindToken,
                                   &numTables, &mustBeUnique, table);
   if ((!*table || NS_FAILED(err)) && createIfMissing)
-    err = m_mdbStore->NewTable(GetEnv(), m_hdrRowScopeToken, kindToken, PR_TRUE, nsnull, table);
+    err = m_mdbStore->NewTable(GetEnv(), m_hdrRowScopeToken, kindToken, true, nsnull, table);
 
   return *table ? err : NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 nsMsgDatabase::GetCachedHits(const char *aSearchFolderUri, nsISimpleEnumerator **aEnumerator)
 {
   nsCOMPtr <nsIMdbTable> table;
-  nsresult err = GetSearchResultsTable(aSearchFolderUri, PR_FALSE, getter_AddRefs(table));
+  nsresult err = GetSearchResultsTable(aSearchFolderUri, false, getter_AddRefs(table));
   NS_ENSURE_SUCCESS(err, err);
   if (!table)
     return NS_ERROR_FAILURE;
   nsMsgDBEnumerator* e = new nsMsgDBEnumerator(this, table, nsnull, nsnull);
   if (e == nsnull)
       return NS_ERROR_OUT_OF_MEMORY;
   NS_ADDREF(*aEnumerator = e);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDatabase::RefreshCache(const char *aSearchFolderUri, PRUint32 aNumKeys, nsMsgKey *aNewHits, PRUint32 *aNumBadHits, nsMsgKey **aStaleHits)
 {
   nsCOMPtr <nsIMdbTable> table;
-  nsresult err = GetSearchResultsTable(aSearchFolderUri, PR_TRUE, getter_AddRefs(table));
+  nsresult err = GetSearchResultsTable(aSearchFolderUri, true, getter_AddRefs(table));
   NS_ENSURE_SUCCESS(err, err);
   // update the table so that it just contains aNewHits.
   // And, keep track of the headers in the original table but not in aNewHits, so we
   // can put those in aStaleHits.
   // both aNewHits and the db table are sorted by uid/key.
   // So, start at the beginning of the table and the aNewHits array.
   PRUint32 newHitIndex = 0;
   PRUint32 tableRowIndex = 0;
@@ -5730,17 +5730,17 @@ NS_IMETHODIMP nsMsgDatabase::RefreshCach
   mdbOid oid;
   tableRowIndex = 0;
   mdb_id prevId = 0;
   while (tableRowIndex < rowCount)
   {
     nsresult ret = table->PosToOid (m_mdbEnv, tableRowIndex++, &oid);
     if (tableRowIndex > 1 && oid.mOid_Id <= prevId)
     {
-      NS_ASSERTION(PR_FALSE, "inserting row into cached hits table, not sorted correctly");
+      NS_ASSERTION(false, "inserting row into cached hits table, not sorted correctly");
       printf("key %lx is before or equal %lx\n", prevId, oid.mOid_Id);
     }
     prevId = oid.mOid_Id;
   }
 
 #endif
   Commit(nsMsgDBCommitType::kLargeCommit);
   return NS_OK;
@@ -5757,31 +5757,31 @@ mdb_pos nsMsgDatabase::FindInsertIndexIn
 
   while (hi > lo)
   {
     mdbOid outOid;
     searchPos = (lo + hi - 1) / 2;
     table->PosToOid(GetEnv(), searchPos, &outOid);
     if (outOid.mOid_Id == idToInsert)
     {
-      NS_ASSERTION(PR_FALSE, "id shouldn't be in table");
+      NS_ASSERTION(false, "id shouldn't be in table");
       return hi;
     }
     if (outOid.mOid_Id > idToInsert)
       hi = searchPos;
     else // if (outOid.mOid_Id <  idToInsert)
       lo = searchPos + 1;
   }
   return hi;
 }
 NS_IMETHODIMP
 nsMsgDatabase::UpdateHdrInCache(const char *aSearchFolderUri, nsIMsgDBHdr *aHdr, bool aAdd)
 {
   nsCOMPtr <nsIMdbTable> table;
-  nsresult err = GetSearchResultsTable(aSearchFolderUri, PR_TRUE, getter_AddRefs(table));
+  nsresult err = GetSearchResultsTable(aSearchFolderUri, true, getter_AddRefs(table));
   NS_ENSURE_SUCCESS(err, err);
   nsMsgKey key;
   aHdr->GetMessageKey(&key);
   nsMsgHdr* msgHdr = static_cast<nsMsgHdr*>(aHdr);  // closed system, so this is ok
   if (err == NS_OK && m_mdbStore && msgHdr->m_mdbRow)
   {
     if (!aAdd)
     {
@@ -5804,17 +5804,17 @@ nsMsgDatabase::UpdateHdrInCache(const ch
  // if we need to add this hdr, we need to insert it in key order.
   return NS_OK;
 }
 NS_IMETHODIMP
 nsMsgDatabase::HdrIsInCache(const char* aSearchFolderUri, nsIMsgDBHdr *aHdr, bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
   nsCOMPtr <nsIMdbTable> table;
-  nsresult err = GetSearchResultsTable(aSearchFolderUri, PR_TRUE, getter_AddRefs(table));
+  nsresult err = GetSearchResultsTable(aSearchFolderUri, true, getter_AddRefs(table));
   NS_ENSURE_SUCCESS(err, err);
   nsMsgKey key;
   aHdr->GetMessageKey(&key);
   mdbOid rowObjectId;
   rowObjectId.mOid_Id = key;
   rowObjectId.mOid_Scope = m_hdrRowScopeToken;
   mdb_bool hasOid;
   err =  table->HasOid(GetEnv(), &rowObjectId, &hasOid);
--- a/mailnews/db/msgdb/src/nsMsgHdr.cpp
+++ b/mailnews/db/msgdb/src/nsMsgHdr.cpp
@@ -740,17 +740,17 @@ NS_IMETHODIMP nsMsgHdr::SetCharset(const
 {
   return SetStringColumn(aCharset, m_mdb->m_messageCharSetColumnToken);
 }
 
 NS_IMETHODIMP nsMsgHdr::SetThreadParent(nsMsgKey inKey)
 {
   m_threadParent = inKey;
   if (inKey == m_messageKey)
-    NS_ASSERTION(PR_FALSE, "can't be your own parent");
+    NS_ASSERTION(false, "can't be your own parent");
   SetUInt32Column(m_threadParent, m_mdb->m_threadParentColumnToken);
   m_initedValues |= THREAD_PARENT_INITED;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgHdr::GetThreadParent(nsMsgKey *result)
 {
   nsresult res;
@@ -870,17 +870,17 @@ const char *nsMsgHdr::GetNextReference(c
       case ' ':
       case '\r':
       case '\n':
       case '\t':
         // do nothing, make default case mean you didn't get whitespace
         break;
       case '<':
         firstMessageIdChar = ++ptr; // skip over the '<'
-        foundLessThan = PR_TRUE; // (flag to stop)
+        foundLessThan = true; // (flag to stop)
         // intentional fallthrough so whitespaceEndedAt will definitely have
         //  a non-NULL value, just in case the message-id is not valid (no '>')
         //  and the old-school support is desired.
       default:
         if (!whitespaceEndedAt)
             whitespaceEndedAt = ptr;
         break;
     }
@@ -913,37 +913,37 @@ bool nsMsgHdr::IsParentOf(nsIMsgDBHdr *p
   nsCString messageId;
   GetMessageId(getter_Copies(messageId));
 
   while (referenceToCheck > 0)
   {
     possibleChild->GetStringReference(referenceToCheck - 1, reference);
 
     if (reference.Equals(messageId))
-      return PR_TRUE;
+      return true;
     // if reference didn't match, check if this ref is for a non-existent
     // header. If it is, continue looking at ancestors.
     nsCOMPtr <nsIMsgDBHdr> refHdr;
     if (!m_mdb)
       break;
     (void) m_mdb->GetMsgHdrForMessageID(reference.get(), getter_AddRefs(refHdr));
     if (refHdr)
       break;
     referenceToCheck--;
   }
-  return PR_FALSE;
+  return false;
 }
 
 bool nsMsgHdr::IsAncestorOf(nsIMsgDBHdr *possibleChild)
 {
   const char *references;
   nsMsgHdr* curHdr = static_cast<nsMsgHdr*>(possibleChild);      // closed system, cast ok
   m_mdb->RowCellColumnToConstCharPtr(curHdr->GetMDBRow(), m_mdb->m_referencesColumnToken, &references);
   if (!references)
-    return PR_FALSE;
+    return false;
 
   nsCString messageId;
   // should put < > around message id to make strstr strictly match
   GetMessageId(getter_Copies(messageId));
   return (strstr(references, messageId.get()) != nsnull);
 }
 
 NS_IMETHODIMP nsMsgHdr::GetIsRead(bool *isRead)
@@ -1021,23 +1021,23 @@ bool nsMsgHdr::IsAncestorKilled(PRUint32
 
     if (threadParent == m_messageKey)
     {
       // isKilled is false by virtue of the enclosing if statement
       NS_ERROR("Thread is parent of itself, please fix!");
       nsCOMPtr<nsIMsgThread> thread;
       (void) m_mdb->GetThreadContainingMsgHdr(this, getter_AddRefs(thread));
       if (!thread)
-        return PR_FALSE;
+        return false;
       ReparentInThread(thread);
       // Something's wrong, but the problem happened some time ago, so erroring
       // out now is probably not a good idea. Ergo, we'll pretend to be OK, show
       // the user the thread (err on the side of caution), and let the assertion
       // alert debuggers to a problem.
-      return PR_FALSE;
+      return false;
     }
     if (threadParent != nsMsgKey_None)
     {
       nsCOMPtr<nsIMsgDBHdr> parentHdr;
       (void) m_mdb->GetMsgHdrForKey(threadParent, getter_AddRefs(parentHdr));
 
       if (parentHdr)
       {
@@ -1052,39 +1052,39 @@ bool nsMsgHdr::IsAncestorKilled(PRUint32
         {
           nsCOMPtr<nsIMsgDBHdr> claimant;
           (void) thread->GetChild(threadParent, getter_AddRefs(claimant));
           if (!claimant)
           {
             // attempt to reparent, and say the thread isn't killed,
             // erring on the side of safety.
             ReparentInThread(thread);
-            return PR_FALSE;
+            return false;
           }
         }
 
         if (!ancestorsToCheck)
         {
           // We think we have a parent, but we have no more ancestors to check
-          NS_ASSERTION(PR_FALSE, "cycle in parent relationship, please fix!");
-          return PR_FALSE;
+          NS_ASSERTION(false, "cycle in parent relationship, please fix!");
+          return false;
         }
         // closed system, cast ok
         nsMsgHdr* parent = static_cast<nsMsgHdr*>(parentHdr.get());
         return parent->IsAncestorKilled(ancestorsToCheck - 1);
       }
     }
   }
   return isKilled;
 }
 
 NS_IMETHODIMP nsMsgHdr::GetIsKilled(bool *isKilled)
 {
   NS_ENSURE_ARG_POINTER(isKilled);
-  *isKilled = PR_FALSE;
+  *isKilled = false;
   nsCOMPtr<nsIMsgThread> thread;
   (void) m_mdb->GetThreadContainingMsgHdr(this, getter_AddRefs(thread));
   // if we can't find the thread, let's at least check one level; maybe
   // the header hasn't been added to a thread yet.
   PRUint32 numChildren = 1;
   if (thread)
     thread->GetNumChildren(&numChildren);
   if (!numChildren)
@@ -1118,17 +1118,17 @@ protected:
   // underlying mdb row. The row cell cursor will crash if the underlying
   // row goes away.
   nsRefPtr<nsMsgHdr> m_hdr;
   bool mNextPrefetched;
   mdb_column mNextColumn;
 };
 
 nsMsgPropertyEnumerator::nsMsgPropertyEnumerator(nsMsgHdr* aHdr)
-  :  mNextPrefetched(PR_FALSE),
+  :  mNextPrefetched(false),
      mNextColumn(NULL_MORK_COLUMN)
 {
   nsRefPtr<nsMsgDatabase> mdb;
   nsCOMPtr<nsIMdbRow> mdbRow;
 
   if (aHdr &&
       (mdbRow = aHdr->GetMDBRow()) &&
       (m_hdr = aHdr) &&
@@ -1151,17 +1151,17 @@ NS_IMPL_ISUPPORTS1(nsMsgPropertyEnumerat
 
 NS_IMETHODIMP nsMsgPropertyEnumerator::GetNext(nsACString& aItem)
 {
   PrefetchNext();
   if (mNextColumn == NULL_MORK_COLUMN)
     return NS_ERROR_FAILURE; // call HasMore first
   if (!m_mdbStore || !m_mdbEnv)
     return NS_ERROR_NOT_INITIALIZED;
-  mNextPrefetched = PR_FALSE;
+  mNextPrefetched = false;
   char columnName[100];
   struct mdbYarn colYarn = {columnName, 0, sizeof(columnName), 0, 0, nsnull};
   // Get the column of the cell
   nsresult rv = m_mdbStore->TokenToString(m_mdbEnv, mNextColumn, &colYarn);
   NS_ENSURE_SUCCESS(rv, rv);
 
   aItem.Assign(static_cast<char *>(colYarn.mYarn_Buf), colYarn.mYarn_Fill);
   return NS_OK;
@@ -1175,17 +1175,17 @@ NS_IMETHODIMP nsMsgPropertyEnumerator::H
   *aResult = (mNextColumn != NULL_MORK_COLUMN);
   return NS_OK;
 }
 
 void nsMsgPropertyEnumerator::PrefetchNext(void)
 {
   if (!mNextPrefetched && m_mdbEnv && mRowCellCursor)
   {
-    mNextPrefetched = PR_TRUE;
+    mNextPrefetched = true;
     nsCOMPtr<nsIMdbCell> cell;
     mRowCellCursor->NextCell(m_mdbEnv, getter_AddRefs(cell), &mNextColumn, nsnull);
     if (mNextColumn == NULL_MORK_COLUMN)
     {
       // free up references
       m_mdbStore = nsnull;
       m_mdbEnv = nsnull;
       mRowCellCursor = nsnull;
--- a/mailnews/db/msgdb/src/nsMsgThread.cpp
+++ b/mailnews/db/msgdb/src/nsMsgThread.cpp
@@ -73,17 +73,17 @@ nsMsgThread::nsMsgThread(nsMsgDatabase *
 void nsMsgThread::Init()
 {
   m_threadKey = nsMsgKey_None;
   m_threadRootKey = nsMsgKey_None;
   m_numChildren = 0;
   m_numUnreadChildren = 0;
   m_flags = 0;
   m_newestMsgDate = 0;
-  m_cachedValuesInitialized = PR_FALSE;
+  m_cachedValuesInitialized = false;
 }
 
 nsMsgThread::~nsMsgThread()
 {
   MOZ_COUNT_DTOR(nsMsgThread);
   if (m_mdbDB)
   {
     bool found = m_mdbDB->m_threads.RemoveElement(this);
@@ -120,17 +120,17 @@ nsresult nsMsgThread::InitCachedValues()
     PRUint32 rowCount = 0;
     m_mdbTable->GetCount(m_mdbDB->GetEnv(), &rowCount);
     //    NS_ASSERTION(m_numChildren <= rowCount, "num children wrong - fixing");
     if (m_numChildren > rowCount)
       ChangeChildCount((PRInt32) rowCount - (PRInt32) m_numChildren);
     if ((PRInt32) m_numUnreadChildren < 0)
       ChangeUnreadChildCount(- (PRInt32) m_numUnreadChildren);
     if (NS_SUCCEEDED(err))
-      m_cachedValuesInitialized = PR_TRUE;
+      m_cachedValuesInitialized = true;
   }
   return err;
 }
 
 NS_IMETHODIMP nsMsgThread::SetThreadKey(nsMsgKey threadKey)
 {
   NS_ASSERTION(m_threadKey == nsMsgKey_None || m_threadKey == threadKey,
                "shouldn't be changing thread key");
@@ -279,17 +279,17 @@ NS_IMETHODIMP nsMsgThread::AddChild(nsIM
     if (! (newHdrFlags & nsMsgMessageFlags::Read))
       ChangeUnreadChildCount(1);
   }
   if (inReplyTo)
   {
     nsMsgKey parentKey;
     inReplyTo->GetMessageKey(&parentKey);
     child->SetThreadParent(parentKey);
-    parentKeyNeedsSetting = PR_FALSE;
+    parentKeyNeedsSetting = false;
   }
   // check if this header is a parent of one of the messages in this thread
 
   bool hdrMoved = false;
   nsCOMPtr <nsIMsgDBHdr> curHdr;
   PRUint32 moveIndex = 0;
 
   PRTime newHdrDate;
@@ -317,41 +317,41 @@ NS_IMETHODIMP nsMsgThread::AddChild(nsIM
         if (hdr->IsParentOf(curHdr))
         {
           nsMsgKey oldThreadParent;
           mdb_pos outPos;
           // move this hdr before the current header.
           if (!hdrMoved)
           {
             m_mdbTable->MoveRow(m_mdbDB->GetEnv(), hdrRow, -1, childIndex, &outPos);
-            hdrMoved = PR_TRUE;
+            hdrMoved = true;
             curHdr->GetThreadParent(&oldThreadParent);
             curHdr->GetMessageKey(&msgKey);
             nsCOMPtr <nsIMsgDBHdr> curParent;
             m_mdbDB->GetMsgHdrForKey(oldThreadParent, getter_AddRefs(curParent));
             if (curParent && hdr->IsAncestorOf(curParent))
             {
               nsMsgKey curParentKey;
               curParent->GetMessageKey(&curParentKey);
               if (curParentKey == m_threadRootKey)
               {
                 m_mdbTable->MoveRow(m_mdbDB->GetEnv(), hdrRow, -1, 0, &outPos);
                 RerootThread(child, curParent, announcer);
-                parentKeyNeedsSetting = PR_FALSE;
+                parentKeyNeedsSetting = false;
               }
             }
             else if (msgKey == m_threadRootKey)
             {
               RerootThread(child, curHdr, announcer);
-              parentKeyNeedsSetting = PR_FALSE;
+              parentKeyNeedsSetting = false;
             }
           }
           curHdr->SetThreadParent(newHdrKey);
           if (msgKey == newHdrKey)
-            parentKeyNeedsSetting = PR_FALSE;
+            parentKeyNeedsSetting = false;
 
           // OK, this is a reparenting - need to send notification
           if (announcer)
             announcer->NotifyParentChangedAll(msgKey, oldThreadParent, newHdrKey, nsnull);
 #ifdef DEBUG_bienvenu1
           if (newHdrKey != m_threadKey)
             printf("adding second level child\n");
 #endif
@@ -381,19 +381,19 @@ NS_IMETHODIMP nsMsgThread::AddChild(nsIM
     if (NS_SUCCEEDED(rv) && topLevelHdr)
     {
       topLevelHdr->GetDate(&topLevelHdrDate);
       if (LL_CMP(newHdrDate, <, topLevelHdrDate))
       {
         RerootThread(child, topLevelHdr, announcer);
         mdb_pos outPos;
         m_mdbTable->MoveRow(m_mdbDB->GetEnv(), hdrRow, -1, 0, &outPos);
-        hdrMoved = PR_TRUE;
+        hdrMoved = true;
         topLevelHdr->SetThreadParent(newHdrKey);
-        parentKeyNeedsSetting = PR_FALSE;
+        parentKeyNeedsSetting = false;
         // ### need to get ancestor of new hdr here too.
         SetThreadRootKey(newHdrKey);
         child->SetThreadParent(nsMsgKey_None);
         // argh, here we'd need to adjust all the headers that listed
         // the demoted header as their thread parent, but only because
         // of subject threading. Adjust them to point to the new parent,
         // that is.
         ReparentNonReferenceChildrenOf(topLevelHdr, newHdrKey, announcer);
@@ -411,17 +411,17 @@ NS_IMETHODIMP nsMsgThread::AddChild(nsIM
     mdb_pos outPos;
     m_mdbTable->MoveRow(m_mdbDB->GetEnv(), hdrRow, -1, moveIndex, &outPos);
   }
 
   // do this after we've put the new hdr in the thread
   bool isKilled;
   child->GetIsKilled(&isKilled);
   if ((m_flags & nsMsgMessageFlags::Ignored || isKilled) && m_mdbDB)
-    m_mdbDB->MarkHdrRead(child, PR_TRUE, nsnull);
+    m_mdbDB->MarkHdrRead(child, true, nsnull);
 #ifdef DEBUG_David_Bienvenu
   nsMsgKey msgHdrThreadKey;
   child->GetThreadId(&msgHdrThreadKey);
   NS_ASSERTION(msgHdrThreadKey == m_threadKey, "adding msg to thread it doesn't belong to");
 #endif
 #ifdef DEBUG_bienvenu1
   nsMsgDatabase *msgDB = static_cast<nsMsgDatabase*>(m_mdbDB);
   msgDB->DumpThread(m_threadRootKey);
@@ -656,23 +656,23 @@ protected:
   bool                    mNeedToPrefetch;
   nsMsgThreadEnumeratorFilter     mFilter;
   void*                   mClosure;
   bool                    mFoundChildren;
 };
 
 nsMsgThreadEnumerator::nsMsgThreadEnumerator(nsMsgThread *thread, nsMsgKey startKey,
                                              nsMsgThreadEnumeratorFilter filter, void* closure)
-                                             : mRowCursor(nsnull), mDone(PR_FALSE),
-                                             mFilter(filter), mClosure(closure), mFoundChildren(PR_FALSE)
+                                             : mRowCursor(nsnull), mDone(false),
+                                             mFilter(filter), mClosure(closure), mFoundChildren(false)
 {
   mThreadParentKey = startKey;
   mChildIndex = 0;
   mThread = thread;
-  mNeedToPrefetch = PR_TRUE;
+  mNeedToPrefetch = true;
   mFirstMsgKey = nsMsgKey_None;
 
   nsresult rv = mThread->GetRootHdr(nsnull, getter_AddRefs(mResultHdr));
 
   if (NS_SUCCEEDED(rv) && mResultHdr)
     mResultHdr->GetMessageKey(&mFirstMsgKey);
 
   PRUint32 numChildren;
@@ -698,17 +698,17 @@ nsMsgThreadEnumerator::nsMsgThreadEnumer
           break;
         }
 
         if (mDone)
           break;
 
       }
       else
-        NS_ASSERTION(PR_FALSE, "couldn't get child from thread");
+        NS_ASSERTION(false, "couldn't get child from thread");
     }
   }
 
 #ifdef DEBUG_bienvenu1
   nsCOMPtr <nsIMsgDBHdr> child;
   for (PRUint32 childIndex = 0; childIndex < numChildren; childIndex++)
   {
     rv = mThread->GetChildHdrAt(childIndex, getter_AddRefs(child));
@@ -735,17 +735,17 @@ nsMsgThreadEnumerator::~nsMsgThreadEnume
 }
 
 NS_IMPL_ISUPPORTS1(nsMsgThreadEnumerator, nsISimpleEnumerator)
 
 
 PRInt32 nsMsgThreadEnumerator::MsgKeyFirstChildIndex(nsMsgKey inMsgKey)
 {
   //	if (msgKey != mThreadParentKey)
-  //		mDone = PR_TRUE;
+  //		mDone = true;
   // look through rest of thread looking for a child of this message.
   // If the inMsgKey is the first message in the thread, then all children
   // without parents are considered to be children of inMsgKey.
   // Otherwise, only true children qualify.
   PRUint32 numChildren;
   nsCOMPtr <nsIMsgDBHdr> curHdr;
   PRInt32 firstChildIndex = -1;
 
@@ -787,17 +787,17 @@ NS_IMETHODIMP nsMsgThreadEnumerator::Get
     rv = Prefetch();
     NS_ENSURE_SUCCESS(rv, rv);
   }  
 
   if (mResultHdr)
   {
     *aItem = mResultHdr;
     NS_ADDREF(*aItem);
-    mNeedToPrefetch = PR_TRUE;
+    mNeedToPrefetch = true;
   }
   return NS_OK;
 }
 
 nsresult nsMsgThreadEnumerator::Prefetch()
 {
   nsresult rv=NS_OK;          // XXX or should this default to an error?
   mResultHdr = nsnull;
@@ -832,34 +832,34 @@ nsresult nsMsgThreadEnumerator::Prefetch
         // level message in the thread, then leave mResultHdr set to cur msg.
         if (parentKey == mThreadParentKey ||
           (parentKey == nsMsgKey_None
           && mThreadParentKey == mFirstMsgKey && curKey != mThreadParentKey))
           break;
         mResultHdr = nsnull;
       }
       else
-        NS_ASSERTION(PR_FALSE, "better be able to get child");
+        NS_ASSERTION(false, "better be able to get child");
     }
     if (!mResultHdr && mThreadParentKey == mFirstMsgKey && !mFoundChildren && numChildren > 1)
       mThread->ReparentMsgsWithInvalidParent(numChildren, mThreadParentKey);
   }
   if (!mResultHdr)
   {
-    mDone = PR_TRUE;
+    mDone = true;
     return NS_ERROR_FAILURE;
   }
   if (NS_FAILED(rv))
   {
-    mDone = PR_TRUE;
+    mDone = true;
     return rv;
   }
   else
-    mNeedToPrefetch = PR_FALSE;
-  mFoundChildren = PR_TRUE;
+    mNeedToPrefetch = false;
+  mFoundChildren = true;
 
 #ifdef DEBUG_bienvenu1
 	nsMsgKey debugMsgKey;
 	mResultHdr->GetMessageKey(&debugMsgKey);
 	printf("next for %ld = %ld\n", mThreadParentKey, debugMsgKey);
 #endif
 
   return rv;
@@ -1015,17 +1015,17 @@ nsresult nsMsgThread::ChangeUnreadChildC
   nsresult rv;
 
   PRUint32 childCount = 0;
   m_mdbDB->RowCellColumnToUInt32(m_metaRow, m_mdbDB->m_threadUnreadChildrenColumnToken, childCount);
   childCount += delta;
   if ((PRInt32) childCount < 0)
   {
 #ifdef DEBUG_bienvenu1
-    NS_ASSERTION(PR_FALSE, "negative unread child count");
+    NS_ASSERTION(false, "negative unread child count");
 #endif
     childCount = 0;
   }
   rv = m_mdbDB->UInt32ToRowCellColumn(m_metaRow, m_mdbDB->m_threadUnreadChildrenColumnToken, childCount);
   m_numUnreadChildren = childCount;
   return rv;
 }
 
--- a/mailnews/db/msgdb/src/nsNewsDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsNewsDatabase.cpp
@@ -209,53 +209,53 @@ bool nsNewsDatabase::SetHdrReadFlag(nsIM
     nsresult rv;
     bool isRead;
     rv = IsHeaderRead(msgHdr, &isRead);
 
     if (isRead == bRead)
     {
       // give the base class a chance to update m_flags.
       nsMsgDatabase::SetHdrReadFlag(msgHdr, bRead);
-      return PR_FALSE;
+      return false;
     }
     else {
       nsMsgKey messageKey;
 
       // give the base class a chance to update m_flags.
       nsMsgDatabase::SetHdrReadFlag(msgHdr, bRead);
       rv = msgHdr->GetMessageKey(&messageKey);
-      if (NS_FAILED(rv)) return PR_FALSE;
+      if (NS_FAILED(rv)) return false;
 
       NS_ASSERTION(m_readSet, "m_readSet is null");
-      if (!m_readSet) return PR_FALSE;
+      if (!m_readSet) return false;
 
       if (!bRead) {
 #ifdef DEBUG_NEWS_DATABASE
         printf("remove %d from the set\n",messageKey);
 #endif
 
         rv = m_readSet->Remove(messageKey);
-        if (NS_FAILED(rv)) return PR_FALSE;
+        if (NS_FAILED(rv)) return false;
 
         rv = NotifyReadChanged(nsnull);
-        if (NS_FAILED(rv)) return PR_FALSE;
+        if (NS_FAILED(rv)) return false;
       }
       else {
 #ifdef DEBUG_NEWS_DATABASE
         printf("add %d to the set\n",messageKey);
 #endif
 
         rv = m_readSet->Add(messageKey);
-        if (NS_FAILED(rv)) return PR_FALSE;
+        if (NS_FAILED(rv)) return false;
 
         rv = NotifyReadChanged(nsnull);
-        if (NS_FAILED(rv)) return PR_FALSE;
+        if (NS_FAILED(rv)) return false;
       }
     }
-    return PR_TRUE;
+    return true;
 }
 
 NS_IMETHODIMP nsNewsDatabase::MarkAllRead(PRUint32 *aNumMarked,
                                           nsMsgKey **aThoseMarked)
 {
   nsMsgKey lowWater = nsMsgKey_None, highWater;
   nsCString knownArts;
   if (m_dbFolderInfo)
@@ -311,32 +311,32 @@ nsresult nsNewsDatabase::SyncWithReadSet
       numMessages++;
       if (!readInNewsrc)
         numUnreadMessages++;
 
       // If DB and readSet disagree on Read/Unread, fix DB
       if (readInNewsrc!=isReadInDB)
       {
         MarkHdrRead(header, readInNewsrc, nsnull);
-        changed = PR_TRUE;
+        changed = true;
       }
   }
 
   // Update FolderInfo Counters
   PRInt32 oldMessages, oldUnreadMessages;
   rv = m_dbFolderInfo->GetNumMessages(&oldMessages);
   if (NS_SUCCEEDED(rv) && oldMessages!=numMessages)
   {
-      changed = PR_TRUE;
+      changed = true;
       m_dbFolderInfo->ChangeNumMessages(numMessages-oldMessages);
   }
   rv = m_dbFolderInfo->GetNumUnreadMessages(&oldUnreadMessages);
   if (NS_SUCCEEDED(rv) && oldUnreadMessages!=numUnreadMessages)
   {
-      changed = PR_TRUE;
+      changed = true;
       m_dbFolderInfo->ChangeNumUnreadMessages(numUnreadMessages-oldUnreadMessages);
   }
 
   if (changed)
       Commit(nsMsgDBCommitType::kLargeCommit);
 
   return rv;
 }
--- a/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
+++ b/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
@@ -320,17 +320,17 @@ inline TokenEnumeration TokenHash::getTo
 {
   return TokenEnumeration(&mTokenTable);
 }
 
 Tokenizer::Tokenizer() :
   TokenHash(sizeof(Token)),
   mBodyDelimiters(kBayesianFilterTokenDelimiters),
   mHeaderDelimiters(kBayesianFilterTokenDelimiters),
-  mCustomHeaderTokenization(PR_FALSE),
+  mCustomHeaderTokenization(false),
   mMaxLengthForToken(kMaxLengthForToken)
 {
   nsresult rv;
   nsCOMPtr<nsIPrefService> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, );
 
   nsCOMPtr<nsIPrefBranch> prefBranch;
   rv = prefs->GetBranch("mailnews.bayesian_spam_filter.", getter_AddRefs(prefBranch));
@@ -339,17 +339,17 @@ Tokenizer::Tokenizer() :
 
   /*
    * RSS feeds store their summary as alternate content of an iframe. But due
    * to bug 365953, this is not seen by the serializer. As a workaround, allow
    * the tokenizer to replace the iframe with div for tokenization.
    */
   rv = prefBranch->GetBoolPref("iframe_to_div", &mIframeToDiv);
   if (NS_FAILED(rv))
-    mIframeToDiv = PR_FALSE;
+    mIframeToDiv = false;
 
   /*
    * the list of delimiters used to tokenize the message and body
    * defaults to the value in kBayesianFilterTokenDelimiters, but may be
    * set with the following preferences for the body and header
    * separately.
    *
    * \t, \n, \v, \f, \r, and \\ will be escaped to their normal
@@ -408,29 +408,29 @@ Tokenizer::Tokenizer() :
   mMaxLengthForToken = NS_SUCCEEDED(rv) ? PRUint32(maxLengthForToken) : kMaxLengthForToken;
 
   rv = prefs->GetBranch("mailnews.bayesian_spam_filter.tokenizeheader.", getter_AddRefs(prefBranch));
   if (NS_SUCCEEDED(rv))
     rv = prefBranch->GetChildList("", &count, &headers);
 
   if (NS_SUCCEEDED(rv))
   {
-    mCustomHeaderTokenization = PR_TRUE;
+    mCustomHeaderTokenization = true;
     for (PRUint32 i = 0; i < count; i++)
     {
       nsCString value;
       prefBranch->GetCharPref(headers[i], getter_Copies(value));
       if (value.EqualsLiteral("false"))
       {
         mDisabledHeaders.AppendElement(headers[i]);
         continue;
       }
       mEnabledHeaders.AppendElement(headers[i]);
       if (value.EqualsLiteral("standard"))
-        value.SetIsVoid(PR_TRUE); // Void means use default delimiter
+        value.SetIsVoid(true); // Void means use default delimiter
       else if (value.EqualsLiteral("full"))
         value.Truncate(); // Empty means add full header
       else
         UnescapeCString(value);
       mEnabledHeadersDelimiters.AppendElement(value);
     }
     NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, headers);
   }
@@ -463,30 +463,30 @@ Token* Tokenizer::add(const char* word, 
 
 static bool isDecimalNumber(const char* word)
 {
     const char* p = word;
     if (*p == '-') ++p;
     char c;
     while ((c = *p++)) {
         if (!isdigit((unsigned char) c))
-            return PR_FALSE;
+            return false;
     }
-    return PR_TRUE;
+    return true;
 }
 
 static bool isASCII(const char* word)
 {
     const unsigned char* p = (const unsigned char*)word;
     unsigned char c;
     while ((c = *p++)) {
         if (c > 127)
-            return PR_FALSE;
+            return false;
     }
-    return PR_TRUE;
+    return true;
 }
 
 inline bool isUpperCase(char c) { return ('A' <= c) && (c <= 'Z'); }
 
 static char* toLowerCase(char* str)
 {
     char c, *p = str;
     while ((c = *p++)) {
@@ -568,33 +568,33 @@ void Tokenizer::tokenizeHeaders(nsIUTF8S
     if (mCustomHeaderTokenization)
     {
       // Process any exceptions set from preferences
       for (PRUint32 i = 0; i < mEnabledHeaders.Length(); i++)
         if (headerName.Equals(mEnabledHeaders[i]))
         {
           if (mEnabledHeadersDelimiters[i].IsVoid())
             // tokenize with standard delimiters for all headers
-            addTokenForHeader(headerName.get(), headerValue, PR_TRUE);
+            addTokenForHeader(headerName.get(), headerValue, true);
           else if (mEnabledHeadersDelimiters[i].IsEmpty())
             // do not break the header into tokens
             addTokenForHeader(headerName.get(), headerValue);
           else
             // use the delimiter in mEnabledHeadersDelimiters
-            addTokenForHeader(headerName.get(), headerValue, PR_TRUE,
+            addTokenForHeader(headerName.get(), headerValue, true,
                               mEnabledHeadersDelimiters[i].get());
-          headerProcessed = PR_TRUE;
+          headerProcessed = true;
           break; // we found the header, no need to look for more custom values
         }
 
       for (PRUint32 i = 0; i < mDisabledHeaders.Length(); i++)
       {
         if (headerName.Equals(mDisabledHeaders[i]))
         {
-          headerProcessed = PR_TRUE;
+          headerProcessed = true;
           break;
         }
       }
 
       if (headerProcessed)
         continue;
     }
 
@@ -632,17 +632,17 @@ void Tokenizer::tokenizeHeaders(nsIUTF8S
       }
 
       // leave out reply-to
       break;
     case 's':
         if (headerName.Equals("subject"))
         {
           // we want to tokenize the subject
-          addTokenForHeader(headerName.get(), headerValue, PR_TRUE);
+          addTokenForHeader(headerName.get(), headerValue, true);
         }
 
         // important: leave out sender field. Too strong of an indicator
         break;
     case 'x': // (2) X-Mailer / user-agent works best if it is untokenized, just fold the case and any leading/trailing white space
         // all headers beginning with x-mozilla are being changed by us, so ignore
         if (Substring(headerName, 0, 9).Equals("x-mozilla"))
           break;
@@ -756,28 +756,28 @@ static bool isJapanese(const char* word)
 {
   nsString text = NS_ConvertUTF8toUTF16(word);
   PRUnichar* p = (PRUnichar*)text.get();
   PRUnichar c;
 
   // it is japanese chunk if it contains any hiragana or katakana.
   while((c = *p++))
     if( IS_JAPANESE_SPECIFIC(c))
-      return PR_TRUE;
-
-  return PR_FALSE;
+      return true;
+
+  return false;
 }
 
 static bool isFWNumeral(const PRUnichar* p1, const PRUnichar* p2)
 {
   for(;p1<p2;p1++)
     if(!IS_JA_FWNUMERAL(*p1))
-      return PR_FALSE;
-
-  return PR_TRUE;
+      return false;
+
+  return true;
 }
 
 // The japanese tokenizer was added as part of Bug #277354
 void Tokenizer::tokenize_japanese_word(char* chunk)
 {
   PR_LOG(BayesianFilterLogModule, PR_LOG_DEBUG, ("entering tokenize_japanese_word(%s)", chunk));
 
   nsString srcStr = NS_ConvertUTF8toUTF16(chunk);
@@ -822,17 +822,17 @@ nsresult Tokenizer::stripHTML(const nsAS
                  | nsIDocumentEncoder::OutputNoScriptContent
                  | nsIDocumentEncoder::OutputNoFramesContent
                  | nsIDocumentEncoder::OutputBodyOnly;
 
   textSink->Initialize(&outString, flags, 80);
 
   parser->SetContentSink(sink);
 
-  return parser->Parse(inString, 0, NS_LITERAL_CSTRING("text/html"), PR_TRUE);
+  return parser->Parse(inString, 0, NS_LITERAL_CSTRING("text/html"), true);
 }
 
 void Tokenizer::tokenize(const char* aText)
 {
   PR_LOG(BayesianFilterLogModule, PR_LOG_DEBUG, ("tokenize: %s", aText));
 
   // strip out HTML tags before we begin processing
   // uggh but first we have to blow up our string into UCS2
@@ -893,17 +893,17 @@ void Tokenizer::tokenize(const char* aTe
             mScanner->Start("UTF-8");
             // convert this word from UTF-8 into UCS2.
             NS_ConvertUTF8toUTF16 uword(word);
             ToLowerCase(uword);
             const PRUnichar* utext = uword.get();
             PRInt32 len = uword.Length(), pos = 0, begin, end;
             bool gotUnit;
             while (pos < len) {
-                rv = mScanner->Next(utext, len, pos, PR_TRUE, &begin, &end, &gotUnit);
+                rv = mScanner->Next(utext, len, pos, true, &begin, &end, &gotUnit);
                 if (NS_SUCCEEDED(rv) && gotUnit) {
                     NS_ConvertUTF16toUTF8 utfUnit(utext + begin, end - begin);
                     add(utfUnit.get());
                     // advance to end of current unit.
                     pos = end;
                 } else {
                     break;
                 }
@@ -923,23 +923,23 @@ void Tokenizer::UnescapeCString(nsCStrin
   char* writeIter = writeStart;
 
   bool inEscape = false;
   for (const char* readIter = aCString.BeginReading(); readIter != readEnd; readIter++)
   {
     if (!inEscape)
     {
       if (*readIter == '\\')
-        inEscape = PR_TRUE;
+        inEscape = true;
       else
         *(writeIter++) = *readIter;
     }
     else
     {
-      inEscape = PR_FALSE;
+      inEscape = false;
       switch (*readIter)
       {
         case '\\':
           *(writeIter++) = '\\';
           break;
         case 't':
           *(writeIter++) = '\t';
           break;
@@ -1022,17 +1022,17 @@ protected:
     bool mSetAttachmentFlag;
 };
 
 const PRUint32 kBufferSize = 16384;
 
 TokenStreamListener::TokenStreamListener(TokenAnalyzer* analyzer)
     :   mAnalyzer(analyzer),
         mBuffer(NULL), mBufferSize(kBufferSize), mLeftOverCount(0),
-        mSetAttachmentFlag(PR_FALSE)
+        mSetAttachmentFlag(false)
 {
 }
 
 TokenStreamListener::~TokenStreamListener()
 {
     delete[] mBuffer;
     delete mAnalyzer;
 }
@@ -1224,17 +1224,17 @@ NS_IMETHODIMP TokenStreamListener::OnSto
 
 /* Implementation file */
 
 NS_IMPL_ISUPPORTS5(nsBayesianFilter, nsIMsgFilterPlugin,
                    nsIJunkMailPlugin, nsIMsgCorpus, nsISupportsWeakReference,
                    nsIObserver)
 
 nsBayesianFilter::nsBayesianFilter()
-    :   mTrainingDataDirty(PR_FALSE)
+    :   mTrainingDataDirty(false)
 {
     if (!BayesianFilterLogModule)
       BayesianFilterLogModule = PR_NewLogModule("BayesianFilter");
 
     PRInt32 junkThreshold = 0;
     nsresult rv;
     nsCOMPtr<nsIPrefBranch> pPrefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
     if (pPrefBranch)
@@ -1285,29 +1285,29 @@ nsBayesianFilter::nsBayesianFilter()
 }
 
 nsresult nsBayesianFilter::Init()
 {
   nsresult rv;
   nsCOMPtr<nsIObserverService> observerService =
            do_GetService("@mozilla.org/observer-service;1", &rv);
   if (NS_SUCCEEDED(rv))
-    observerService->AddObserver(this, "profile-before-change", PR_TRUE);
+    observerService->AddObserver(this, "profile-before-change", true);
   return NS_OK;
 }
 
 void
 nsBayesianFilter::TimerCallback(nsITimer* aTimer, void* aClosure)
 {
     // we will flush the training data to disk after enough time has passed
     // since the first time a message has been classified after the last flush
 
     nsBayesianFilter *filter = static_cast<nsBayesianFilter *>(aClosure);
     filter->mCorpus.writeTrainingData(filter->mMaximumTokenCount);
-    filter->mTrainingDataDirty = PR_FALSE;
+    filter->mTrainingDataDirty = false;
 }
 
 nsBayesianFilter::~nsBayesianFilter()
 {
     if (mTimer)
     {
         mTimer->Cancel();
         mTimer = nsnull;
@@ -1429,18 +1429,18 @@ nsresult nsBayesianFilter::tokenizeMessa
 {
 
     nsCOMPtr <nsIMsgMessageService> msgService;
     nsresult rv = GetMessageServiceFromURI(nsDependentCString(aMessageURI), getter_AddRefs(msgService));
     NS_ENSURE_SUCCESS(rv, rv);
 
     aAnalyzer->setSource(aMessageURI);
     return msgService->StreamMessage(aMessageURI, aAnalyzer->mTokenListener,
-                                     aMsgWindow, nsnull, PR_TRUE /* convert data */,
-                                     NS_LITERAL_CSTRING("filter"), PR_FALSE, nsnull);
+                                     aMsgWindow, nsnull, true /* convert data */,
+                                     NS_LITERAL_CSTRING("filter"), false, nsnull);
 }
 
 // a TraitAnalysis is the per-token representation of the statistical
 // calculations, basically created to group information that is then
 // sorted by mDistance
 struct TraitAnalysis
 {
   PRUint32 mTokenIndex;
@@ -1795,19 +1795,19 @@ void nsBayesianFilter::classifyMessage(
         //
         // if there are no good tokens, assume the message is junk
         // this will "encourage" the user to train
         // and if there are no bad tokens, assume the message is not junk
         // this will also "encourage" the user to train
         // see bug #194238
 
         if (listener && !mCorpus.getMessageCount(kGoodTrait))
-          isJunk = PR_TRUE;
+          isJunk = true;
         else if (listener && !mCorpus.getMessageCount(kJunkTrait))
-          isJunk = PR_FALSE;
+          isJunk = false;
 
         if (listener)
           listener->OnMessageClassified(messageURI, isJunk ?
             nsMsgJunkStatus(nsIJunkMailPlugin::JUNK) :
             nsMsgJunkStatus(nsIJunkMailPlugin::GOOD), proPercent);
       }
 
       if (aTraitListener)
@@ -1859,26 +1859,26 @@ nsBayesianFilter::Observe(nsISupports *a
   return NS_OK;
 }
 
 /* void shutdown (); */
 NS_IMETHODIMP nsBayesianFilter::Shutdown()
 {
   if (mTrainingDataDirty)
     mCorpus.writeTrainingData(mMaximumTokenCount);
-  mTrainingDataDirty = PR_FALSE;
+  mTrainingDataDirty = false;
 
   return NS_OK;
 }
 
 /* readonly attribute boolean shouldDownloadAllHeaders; */
 NS_IMETHODIMP nsBayesianFilter::GetShouldDownloadAllHeaders(bool *aShouldDownloadAllHeaders)
 {
     // bayesian filters work on the whole msg body currently.
-    *aShouldDownloadAllHeaders = PR_FALSE;
+    *aShouldDownloadAllHeaders = false;
     return NS_OK;
 }
 
 /* void classifyMessage (in string aMsgURL, in nsIJunkMailClassificationListener aListener); */
 NS_IMETHODIMP nsBayesianFilter::ClassifyMessage(const char *aMessageURL, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener)
 {
     MessageClassifier* analyzer = new MessageClassifier(this, aListener, aMsgWindow, 1, &aMessageURL);
     if (!analyzer)
@@ -2100,29 +2100,29 @@ void nsBayesianFilter::observeMessage(
         continue;
       // remove the tokens from the token set it is currently in
       PRUint32 messageCount;
       messageCount = mCorpus.getMessageCount(trait);
       if (messageCount > 0)
       {
         mCorpus.setMessageCount(trait, messageCount - 1);
         mCorpus.forgetTokens(tokens, trait, 1);
-        mTrainingDataDirty = PR_TRUE;
+        mTrainingDataDirty = true;
       }
     }
 
     nsMsgJunkStatus newClassification = nsIJunkMailPlugin::UNCLASSIFIED;
     PRUint32 junkPercent = 0; // 0 here is no possibility of meeting the classification
     PRUint32 newLength = newClassifications.Length();
     for (PRUint32 index = 0; index < newLength; index++)
     {
       PRUint32 trait = newClassifications.ElementAt(index);
       mCorpus.setMessageCount(trait, mCorpus.getMessageCount(trait) + 1);
       mCorpus.rememberTokens(tokens, trait, 1);
-      mTrainingDataDirty = PR_TRUE;
+      mTrainingDataDirty = true;
 
       if (aJunkListener)
       {
         if (trait == kJunkTrait)
         {
           junkPercent = nsIJunkMailPlugin::IS_SPAM_SCORE;
           newClassification = nsIJunkMailPlugin::JUNK;
         }
@@ -2376,91 +2376,91 @@ bool CorpusStore::writeTokens(FILE* stre
     PRUint32 count = getTraitCount(token, aTraitId);
     // Shrinking the token database is accomplished by dividing all token counts by 2.
     // If shrinking, we'll ignore counts < 2, otherwise only ignore counts of < 1
     if ((shrink && count > 1) || (!shrink && count))
       newTokenCount++;
   }
 
   if (writeUInt32(stream, newTokenCount) != 1)
-    return PR_FALSE;
+    return false;
 
   if (newTokenCount > 0)
   {
     TokenEnumeration tokens = getTokens();
     for (PRUint32 i = 0; i < tokenCount; ++i)
     {
       CorpusToken* token = static_cast<CorpusToken*>(tokens.nextToken());
       PRUint32 wordCount = getTraitCount(token, aTraitId);
       if (shrink)
         wordCount /= 2;
       if (!wordCount)
         continue; // Don't output zero count words
       if (writeUInt32(stream, wordCount) != 1)
-        return PR_FALSE;
+        return false;
       PRUint32 tokenLength = strlen(token->mWord);
       if (writeUInt32(stream, tokenLength) != 1)
-        return PR_FALSE;
+        return false;
       if (fwrite(token->mWord, tokenLength, 1, stream) != 1)
-        return PR_FALSE;
+        return false;
     }
   }
-  return PR_TRUE;
+  return true;
 }
 
 bool CorpusStore::readTokens(FILE* stream, PRInt64 fileSize,
                                PRUint32 aTraitId, bool aIsAdd)
 {
     PRUint32 tokenCount;
     if (readUInt32(stream, &tokenCount) != 1)
-        return PR_FALSE;
+        return false;
 
     PRInt64 fpos = ftell(stream);
     if (fpos < 0)
-        return PR_FALSE;
+        return false;
 
     PRUint32 bufferSize = 4096;
     char* buffer = new char[bufferSize];
-    if (!buffer) return PR_FALSE;
+    if (!buffer) return false;
 
     for (PRUint32 i = 0; i < tokenCount; ++i) {
         PRUint32 count;
         if (readUInt32(stream, &count) != 1)
             break;
         PRUint32 size;
         if (readUInt32(stream, &size) != 1)
             break;
         fpos += 8;
         if (fpos + size > fileSize) {
             delete[] buffer;
-            return PR_FALSE;
+            return false;
         }
         if (size >= bufferSize) {
             delete[] buffer;
             while (size >= bufferSize) {
                 bufferSize *= 2;
                 if (bufferSize == 0)
-                    return PR_FALSE;
+                    return false;
             }
             buffer = new char[bufferSize];
-            if (!buffer) return PR_FALSE;
+            if (!buffer) return false;
         }
         if (fread(buffer, size, 1, stream) != 1)
             break;
         fpos += size;
         buffer[size] = '\0';
         if (aIsAdd)
           add(buffer, aTraitId, count);
         else
           remove(buffer, aTraitId, count);
     }
 
     delete[] buffer;
 
-    return PR_TRUE;
+    return true;
 }
 
 nsresult CorpusStore::getTrainingFile(nsILocalFile ** aTrainingFile)
 {
   // should we cache the profile manager's directory?
   nsCOMPtr<nsIFile> profileDir;
 
   nsresult rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(profileDir));
@@ -2523,17 +2523,17 @@ void CorpusStore::writeTrainingData(PRUi
       (writeUInt32(stream, getMessageCount(kGoodTrait) / shrinkFactor)) &&
       (writeUInt32(stream, getMessageCount(kJunkTrait) / shrinkFactor)) &&
        writeTokens(stream, shrink, kGoodTrait) &&
        writeTokens(stream, shrink, kJunkTrait)))
   {
     NS_WARNING("failed to write training data.");
     fclose(stream);
     // delete the training data file, since it is potentially corrupt.
-    mTrainingFile->Remove(PR_FALSE);
+    mTrainingFile->Remove(false);
   }
   else
   {
     fclose(stream);
   }
 
   /*
    * Write the remaining data to a second file traits.dat
@@ -2575,17 +2575,17 @@ void CorpusStore::writeTrainingData(PRUi
   // we add a 0 at the end to represent end of trait list
   error = writeUInt32(stream, 0) != 1;
 
   fclose(stream);
   if (error)
   {
     NS_WARNING("failed to write trait data.");
     // delete the trait data file, since it is probably corrupt.
-    mTraitFile->Remove(PR_FALSE);
+    mTraitFile->Remove(false);
   }
 
   if (shrink)
   {
     // We'll clear the tokens, and read them back in from the file.
     // Yes this is slower than in place, but this is a rare event.
 
     if (countTokens())
@@ -2626,18 +2626,18 @@ void CorpusStore::readTrainingData()
 
   // FIXME:  should make sure that the tokenizers are empty.
   char cookie[4];
   PRUint32 goodMessageCount, junkMessageCount;
   if (!((fread(cookie, sizeof(cookie), 1, stream) == 1) &&
         (memcmp(cookie, kMagicCookie, sizeof(cookie)) == 0) &&
         (readUInt32(stream, &goodMessageCount) == 1) &&
         (readUInt32(stream, &junkMessageCount) == 1) &&
-         readTokens(stream, fileSize, kGoodTrait, PR_TRUE) &&
-         readTokens(stream, fileSize, kJunkTrait, PR_TRUE))) {
+         readTokens(stream, fileSize, kGoodTrait, true) &&
+         readTokens(stream, fileSize, kJunkTrait, true))) {
       NS_WARNING("failed to read training data.");
       PR_LOG(BayesianFilterLogModule, PR_LOG_ERROR, ("failed to read training data."));
   }
   setMessageCount(kGoodTrait, goodMessageCount);
   setMessageCount(kJunkTrait, junkMessageCount);
 
   fclose(stream);
 
@@ -2651,17 +2651,17 @@ void CorpusStore::readTrainingData()
     if (!mTraitFile)
      return;
   }
 
   rv = mTraitFile->Exists(&exists);
   if (NS_FAILED(rv) || !exists)
     return;
 
-  rv = UpdateData(mTraitFile, PR_TRUE, 0, nsnull, nsnull);
+  rv = UpdateData(mTraitFile, true, 0, nsnull, nsnull);
 
   if (NS_FAILED(rv))
   {
     NS_WARNING("failed to read training data.");
     PR_LOG(BayesianFilterLogModule, PR_LOG_ERROR, ("failed to read training data."));
   }
   return;
 }
@@ -2672,19 +2672,19 @@ nsresult CorpusStore::resetTrainingData(
   if (countTokens())
     clearTokens();
 
   PRUint32 length = mMessageCounts.Length();
   for (PRUint32 index = 0 ; index < length; index++)
     mMessageCounts[index] = 0;
 
   if (mTrainingFile)
-    mTrainingFile->Remove(PR_FALSE);
+    mTrainingFile->Remove(false);
   if (mTraitFile)
-    mTraitFile->Remove(PR_FALSE);
+    mTraitFile->Remove(false);
   return NS_OK;
 }
 
 inline CorpusToken* CorpusStore::get(const char* word)
 {
   return static_cast<CorpusToken*>(TokenHash::get(word));
 }
 
--- a/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h
+++ b/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h
@@ -288,17 +288,17 @@ public:
      *                    [0xFCA93601]  (the 01 is the version)
      *                    for each trait to write:
      *                    [id of trait to write] (0 means end of list)
      *                    [number of messages per trait]
      *                    for each token with non-zero count
      *                    [count]
      *                    [length of word]word
      *
-     * @param aIsAdd      should the data be added, or removed? PR_TRUE if adding,
+     * @param aIsAdd      should the data be added, or removed? true if adding,
      *                    else removing.
      *
      * @param aRemapCount number of items in the parallel arrays aFromTraits,
      *                    aToTraits. These arrays allow conversion of the
      *                    trait id stored in the file (which may be originated
      *                    externally) to the trait id used in the local corpus
      *                    (which is defined locally using nsIMsgTraitService).
      *
--- a/mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
+++ b/mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
@@ -109,20 +109,20 @@ char DispositionTypes[7][16] = {
 };
 
 NS_IMPL_ISUPPORTS2(nsMsgMdnGenerator, nsIMsgMdnGenerator, nsIUrlListener)
 
 nsMsgMdnGenerator::nsMsgMdnGenerator()
 {
     m_disposeType = eDisplayed;
     m_outputStream = nsnull;
-    m_reallySendMdn = PR_FALSE;
-    m_autoSend = PR_FALSE;
-    m_autoAction = PR_FALSE;
-    m_mdnEnabled = PR_FALSE;
+    m_reallySendMdn = false;
+    m_autoSend = false;
+    m_autoAction = false;
+    m_mdnEnabled = false;
     m_notInToCcOp = eNeverSendOp;
     m_outsideDomainOp = eNeverSendOp;
     m_otherOp = eNeverSendOp;
 }
 
 nsMsgMdnGenerator::~nsMsgMdnGenerator()
 {
 }
@@ -173,34 +173,34 @@ nsresult nsMsgMdnGenerator::GetStringFro
 nsresult nsMsgMdnGenerator::StoreMDNSentFlag(nsIMsgFolder *folder,
                                              nsMsgKey key)
 {
     DEBUG_MDN("nsMsgMdnGenerator::StoreMDNSentFlag");
 
     nsCOMPtr<nsIMsgDatabase> msgDB;
     nsresult rv = folder->GetMsgDatabase(getter_AddRefs(msgDB));
     NS_ENSURE_SUCCESS(rv, rv);
-    rv = msgDB->MarkMDNSent(key, PR_TRUE, nsnull);
+    rv = msgDB->MarkMDNSent(key, true, nsnull);
 
     nsCOMPtr<nsIMsgImapMailFolder> imapFolder = do_QueryInterface(folder);
     // Store the $MDNSent flag if the folder is an Imap Mail Folder
     if (imapFolder)
-      return imapFolder->StoreImapFlags(kImapMsgMDNSentFlag, PR_TRUE, &key, 1, nsnull);
+      return imapFolder->StoreImapFlags(kImapMsgMDNSentFlag, true, &key, 1, nsnull);
     return rv;
 }
 
 nsresult nsMsgMdnGenerator::ClearMDNNeededFlag(nsIMsgFolder *folder,
                                                nsMsgKey key)
 {
   DEBUG_MDN("nsMsgMdnGenerator::ClearMDNNeededFlag");
 
   nsCOMPtr<nsIMsgDatabase> msgDB;
   nsresult rv = folder->GetMsgDatabase(getter_AddRefs(msgDB));
   NS_ENSURE_SUCCESS(rv, rv);
-  return msgDB->MarkMDNNeeded(key, PR_FALSE, nsnull);
+  return msgDB->MarkMDNNeeded(key, false, nsnull);
 }
 
 bool nsMsgMdnGenerator::ProcessSendMode()
 {
     DEBUG_MDN("nsMsgMdnGenerator::ProcessSendMode");
     PRInt32 miscState = 0;
 
     if (m_identity)
@@ -209,107 +209,107 @@ bool nsMsgMdnGenerator::ProcessSendMode(
         if (m_email.IsEmpty())
             return m_reallySendMdn;
 
         const char *accountDomain = strchr(m_email.get(), '@');
         if (!accountDomain)
             return m_reallySendMdn;
 
         if (MailAddrMatch(m_email.get(), m_dntRrt.get())) // return address is self, don't send
-          return PR_FALSE;
+          return false;
 
         // *** fix me see Bug 132504 for more information
         // *** what if the message has been filtered to different account
         if (!PL_strcasestr(m_dntRrt.get(), accountDomain))
             miscState |= MDN_OUTSIDE_DOMAIN;
         if (NotInToOrCc())
             miscState |= MDN_NOT_IN_TO_CC;
-        m_reallySendMdn = PR_TRUE;
+        m_reallySendMdn = true;
         // *********
         // How are we gona deal with the auto forwarding issues? Some server
         // didn't bother to add addition header or modify existing header to
         // thev message when forwarding. They simply copy the exact same
         // message to another user's mailbox. Some change To: to
         // Apparently-To:
         // Unfortunately, there is nothing we can do. It's out of our control.
         // *********
         // starting from lowest denominator to highest
         if (!miscState)
         {   // under normal situation: recipent is in to and cc list,
             // and the sender is from the same domain
             switch (m_otherOp)
             {
             default:
             case eNeverSendOp:
-                m_reallySendMdn = PR_FALSE;
+                m_reallySendMdn = false;
                 break;
             case eAutoSendOp:
-                m_autoSend = PR_TRUE;
+                m_autoSend = true;
                 break;
             case eAskMeOp:
-                m_autoSend = PR_FALSE;
+                m_autoSend = false;
                 break;
             case eDeniedOp:
-                m_autoSend = PR_TRUE;
+                m_autoSend = true;
                 m_disposeType = eDenied;
                 break;
             }
         }
         else if (miscState == (MDN_OUTSIDE_DOMAIN | MDN_NOT_IN_TO_CC))
         {
             if (m_outsideDomainOp != m_notInToCcOp)
             {
-                m_autoSend = PR_FALSE; // ambiguous; always ask user
+                m_autoSend = false; // ambiguous; always ask user
             }
             else
             {
                 switch (m_outsideDomainOp)
                 {
                 default:
                 case eNeverSendOp:
-                    m_reallySendMdn = PR_FALSE;
+                    m_reallySendMdn = false;
                     break;
                 case eAutoSendOp:
-                    m_autoSend = PR_TRUE;
+                    m_autoSend = true;
                     break;
                 case eAskMeOp:
-                    m_autoSend = PR_FALSE;
+                    m_autoSend = false;
                     break;
                 }
             }
         }
         else if (miscState & MDN_OUTSIDE_DOMAIN)
         {
             switch (m_outsideDomainOp)
             {
             default:
             case eNeverSendOp:
-                m_reallySendMdn = PR_FALSE;
+                m_reallySendMdn = false;
                 break;
             case eAutoSendOp:
-                m_autoSend = PR_TRUE;
+                m_autoSend = true;
                 break;
             case eAskMeOp:
-                m_autoSend = PR_FALSE;
+                m_autoSend = false;
                 break;
             }
         }
         else if (miscState & MDN_NOT_IN_TO_CC)
         {
             switch (m_notInToCcOp)
             {
             default:
             case eNeverSendOp:
-                m_reallySendMdn = PR_FALSE;
+                m_reallySendMdn = false;
                 break;
             case eAutoSendOp:
-                m_autoSend = PR_TRUE;
+                m_autoSend = true;
                 break;
             case eAskMeOp:
-                m_autoSend = PR_FALSE;
+                m_autoSend = false;
                 break;
             }
         }
     }
     return m_reallySendMdn;
 }
 
 bool nsMsgMdnGenerator::MailAddrMatch(const char *addr1, const char *addr2)
@@ -319,81 +319,81 @@ bool nsMsgMdnGenerator::MailAddrMatch(co
     // insensitive
     DEBUG_MDN("nsMsgMdnGenerator::MailAddrMatch");
     bool isMatched = true;
     const char *atSign1 = nsnull, *atSign2 = nsnull;
     const char *lt = nsnull, *local1 = nsnull, *local2 = nsnull;
     const char *end1 = nsnull, *end2 = nsnull;
 
     if (!addr1 || !addr2)
-        return PR_FALSE;
+        return false;
 
     lt = strchr(addr1, '<');
     local1 = !lt ? addr1 : lt+1;
     lt = strchr(addr2, '<');
     local2 = !lt ? addr2 : lt+1;
     end1 = strchr(local1, '>');
     if (!end1)
         end1 = addr1 + strlen(addr1);
     end2 = strchr(local2, '>');
     if (!end2)
         end2 = addr2 + strlen(addr2);
     atSign1 = strchr(local1, '@');
     atSign2 = strchr(local2, '@');
     if (!atSign1 || !atSign2 // ill formed addr spec
         || (atSign1 - local1) != (atSign2 - local2))
-        isMatched = PR_FALSE;
+        isMatched = false;
     else if (strncmp(local1, local2, (atSign1-local1))) // case sensitive
         // compare for local part
-        isMatched = PR_FALSE;
+        isMatched = false;
     else if ((end1 - atSign1) != (end2 - atSign2) ||
              PL_strncasecmp(atSign1, atSign2, (end1-atSign1))) // case
         // insensitive compare for domain part
-        isMatched = PR_FALSE;
+        isMatched = false;
     return isMatched;
 }
 
 bool nsMsgMdnGenerator::NotInToOrCc()
 {
     DEBUG_MDN("nsMsgMdnGenerator::NotInToOrCc");
     nsCString reply_to;
     nsCString to;
     nsCString cc;
 
     m_identity->GetReplyTo(reply_to);
-    m_headers->ExtractHeader(HEADER_TO, PR_TRUE, getter_Copies(to));
-    m_headers->ExtractHeader(HEADER_CC, PR_TRUE, getter_Copies(cc));
+    m_headers->ExtractHeader(HEADER_TO, true, getter_Copies(to));
+    m_headers->ExtractHeader(HEADER_CC, true, getter_Copies(cc));
 
   // start with a simple check
   if ((!to.IsEmpty() && PL_strcasestr(to.get(), m_email.get())) ||
       (!cc.IsEmpty() && PL_strcasestr(cc.get(), m_email.get()))) {
-      return PR_FALSE;
+      return false;
   }
 
   if ((!reply_to.IsEmpty() && !to.IsEmpty() && PL_strcasestr(to.get(), reply_to.get())) ||
       (!reply_to.IsEmpty() && !cc.IsEmpty() && PL_strcasestr(cc.get(), reply_to.get()))) {
-      return PR_FALSE;
+      return false;
   }
-  return PR_TRUE;
+  return true;
 }
 
 bool nsMsgMdnGenerator::ValidateReturnPath()
 {
     DEBUG_MDN("nsMsgMdnGenerator::ValidateReturnPath");
     // ValidateReturnPath applies to Automatic Send Mode only. If we were not
     // in auto send mode we simply by passing the check
     if (!m_autoSend)
         return m_reallySendMdn;
 
     nsCString returnPath;
-    m_headers->ExtractHeader(HEADER_RETURN_PATH, PR_FALSE,
+    m_headers->ExtractHeader(HEADER_RETURN_PATH, false,
                              getter_Copies(returnPath));
     if (returnPath.IsEmpty())
     {
-      m_autoSend = PR_FALSE;
+      m_autoSend = false;
       return m_reallySendMdn;
     }
     m_autoSend = MailAddrMatch(returnPath.get(), m_dntRrt.get());
     return m_reallySendMdn;
 }
 
 nsresult nsMsgMdnGenerator::CreateMdnMsg()
 {
@@ -426,17 +426,17 @@ nsresult nsMsgMdnGenerator::CreateMdnMsg
     }
 
     if (m_outputStream)
     {
         m_outputStream->Flush();
         m_outputStream->Close();
     }
     if (NS_FAILED(rv))
-        m_file->Remove(PR_FALSE);
+        m_file->Remove(false);
     else
         rv = SendMdnMsg();
 
     return NS_OK;
 }
 
 nsresult nsMsgMdnGenerator::CreateFirstPart()
 {
@@ -501,17 +501,17 @@ nsresult nsMsgMdnGenerator::CreateFirstP
     {
         // convert fullName to UTF8 before passing it to MakeFullAddressString
         parser->MakeFullAddressString(NS_ConvertUTF16toUTF8(fullName).get(),
                                       m_email.get(), getter_Copies(fullAddress));
     }
 
     convbuf = nsMsgI18NEncodeMimePartIIStr(
         (!fullAddress.IsEmpty()) ? fullAddress.get(): m_email.get(),
-        PR_TRUE, m_charset.get(), 0, conformToStandard);
+        true, m_charset.get(), 0, conformToStandard);
 
     parm = PR_smprintf("From: %s" CRLF, convbuf ? convbuf : m_email.get());
 
     rv = FormatStringFromName(NS_LITERAL_STRING("MsgMdnMsgSentTo").get(), NS_ConvertASCIItoUTF16(m_email).get(),
                             getter_Copies(firstPart1));
     if (NS_FAILED(rv))
         return rv;
 
@@ -565,42 +565,42 @@ nsresult nsMsgMdnGenerator::CreateFirstP
         break;
     }
 
     if (NS_FAILED(rv))
         return rv;
 
     receipt_string.AppendLiteral(" - ");
 
-    char * encodedReceiptString = nsMsgI18NEncodeMimePartIIStr(NS_ConvertUTF16toUTF8(receipt_string).get(), PR_FALSE,
+    char * encodedReceiptString = nsMsgI18NEncodeMimePartIIStr(NS_ConvertUTF16toUTF8(receipt_string).get(), false,
                                                                "UTF-8", 0, conformToStandard);
 
     nsCString subject;
-    m_headers->ExtractHeader(HEADER_SUBJECT, PR_FALSE, getter_Copies(subject));
+    m_headers->ExtractHeader(HEADER_SUBJECT, false, getter_Copies(subject));
     convbuf = nsMsgI18NEncodeMimePartIIStr(subject.Length() ? subject.get() : "[no subject]",
-                                           PR_FALSE, m_charset.get(), 0, conformToStandard);
+                                           false, m_charset.get(), 0, conformToStandard);
     tmpBuffer = PR_smprintf("Subject: %s%s" CRLF,
                              encodedReceiptString,
                             (convbuf ? convbuf : (subject.Length() ? subject.get() :
                               "[no subject]")));
 
     PUSH_N_FREE_STRING(tmpBuffer);
     PR_Free(convbuf);
     PR_Free(encodedReceiptString);
 
-    convbuf = nsMsgI18NEncodeMimePartIIStr(m_dntRrt.get(), PR_TRUE, m_charset.get(), 0, conformToStandard);
+    convbuf = nsMsgI18NEncodeMimePartIIStr(m_dntRrt.get(), true, m_charset.get(), 0, conformToStandard);
     tmpBuffer = PR_smprintf("To: %s" CRLF, convbuf ? convbuf :
                             m_dntRrt.get());
     PUSH_N_FREE_STRING(tmpBuffer);
 
     PR_Free(convbuf);
 
   // *** This is not in the spec. I am adding this so we could do
   // threading
-    m_headers->ExtractHeader(HEADER_MESSAGE_ID, PR_FALSE,
+    m_headers->ExtractHeader(HEADER_MESSAGE_ID, false,
                              getter_Copies(m_messageId));
 
     if (!m_messageId.IsEmpty())
     {
       if (*m_messageId.get() == '<')
           tmpBuffer = PR_smprintf("References: %s" CRLF, m_messageId.get());
       else
           tmpBuffer = PR_smprintf("References: <%s>" CRLF, m_messageId.get());
@@ -723,32 +723,32 @@ nsresult nsMsgMdnGenerator::CreateSecond
 
         tmpBuffer = PR_smprintf("Reporting-UA: %s" CRLF,
                                 userAgentString.get());
         PUSH_N_FREE_STRING(tmpBuffer);
       }
     }
 
     nsCString originalRecipient;
-    m_headers->ExtractHeader(HEADER_ORIGINAL_RECIPIENT, PR_FALSE,
+    m_headers->ExtractHeader(HEADER_ORIGINAL_RECIPIENT, false,
                              getter_Copies(originalRecipient));
 
     if (!originalRecipient.IsEmpty())
     {
         tmpBuffer = PR_smprintf("Original-Recipient: %s" CRLF,
                                 originalRecipient.get());
         PUSH_N_FREE_STRING(tmpBuffer);
     }
 
     compUtils = do_GetService(NS_MSGCOMPUTILS_CONTRACTID, &rv);
     if (compUtils)
       compUtils->GetMsgMimeConformToStandard(&conformToStandard);
 
     convbuf = nsMsgI18NEncodeMimePartIIStr(
-        m_email.get(), PR_TRUE, m_charset.get(), 0,
+        m_email.get(), true, m_charset.get(), 0,
         conformToStandard);
     tmpBuffer = PR_smprintf("Final-Recipient: rfc822;%s" CRLF, convbuf ?
                             convbuf : m_email.get());
     PUSH_N_FREE_STRING(tmpBuffer);
 
     PR_Free (convbuf);
 
     if (*m_messageId.get() == '<')
@@ -889,17 +889,17 @@ nsresult nsMsgMdnGenerator::SendMdnMsg()
 {
     DEBUG_MDN("nsMsgMdnGenerator::SendMdnMsg");
     nsresult rv;
     nsCOMPtr<nsISmtpService> smtpService = do_GetService(NS_SMTPSERVICE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv,rv);
 
     nsCOMPtr<nsIRequest> aRequest;
     smtpService->SendMailMessage(m_file, m_dntRrt.get(), m_identity,
-                                     nsnull, this, nsnull, nsnull, PR_FALSE, nsnull,
+                                     nsnull, this, nsnull, nsnull, false, nsnull,
                                      getter_AddRefs(aRequest));
 
     return NS_OK;
 }
 
 nsresult nsMsgMdnGenerator::WriteString( const char *str )
 {
   NS_ENSURE_ARG (str);
@@ -917,31 +917,31 @@ nsresult nsMsgMdnGenerator::InitAndProce
         do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
     if (accountManager && m_server)
     {
         if (!m_identity)
         {
           // check if this is a message delivered to the global inbox,
           // in which case we find the originating account's identity.
           nsCString accountKey;
-          m_headers->ExtractHeader(HEADER_X_MOZILLA_ACCOUNT_KEY, PR_FALSE,
+          m_headers->ExtractHeader(HEADER_X_MOZILLA_ACCOUNT_KEY, false,
                                getter_Copies(accountKey));
           nsCOMPtr <nsIMsgAccount> account;
           if (!accountKey.IsEmpty())
             accountManager->GetAccount(accountKey, getter_AddRefs(account));
           if (account)
             account->GetIncomingServer(getter_AddRefs(m_server));
 
           if (m_server)
           {
             // Find the correct identity based on the "To:" and "Cc:" header
             nsCString mailTo;
             nsCString mailCC;
-            m_headers->ExtractHeader(HEADER_TO, PR_TRUE, getter_Copies(mailTo));
-            m_headers->ExtractHeader(HEADER_CC, PR_TRUE, getter_Copies(mailCC));
+            m_headers->ExtractHeader(HEADER_TO, true, getter_Copies(mailTo));
+            m_headers->ExtractHeader(HEADER_CC, true, getter_Copies(mailCC));
             nsCOMPtr<nsISupportsArray> servIdentities;
             accountManager->GetIdentitiesForServer(m_server, getter_AddRefs(servIdentities));
             if (servIdentities)
             {
               nsCOMPtr<nsIMsgIdentity> ident;
               nsCString identEmail;
               PRUint32 count = 0;
               servIdentities->Count(&count);
@@ -1021,31 +1021,31 @@ nsresult nsMsgMdnGenerator::InitAndProce
                 }
             }
         }
     }
 
     rv = m_folder->GetCharset(m_charset);
     if (m_mdnEnabled)
     {
-        m_headers->ExtractHeader(HEADER_DISPOSITION_NOTIFICATION_TO, PR_FALSE,
+        m_headers->ExtractHeader(HEADER_DISPOSITION_NOTIFICATION_TO, false,
                                  getter_Copies(m_dntRrt));
         if (m_dntRrt.IsEmpty())
-            m_headers->ExtractHeader(HEADER_RETURN_RECEIPT_TO, PR_FALSE,
+            m_headers->ExtractHeader(HEADER_RETURN_RECEIPT_TO, false,
                                      getter_Copies(m_dntRrt));
         if (!m_dntRrt.IsEmpty() && ProcessSendMode() && ValidateReturnPath())
         {
             if (!m_autoSend)
             {
-                *needToAskUser = PR_TRUE;
+                *needToAskUser = true;
                 rv = NS_OK;
             }
             else
             {
-                *needToAskUser = PR_FALSE;
+                *needToAskUser = false;
                 rv = UserAgreed();
             }
         }
     }
     return rv;
 }
 
 NS_IMETHODIMP nsMsgMdnGenerator::Process(EDisposeType type,
@@ -1107,17 +1107,17 @@ NS_IMETHODIMP nsMsgMdnGenerator::OnStart
 
 NS_IMETHODIMP nsMsgMdnGenerator::OnStopRunningUrl(nsIURI *url,
                                                   nsresult aExitCode)
 {
     nsresult rv;
 
     DEBUG_MDN("nsMsgMdnGenerator::OnStopRunningUrl");
     if (m_file)
-      m_file->Remove(PR_FALSE);
+      m_file->Remove(false);
 
     if (NS_SUCCEEDED(aExitCode))
       return NS_OK;
 
     switch (aExitCode)
     {    
       case NS_ERROR_UNKNOWN_HOST:
       case NS_ERROR_UNKNOWN_PROXY_HOST:
--- a/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp
+++ b/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp
@@ -133,17 +133,17 @@ GenerateGlobalRandomBytes(unsigned char 
   
   if (firstTime)
   {
     // Seed the random-number generator with current time so that
     // the numbers will be different every time we run.
     PRInt32 aTime;
     LL_L2I(aTime, PR_Now());
     srand( (unsigned)aTime );
-    firstTime = PR_FALSE;
+    firstTime = false;
   }
   
   for( PRInt32 i = 0; i < len; i++ )
     buf[i] = rand() % 10;
 }
    
 char 
 *mime_make_separator(const char *prefix)
@@ -165,17 +165,17 @@ char
 
 /////////////////////////////////////////////////////////////////////////////////////////
 // Implementation of nsMsgSMIMEComposeFields
 /////////////////////////////////////////////////////////////////////////////////////////
 
 NS_IMPL_ISUPPORTS1(nsMsgSMIMEComposeFields, nsIMsgSMIMECompFields)
 
 nsMsgSMIMEComposeFields::nsMsgSMIMEComposeFields()
-:mSignMessage(PR_FALSE), mAlwaysEncryptMessage(PR_FALSE)
+:mSignMessage(false), mAlwaysEncryptMessage(false)
 {
 }
 
 nsMsgSMIMEComposeFields::~nsMsgSMIMEComposeFields()
 {
 }
 
 NS_IMETHODIMP nsMsgSMIMEComposeFields::SetSignMessage(bool value)
@@ -225,40 +225,40 @@ nsMsgComposeSecure::~nsMsgComposeSecure(
     if (mBufferedBytes) {
       mEncryptionContext->Update(mBuffer, mBufferedBytes);
       mBufferedBytes = 0;
     }
     mEncryptionContext->Finish();
   }
 
   if (mSigEncoderData) {
-    MIME_EncoderDestroy (mSigEncoderData, PR_TRUE);
+    MIME_EncoderDestroy (mSigEncoderData, true);
   }
   if (mCryptoEncoderData) {
-    MIME_EncoderDestroy (mCryptoEncoderData, PR_TRUE);
+    MIME_EncoderDestroy (mCryptoEncoderData, true);
   }
 
   delete [] mBuffer;
 
   PR_FREEIF(mMultipartSignedBoundary);
 }
 
 NS_IMETHODIMP nsMsgComposeSecure::RequiresCryptoEncapsulation(nsIMsgIdentity * aIdentity, nsIMsgCompFields * aCompFields, bool * aRequiresEncryptionWork)
 {
   NS_ENSURE_ARG_POINTER(aRequiresEncryptionWork);
 
   nsresult rv = NS_OK;
-  *aRequiresEncryptionWork = PR_FALSE;
+  *aRequiresEncryptionWork = false;
 
   bool alwaysEncryptMessages = false;
   bool signMessage = false;
   rv = ExtractEncryptionState(aIdentity, aCompFields, &signMessage, &alwaysEncryptMessages);
 
   if (alwaysEncryptMessages || signMessage)
-    *aRequiresEncryptionWork = PR_TRUE;
+    *aRequiresEncryptionWork = true;
 
   return NS_OK;
 }
 
 
 nsresult nsMsgComposeSecure::GetSMIMEBundleString(const PRUnichar *name,
                                                   PRUnichar **outString)
 {
@@ -286,60 +286,60 @@ SMIMEBundleFormatStringFromName(const PR
 
   return mSMIMEBundle->FormatStringFromName(name, params,
                                             numParams, outString);
 }
 
 bool nsMsgComposeSecure::InitializeSMIMEBundle()
 {
   if (mSMIMEBundle)
-    return PR_TRUE;
+    return true;
 
   nsCOMPtr<nsIStringBundleService> bundleService =
     do_GetService(NS_STRINGBUNDLE_CONTRACTID);
   nsresult rv = bundleService->CreateBundle(SMIME_STRBUNDLE_URL,
                                             getter_AddRefs(mSMIMEBundle));
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
-  return PR_TRUE;
+  return true;
 }
 
 void nsMsgComposeSecure::SetError(nsIMsgSendReport *sendReport, const PRUnichar *bundle_string)
 {
   if (!sendReport || !bundle_string)
     return;
 
   if (mErrorAlreadyReported)
     return;
 
-  mErrorAlreadyReported = PR_TRUE;
+  mErrorAlreadyReported = true;
   
   nsString errorString;
   nsresult res;
 
   res = GetSMIMEBundleString(bundle_string,
                              getter_Copies(errorString));
 
   if (NS_SUCCEEDED(res) && !errorString.IsEmpty())
   {
     sendReport->SetMessage(nsIMsgSendReport::process_Current,
                            errorString.get(),
-                           PR_TRUE);
+                           true);
   }
 }
 
 void nsMsgComposeSecure::SetErrorWithParam(nsIMsgSendReport *sendReport, const PRUnichar *bundle_string, const char *param)
 {
   if (!sendReport || !bundle_string || !param)
     return;
 
   if (mErrorAlreadyReported)
     return;
 
-  mErrorAlreadyReported = PR_TRUE;
+  mErrorAlreadyReported = true;
   
   nsString errorString;
   nsresult res;
   const PRUnichar *params[1];
 
   NS_ConvertASCIItoUTF16 ucs2(param);
   params[0]= ucs2.get();
 
@@ -347,17 +347,17 @@ void nsMsgComposeSecure::SetErrorWithPar
                                         params,
                                         1,
                                         getter_Copies(errorString));
 
   if (NS_SUCCEEDED(res) && !errorString.IsEmpty())
   {
     sendReport->SetMessage(nsIMsgSendReport::process_Current,
                            errorString.get(),
-                           PR_TRUE);
+                           true);
   }
 }
 
 nsresult nsMsgComposeSecure::ExtractEncryptionState(nsIMsgIdentity * aIdentity, nsIMsgCompFields * aComposeFields, bool * aSignMessage, bool * aEncrypt)
 {
   if (!aComposeFields && !aIdentity)
     return NS_ERROR_FAILURE; // kick out...invalid args....
 
@@ -378,39 +378,39 @@ nsresult nsMsgComposeSecure::ExtractEncr
       return NS_OK;
     }
   }
 
   // get the default info from the identity....
   PRInt32 ep = 0;
   nsresult testrv = aIdentity->GetIntAttribute("encryptionpolicy", &ep);
   if (NS_FAILED(testrv)) {
-    *aEncrypt = PR_FALSE;
+    *aEncrypt = false;
   }
   else {
     *aEncrypt = (ep > 0);
   }
 
   testrv = aIdentity->GetBoolAttribute("sign_mail", aSignMessage);
   if (NS_FAILED(testrv))
   {
-    *aSignMessage = PR_FALSE;
+    *aSignMessage = false;
   }
   return NS_OK;
 }
 
 /* void beginCryptoEncapsulation (in nsOutputFileStream aStream, in boolean aEncrypt, in boolean aSign, in string aRecipeints, in boolean aIsDraft); */
 NS_IMETHODIMP nsMsgComposeSecure::BeginCryptoEncapsulation(nsIOutputStream * aStream,
                                                            const char * aRecipients,
                                                            nsIMsgCompFields * aCompFields,
                                                            nsIMsgIdentity * aIdentity,
                                                            nsIMsgSendReport *sendReport,
                                                            bool aIsDraft)
 {
-  mErrorAlreadyReported = PR_FALSE;
+  mErrorAlreadyReported = false;
   nsresult rv = NS_OK;
 
   bool encryptMessages = false;
   bool signMessage = false;
   ExtractEncryptionState(aIdentity, aCompFields, &signMessage, &encryptMessages);
 
   if (!signMessage && !encryptMessages) return NS_ERROR_FAILURE;
 
@@ -432,27 +432,27 @@ NS_IMETHODIMP nsMsgComposeSecure::BeginC
   rv = MimeCryptoHackCerts(aRecipients, sendReport, encryptMessages, signMessage);
   if (NS_FAILED(rv)) {
     goto FAIL;
   }
 
   switch (mCryptoState)
   {
   case mime_crypto_clear_signed:
-    rv = MimeInitMultipartSigned(PR_TRUE, sendReport);
+    rv = MimeInitMultipartSigned(true, sendReport);
     break;
   case mime_crypto_opaque_signed:
     PR_ASSERT(0);    /* #### no api for this yet */
     rv = NS_ERROR_NOT_IMPLEMENTED;
     break;
   case mime_crypto_signed_encrypted:
-    rv = MimeInitEncryption(PR_TRUE, sendReport);
+    rv = MimeInitEncryption(true, sendReport);
     break;
   case mime_crypto_encrypted:
-    rv = MimeInitEncryption(PR_FALSE, sendReport);
+    rv = MimeInitEncryption(false, sendReport);
     break;
   case mime_crypto_none:
     /* This can happen if mime_crypto_hack_certs() decided to turn off
      encryption (by asking the user.) */
     rv = 1;
     break;
   default:
     PR_ASSERT(0);
@@ -466,27 +466,27 @@ FAIL:
 /* void finishCryptoEncapsulation (in boolean aAbort); */
 NS_IMETHODIMP nsMsgComposeSecure::FinishCryptoEncapsulation(bool aAbort, nsIMsgSendReport *sendReport)
 {
   nsresult rv = NS_OK;
 
   if (!aAbort) {
     switch (mCryptoState) {
     case mime_crypto_clear_signed:
-      rv = MimeFinishMultipartSigned (PR_TRUE, sendReport);
+      rv = MimeFinishMultipartSigned (true, sendReport);
       break;
     case mime_crypto_opaque_signed:
       PR_ASSERT(0);    /* #### no api for this yet */
       rv = NS_ERROR_FAILURE;
       break;
     case mime_crypto_signed_encrypted:
-      rv = MimeFinishEncryption (PR_TRUE, sendReport);
+      rv = MimeFinishEncryption (true, sendReport);
       break;
     case mime_crypto_encrypted:
-      rv = MimeFinishEncryption (PR_FALSE, sendReport);
+      rv = MimeFinishEncryption (false, sendReport);
       break;
     default:
       PR_ASSERT(0);
       rv = NS_ERROR_FAILURE;
       break;
     }
   }
   return rv;
@@ -630,17 +630,17 @@ nsresult nsMsgComposeSecure::MimeInitEnc
     SetError(sendReport, NS_LITERAL_STRING("ErrorCanNotEncrypt").get());
     goto FAIL;
   }
 
   /* If we're signing, tack a multipart/signed header onto the front of
    the data to be encrypted, and initialize the sign-hashing code too.
    */
   if (aSign) {
-    rv = MimeInitMultipartSigned(PR_FALSE, sendReport);
+    rv = MimeInitMultipartSigned(false, sendReport);
     if (NS_FAILED(rv)) goto FAIL;
   }
 
  FAIL:
   return rv;
 }
 
 nsresult nsMsgComposeSecure::MimeFinishMultipartSigned (bool aOuter, nsIMsgSendReport *sendReport)
@@ -670,17 +670,17 @@ nsresult nsMsgComposeSecure::MimeFinishM
                                  getter_Copies(mime_smime_sig_content_desc));
 
   NS_ConvertUTF16toUTF8 sig_content_desc_utf8(mime_smime_sig_content_desc);
 
   /* Compute the hash...
    */
 
   nsCAutoString hashString;
-  mDataHash->Finish(PR_FALSE, hashString);
+  mDataHash->Finish(false, hashString);
 
   mDataHash = 0;
 
   status = PR_GetError();
   if (status < 0) goto FAIL;
 
   /* Write out the headers for the signature.
    */
@@ -758,17 +758,17 @@ nsresult nsMsgComposeSecure::MimeFinishM
   rv = encoder->Finish();
   if (NS_FAILED(rv)) {
     SetError(sendReport, NS_LITERAL_STRING("ErrorCanNotSign").get());
     goto FAIL;
   }
 
   /* Shut down the sig's base64 encoder.
    */
-  rv = MIME_EncoderDestroy(mSigEncoderData, PR_FALSE);
+  rv = MIME_EncoderDestroy(mSigEncoderData, false);
   mSigEncoderData = 0;
   if (NS_FAILED(rv)) {
     goto FAIL;
   }
 
   /* Now write out the terminating boundary.
    */
   {
@@ -805,17 +805,17 @@ FAIL:
  */
 nsresult nsMsgComposeSecure::MimeFinishEncryption (bool aSign, nsIMsgSendReport *sendReport)
 {
   nsresult rv;
 
   /* If this object is both encrypted and signed, close off the
    signature first (since it's inside.) */
   if (aSign) {
-    rv = MimeFinishMultipartSigned (PR_FALSE, sendReport);
+    rv = MimeFinishMultipartSigned (false, sendReport);
     if (NS_FAILED(rv)) {
       goto FAIL;
     }
   }
 
   /* Close off the opaque encrypted blob.
    */
   PR_ASSERT(mEncryptionContext);
@@ -841,17 +841,17 @@ nsresult nsMsgComposeSecure::MimeFinishE
   if (!mEncryptionCinfo) {
     rv = NS_ERROR_FAILURE;
   }
   if (mEncryptionCinfo) {
     mEncryptionCinfo = 0;
   }
 
   /* Shut down the base64 encoder. */
-  rv = MIME_EncoderDestroy(mCryptoEncoderData, PR_FALSE);
+  rv = MIME_EncoderDestroy(mCryptoEncoderData, false);
   mCryptoEncoderData = 0;
 
   PRUint32 n;
   rv = mStream->Write(CRLF, 2, &n);
   if (NS_FAILED(rv) || n < 2)
     rv = NS_ERROR_FAILURE;
 
  FAIL:
@@ -930,49 +930,49 @@ nsresult nsMsgComposeSecure::MimeCryptoH
       if (cert) {
         PRUint32 verification_result;
 
         if (NS_SUCCEEDED(
             cert->VerifyForUsage(nsIX509Cert::CERT_USAGE_EmailRecipient, &verification_result))
             &&
             nsIX509Cert::VERIFIED_OK == verification_result)
         {
-          foundValidCert = PR_TRUE;
+          foundValidCert = true;
         }
       }
       
       if (!foundValidCert) {
         // Failure to find a valid encryption cert is fatal.
         // here I assume that mailbox contains ascii rather than utf8.
         SetErrorWithParam(sendReport, NS_LITERAL_STRING("MissingRecipientEncryptionCert").get(), mailbox);
         res = NS_ERROR_FAILURE;
         goto FAIL;
       }
 
     /* #### see if recipient requests `signedData'.
-     if (...) no_clearsigning_p = PR_TRUE;
+     if (...) no_clearsigning_p = true;
      (This is the only reason we even bother looking up the certs
      of the recipients if we're sending a signed-but-not-encrypted
      message.)
      */
 
       bool isSame;
       if (NS_SUCCEEDED(cert->Equals(mSelfEncryptionCert, &isSame))
           && isSame) {
-        already_added_self_cert = PR_TRUE;
+        already_added_self_cert = true;
       }
 
-      mCerts->AppendElement(cert, PR_FALSE);
+      mCerts->AppendElement(cert, false);
       // To understand this loop, especially the "+= strlen +1", look at the documentation
       // of ParseHeaderAddresses. Basically, it returns a list of zero terminated strings.
       mailbox += strlen(mailbox) + 1;
     }
     
     if (!already_added_self_cert) {
-      mCerts->AppendElement(mSelfEncryptionCert, PR_FALSE);
+      mCerts->AppendElement(mSelfEncryptionCert, false);
     }
   }
 FAIL:
   if (mailbox_list) {
     nsMemory::Free(mailbox_list);
   }
   return res;
 }
--- a/mailnews/extensions/smime/src/nsSMimeJSHelper.cpp
+++ b/mailnews/extensions/smime/src/nsSMimeJSHelper.cpp
@@ -87,17 +87,17 @@ NS_IMETHODIMP nsSMimeJSHelper::GetRecipi
     return rv;
 
   if (!mailbox_list)
     return NS_ERROR_FAILURE;
 
   nsCOMPtr<nsIX509CertDB> certdb = do_GetService(NS_X509CERTDB_CONTRACTID);
 
   *count = mailbox_count;
-  *canEncrypt = PR_FALSE;
+  *canEncrypt = false;
   rv = NS_OK;
 
   if (mailbox_count)
   {
     PRUnichar **outEA = static_cast<PRUnichar **>(nsMemory::Alloc(mailbox_count * sizeof(PRUnichar *)));
     PRInt32 *outCV = static_cast<PRInt32 *>(nsMemory::Alloc(mailbox_count * sizeof(PRInt32)));
     PRUnichar **outCII = static_cast<PRUnichar **>(nsMemory::Alloc(mailbox_count * sizeof(PRUnichar *)));
     PRUnichar **outCEI = static_cast<PRUnichar **>(nsMemory::Alloc(mailbox_count * sizeof(PRUnichar *)));
@@ -139,17 +139,17 @@ NS_IMETHODIMP nsSMimeJSHelper::GetRecipi
         if (memory_failure) {
           *iEA = nsnull;
           continue;
         }
 
         nsDependentCString email(walk);
         *iEA = ToNewUnicode(NS_ConvertUTF8toUTF16(walk));
         if (!*iEA) {
-          memory_failure = PR_TRUE;
+          memory_failure = true;
           continue;
         }
 
         nsCString email_lowercase;
         ToLowerCase(email, email_lowercase);
 
         nsCOMPtr<nsIX509Cert> cert;
         if (NS_SUCCEEDED(certdb->FindCertByEmailAddress(nsnull, email_lowercase.get(), getter_AddRefs(cert)))
@@ -159,71 +159,71 @@ NS_IMETHODIMP nsSMimeJSHelper::GetRecipi
           NS_ADDREF(*iCert);
 
           PRUint32 verification_result;
 
           if (NS_FAILED(
               cert->VerifyForUsage(nsIX509Cert::CERT_USAGE_EmailRecipient, &verification_result)))
           {
             *iCV = nsIX509Cert::NOT_VERIFIED_UNKNOWN;
-            found_blocker = PR_TRUE;
+            found_blocker = true;
           }
           else
           {
             *iCV = verification_result;
 
             if (verification_result != nsIX509Cert::VERIFIED_OK)
             {
-              found_blocker = PR_TRUE;
+              found_blocker = true;
             }
           }
 
           nsCOMPtr<nsIX509CertValidity> validity;
           rv = cert->GetValidity(getter_AddRefs(validity));
 
           if (NS_SUCCEEDED(rv)) {
             nsString id, ed;
 
             if (NS_SUCCEEDED(validity->GetNotBeforeLocalDay(id)))
             {
               *iCII = ToNewUnicode(id);
               if (!*iCII) {
-                memory_failure = PR_TRUE;
+                memory_failure = true;
                 continue;
               }
             }
 
             if (NS_SUCCEEDED(validity->GetNotAfterLocalDay(ed)))
             {
               *iCEI = ToNewUnicode(ed);
               if (!*iCEI) {
-                memory_failure = PR_TRUE;
+                memory_failure = true;
                 continue;
               }
             }
           }
         }
         else
         {
-          found_blocker = PR_TRUE;
+          found_blocker = true;
         }
       }
 
       if (memory_failure) {
         NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(mailbox_count, outEA);
         NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(mailbox_count, outCII);
         NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(mailbox_count, outCEI);
         NS_FREE_XPCOM_ISUPPORTS_POINTER_ARRAY(mailbox_count, outCerts);
         nsMemory::Free(outCV);
         rv = NS_ERROR_OUT_OF_MEMORY;
       }
       else {
         if (mailbox_count > 0 && !found_blocker)
         {
-          *canEncrypt = PR_TRUE;
+          *canEncrypt = true;
         }
 
         *emailAddresses = outEA;
         *certVerification = outCV;
         *certIssuedInfos = outCII;
         *certExpiresInfos = outCEI;
         *certs = outCerts;
       }
@@ -287,34 +287,34 @@ NS_IMETHODIMP nsSMimeJSHelper::GetNoCert
     const char *walk = mailbox_list;
 
     // To understand this loop, especially the "+= strlen +1", look at the documentation
     // of ParseHeaderAddresses. Basically, it returns a list of zero terminated strings.
     for (PRUint32 i = 0;
         i < mailbox_count;
         ++i, walk += strlen(walk) + 1)
     {
-      haveCert[i] = PR_FALSE;
+      haveCert[i] = false;
 
       nsDependentCString email(walk);
       nsCString email_lowercase;
       ToLowerCase(email, email_lowercase);
 
       nsCOMPtr<nsIX509Cert> cert;
       if (NS_SUCCEEDED(certdb->FindCertByEmailAddress(nsnull, email_lowercase.get(), getter_AddRefs(cert)))
           && cert)
       {
         PRUint32 verification_result;
 
         if (NS_SUCCEEDED(
               cert->VerifyForUsage(nsIX509Cert::CERT_USAGE_EmailRecipient, &verification_result))
             &&
             nsIX509Cert::VERIFIED_OK == verification_result)
         {
-          haveCert[i] = PR_TRUE;
+          haveCert[i] = true;
         }
       }
 
       if (!haveCert[i])
         ++missing_count;
     }
   }
 
@@ -343,17 +343,17 @@ NS_IMETHODIMP nsSMimeJSHelper::GetNoCert
         if (!haveCert[i])
         {
           if (memory_failure) {
             *iEA = nsnull;
           }
           else {
             *iEA = ToNewUnicode(NS_ConvertUTF8toUTF16(walk));
             if (!*iEA) {
-              memory_failure = PR_TRUE;
+              memory_failure = true;
             }
           }
           ++iEA;
         }
       }
 
       if (memory_failure) {
         NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(missing_count, outEA);
--- a/mailnews/imap/src/nsAutoSyncManager.cpp
+++ b/mailnews/imap/src/nsAutoSyncManager.cpp
@@ -221,17 +221,17 @@ nsDefaultAutoSyncFolderStrategy::IsExclu
   // exclude saved search
   *aDecision = (folderFlags & nsMsgFolderFlags::Virtual);
   if (!*aDecision)
   {
     // Exclude orphans
     nsCOMPtr<nsIMsgFolder> parent;
     aFolder->GetParent(getter_AddRefs(parent));
     if (!parent)
-      *aDecision = PR_TRUE;
+      *aDecision = true;
   }
   return NS_OK;
 }
 
 #define NOTIFY_LISTENERS_STATIC(obj_, propertyfunc_, params_) \
   PR_BEGIN_MACRO \
   nsTObserverArray<nsCOMPtr<nsIAutoSyncMgrListener> >::ForwardIterator iter(obj_->mListeners); \
   nsCOMPtr<nsIAutoSyncMgrListener> listener; \
@@ -244,37 +244,37 @@ nsDefaultAutoSyncFolderStrategy::IsExclu
 #define NOTIFY_LISTENERS(propertyfunc_, params_) \
   NOTIFY_LISTENERS_STATIC(this, propertyfunc_, params_)
 
 nsAutoSyncManager::nsAutoSyncManager()
 {
   mGroupSize = kDefaultGroupSize;
 
   mIdleState = notIdle;
-  mStartupDone = PR_FALSE;
+  mStartupDone = false;
   mDownloadModel = dmChained;
   mUpdateState = completed;
-  mPaused = PR_FALSE;
+  mPaused = false;
 
   nsresult rv;
   mIdleService = do_GetService("@mozilla.org/widget/idleservice;1", &rv);
   if (mIdleService)
     mIdleService->AddIdleObserver(this, kIdleTimeInSec);
 
   // Observe xpcom-shutdown event and app-idle changes
   nsCOMPtr<nsIObserverService> observerService =
          do_GetService("@mozilla.org/observer-service;1", &rv);
 
   rv = observerService->AddObserver(this,
                                     NS_XPCOM_SHUTDOWN_OBSERVER_ID,
-                                    PR_FALSE);
-  observerService->AddObserver(this, kAppIdleNotification, PR_FALSE);
-  observerService->AddObserver(this, NS_IOSERVICE_OFFLINE_STATUS_TOPIC, PR_FALSE);
-  observerService->AddObserver(this, NS_IOSERVICE_GOING_OFFLINE_TOPIC, PR_FALSE);
-  observerService->AddObserver(this, kStartupDoneNotification, PR_FALSE);
+                                    false);
+  observerService->AddObserver(this, kAppIdleNotification, false);
+  observerService->AddObserver(this, NS_IOSERVICE_OFFLINE_STATUS_TOPIC, false);
+  observerService->AddObserver(this, NS_IOSERVICE_GOING_OFFLINE_TOPIC, false);
+  observerService->AddObserver(this, kStartupDoneNotification, false);
   gAutoSyncLog = PR_NewLogModule("ImapAutoSync");
 }
 
 nsAutoSyncManager::~nsAutoSyncManager()
 {
 }
 
 void nsAutoSyncManager::InitTimer()
@@ -416,17 +416,17 @@ void nsAutoSyncManager::ChainFoldersInQ(
         // we have to wait until its download is completed before 
         // switching to new one. 
         PRInt32 state;
         aQueue[pqidx]->GetState(&state);
         if (aQueue[pqidx] != aChainedQ[idx] && 
             state == nsAutoSyncState::stDownloadInProgress)
           needToBeReplacedWith = idx;
         else
-          chained = PR_TRUE;
+          chained = true;
           
         break;
       }
     }//endfor
     
     if (needToBeReplacedWith > -1)
       aChainedQ.ReplaceObjectAt(aQueue[pqidx], needToBeReplacedWith);
     else if (!chained)
@@ -564,24 +564,24 @@ NS_IMETHODIMP nsAutoSyncManager::OnStopR
     mUpdateQ.RemoveObjectAt(0);
 
   return aExitCode;
 }
 
 NS_IMETHODIMP nsAutoSyncManager::Pause()
 {
   StopTimer();
-  mPaused = PR_TRUE;
+  mPaused = true;
   PR_LOG(gAutoSyncLog, PR_LOG_DEBUG, ("autosync paused\n"));
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAutoSyncManager::Resume()
 {
-  mPaused = PR_FALSE;
+  mPaused = false;
   StartTimerIfNeeded();
   PR_LOG(gAutoSyncLog, PR_LOG_DEBUG, ("autosync resumed\n"));
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAutoSyncManager::Observe(nsISupports*, const char *aTopic, const PRUnichar *aSomeData)
 {
   if (!PL_strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID))
@@ -606,17 +606,17 @@ NS_IMETHODIMP nsAutoSyncManager::Observe
     // unsubscribe from idle service
     if (mIdleService)
        mIdleService->RemoveIdleObserver(this, kIdleTimeInSec);
 
     return NS_OK;
   }
   else if (!PL_strcmp(aTopic, kStartupDoneNotification))
   {
-    mStartupDone = PR_TRUE; 
+    mStartupDone = true; 
   }
   else if (!PL_strcmp(aTopic, kAppIdleNotification))
   {
     if (nsDependentString(aSomeData).EqualsLiteral("idle"))
     {
       IdleState prevIdleState = GetIdleState();
 
       // we were already idle (either system or app), so
@@ -627,17 +627,17 @@ NS_IMETHODIMP nsAutoSyncManager::Observe
 
        return StartIdleProcessing();
      }
      // we're back from appIdle - if already notIdle, just return;
      else if (GetIdleState() == notIdle)
        return NS_OK;
 
     SetIdleState(notIdle);
-    NOTIFY_LISTENERS(OnStateChanged, (PR_FALSE));
+    NOTIFY_LISTENERS(OnStateChanged, (false));
     return NS_OK;
   }
   else if (!PL_strcmp(aTopic, NS_IOSERVICE_OFFLINE_STATUS_TOPIC))
   {
     if (nsDependentString(aSomeData).EqualsLiteral(NS_IOSERVICE_ONLINE))
       Resume();
   }
   else if (!PL_strcmp(aTopic, NS_IOSERVICE_GOING_OFFLINE_TOPIC))
@@ -647,17 +647,17 @@ NS_IMETHODIMP nsAutoSyncManager::Observe
   // we're back from system idle
   else if (!PL_strcmp(aTopic, "back"))
   {
     // if we're app idle when we get back from system idle, we ignore
     // it, since we'll keep doing our idle stuff.
     if (GetIdleState() != appIdle)
     {
       SetIdleState(notIdle);
-      NOTIFY_LISTENERS(OnStateChanged, (PR_FALSE));
+      NOTIFY_LISTENERS(OnStateChanged, (false));
     }
     return NS_OK;
   }
   else // we've gone system idle
   {
     // Check if we were already idle. We may have gotten
     // multiple system idle notificatons. In that case,
     // just remember that we're systemIdle and return;
@@ -684,17 +684,17 @@ nsresult nsAutoSyncManager::StartIdlePro
     
   StartTimerIfNeeded();
   
   // Ignore idle events sent during the startup
   if (!mStartupDone)
     return NS_OK;
     
   // notify listeners that auto-sync is running
-  NOTIFY_LISTENERS(OnStateChanged, (PR_TRUE));
+  NOTIFY_LISTENERS(OnStateChanged, (true));
     
   nsCOMArray<nsIAutoSyncState> chainedQ;
   nsCOMArray<nsIAutoSyncState> *queue = &mPriorityQ;
   if (mDownloadModel == dmChained) 
   {
     ChainFoldersInQ(mPriorityQ, chainedQ);
     queue = &chainedQ;
   }
@@ -1411,17 +1411,17 @@ nsAutoSyncManager::OnFolderHasPendingMsg
     {
       bool isTrash;
       folder->GetFlag(nsMsgFolderFlags::Trash, &isTrash);
       if (!isTrash)
       {
         bool isSentOrArchive;
         folder->IsSpecialFolder(nsMsgFolderFlags::SentMail|
                                 nsMsgFolderFlags::Archive,
-                                PR_TRUE, &isSentOrArchive);
+                                true, &isSentOrArchive);
         // Sent or archive folders go to the q front, the rest to the end.
         if (isSentOrArchive)
           mUpdateQ.InsertObjectAt(aAutoSyncStateObj, 0);
         else
           mUpdateQ.AppendObject(aAutoSyncStateObj);
         aAutoSyncStateObj->SetState(nsAutoSyncState::stUpdateNeeded);
         NOTIFY_LISTENERS(OnFolderAddedIntoQ,
                         (nsIAutoSyncMgrListener::UpdateQueue, folder));
--- a/mailnews/imap/src/nsAutoSyncState.cpp
+++ b/mailnews/imap/src/nsAutoSyncState.cpp
@@ -72,17 +72,17 @@ bool MsgStrategyComparatorAdaptor::Equal
     nsCOMPtr<nsIMsgFolder> folder = do_QueryInterface(mFolder);
     if (mStrategy)
       rv = mStrategy->Sort(folder, hdrA, hdrB, &decision);
     
     if (NS_SUCCEEDED(rv))
       return (decision == nsAutoSyncStrategyDecisions::Same);
   }
   
-  return PR_FALSE;
+  return false;
 }
 
 /** @return True if (a < b); false otherwise. */
 bool MsgStrategyComparatorAdaptor::LessThan(const nsMsgKey& a, const nsMsgKey& b) const
 {
   nsCOMPtr<nsIMsgDBHdr> hdrA;
   nsCOMPtr<nsIMsgDBHdr> hdrB;
   
@@ -97,24 +97,24 @@ bool MsgStrategyComparatorAdaptor::LessT
     nsCOMPtr<nsIMsgFolder> folder = do_QueryInterface(mFolder);
     if (mStrategy)
       rv = mStrategy->Sort(folder, hdrA, hdrB, &decision);
 
     if (NS_SUCCEEDED(rv))
       return (decision == nsAutoSyncStrategyDecisions::Lower);
   }
   
-  return PR_FALSE;
+  return false;
 }
 
 nsAutoSyncState::nsAutoSyncState(nsImapMailFolder *aOwnerFolder, PRTime aLastSyncTime)
   : mSyncState(stCompletedIdle), mOffset(0U), mLastOffset(0U), mLastServerTotal(0),
     mLastServerRecent(0), mLastServerUnseen(0), mLastNextUID(0),
     mLastSyncTime(aLastSyncTime), mLastUpdateTime(0UL), mProcessPointer(0U),
-    mIsDownloadQChanged(PR_FALSE), mRetryCounter(0U)
+    mIsDownloadQChanged(false), mRetryCounter(0U)
 {
   mOwnerFolder = do_GetWeakReference(static_cast<nsIMsgImapMailFolder*>(aOwnerFolder));
 }
 
 nsAutoSyncState::~nsAutoSyncState()
 {
 }
 
@@ -166,17 +166,17 @@ nsresult nsAutoSyncState::PlaceIntoDownl
       {
         bool excluded = false;
         if (msgStrategy)
         {
           rv = msgStrategy->IsExcluded(folder, hdr, &excluded);
           
           if (NS_SUCCEEDED(rv) && !excluded)
           {
-            mIsDownloadQChanged = PR_TRUE;
+            mIsDownloadQChanged = true;
             mDownloadQ.AppendElement(aMsgKeyList[idx]);
           }
         }
       }
     }//endfor
 
     if (mIsDownloadQChanged)
     {
@@ -263,17 +263,17 @@ NS_IMETHODIMP nsAutoSyncState::GetNextGr
       {
         // we want to sort only pending messages. mOffset is
         // the position of the first pending message in the download queue
         rv = (mOffset > 0)
           ? SortSubQueueBasedOnStrategy(mDownloadQ, mOffset)
           : SortQueueBasedOnStrategy(mDownloadQ);
 
         if (NS_SUCCEEDED(rv))
-          mIsDownloadQChanged = PR_FALSE;
+          mIsDownloadQChanged = false;
       }
 
       nsCOMPtr<nsIAutoSyncManager> autoSyncMgr = do_GetService(NS_AUTOSYNCMANAGER_CONTRACTID, &rv);
       NS_ENSURE_SUCCESS(rv, rv);
 
       PRUint32 msgCount = mDownloadQ.Length();
       PRUint32 idx = mOffset;
 
@@ -318,25 +318,25 @@ NS_IMETHODIMP nsAutoSyncState::GetNextGr
         // ignore 0 byte messages; the imap parser asserts when we try 
         // to download them, and there's no point anyway.
         if (!msgSize)
           continue;
 
         if (!*aActualGroupSize && msgSize >= aSuggestedGroupSizeLimit) 
         {
           *aActualGroupSize = msgSize;
-          group->AppendElement(qhdr, PR_FALSE);
+          group->AppendElement(qhdr, false);
           idx++;
           break;
         }
         else if ((*aActualGroupSize) + msgSize > aSuggestedGroupSizeLimit)
           break;
         else
         {
-          group->AppendElement(qhdr, PR_FALSE);
+          group->AppendElement(qhdr, false);
           *aActualGroupSize += msgSize;
         }
       }// endfor
 
       mLastOffset = mOffset;
       mOffset = idx;
     }
 
@@ -617,17 +617,17 @@ NS_IMETHODIMP nsAutoSyncState::ResetDown
 
 /**
  * Tests whether the given folder is owned by the same imap server
  * or not.
  */
 NS_IMETHODIMP nsAutoSyncState::IsSibling(nsIAutoSyncState *aAnotherStateObj, bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = PR_FALSE;
+  *aResult = false;
 
   nsresult rv;
   nsCOMPtr<nsIMsgFolder> folderA, folderB;
   
   rv = GetOwnerFolder(getter_AddRefs(folderA));
   NS_ENSURE_SUCCESS(rv,rv);
   
   rv = aAnotherStateObj->GetOwnerFolder(getter_AddRefs(folderB));
--- a/mailnews/imap/src/nsIMAPBodyShell.cpp
+++ b/mailnews/imap/src/nsIMAPBodyShell.cpp
@@ -71,21 +71,21 @@
 ///////////// nsIMAPBodyShell ////////////////////////////////////
 
 NS_IMPL_THREADSAFE_ISUPPORTS0(nsIMAPBodyShell)
 
 nsIMAPBodyShell::nsIMAPBodyShell(nsImapProtocol *protocolConnection,
                                  nsIMAPBodypartMessage *message, PRUint32 UID,
                                  const char *folderName)
 {
-  m_isValid = PR_FALSE;
-  m_isBeingGenerated = PR_FALSE;
-  m_cached = PR_FALSE;
-  m_gotAttachmentPref = PR_FALSE;
-  m_generatingWholeMessage = PR_FALSE;
+  m_isValid = false;
+  m_isBeingGenerated = false;
+  m_cached = false;
+  m_gotAttachmentPref = false;
+  m_generatingWholeMessage = false;
   m_generatingPart = NULL;
   m_protocolConnection = protocolConnection;
   m_message = message;
   NS_ASSERTION(m_protocolConnection, "non null connection");
   if (!m_protocolConnection)
     return;
   m_prefetchQueue = new nsIMAPMessagePartIDArray();
   if (!m_prefetchQueue)
@@ -118,17 +118,17 @@ void nsIMAPBodyShell::SetIsValid(bool va
   m_isValid = valid;
 }
 
 bool nsIMAPBodyShell::GetShowAttachmentsInline()
 {
   if (!m_gotAttachmentPref)
   {
     m_showAttachmentsInline = !m_protocolConnection || m_protocolConnection->GetShowAttachmentsInline();
-    m_gotAttachmentPref = PR_TRUE;
+    m_gotAttachmentPref = true;
   }
   
   return m_showAttachmentsInline;
 }
 
 // Fills in buffer (and adopts storage) for header object
 void nsIMAPBodyShell::AdoptMessageHeaders(char *headers, const char *partNum)
 {
@@ -143,51 +143,51 @@ void nsIMAPBodyShell::AdoptMessageHeader
   nsIMAPBodypart *foundPart = m_message->FindPartWithNumber(partNum);
   if (foundPart)
   {
     nsIMAPBodypartMessage *messageObj = foundPart->GetnsIMAPBodypartMessage();
     if (messageObj)
     {
       messageObj->AdoptMessageHeaders(headers);
       if (!messageObj->GetIsValid())
-        SetIsValid(PR_FALSE);
+        SetIsValid(false);
     }
     else
     {
       // We were filling in message headers for a given part number.
       // We looked up that part number, found an object, but it
       // wasn't of type message/rfc822.
       // Something's wrong.
-      NS_ASSERTION(PR_FALSE, "object not of type message rfc822");
+      NS_ASSERTION(false, "object not of type message rfc822");
     }
   }
   else
-    SetIsValid(PR_FALSE);
+    SetIsValid(false);
 }
 
 // Fills in buffer (and adopts storage) for MIME headers in appropriate object.
-// If object can't be found, sets isValid to PR_FALSE.
+// If object can't be found, sets isValid to false.
 void nsIMAPBodyShell::AdoptMimeHeader(const char *partNum, char *mimeHeader)
 {
   if (!GetIsValid())
     return;
   
   NS_ASSERTION(partNum, "null partnum in body shell");
   
   nsIMAPBodypart *foundPart = m_message->FindPartWithNumber(partNum);
   
   if (foundPart)
   {
     foundPart->AdoptHeaderDataBuffer(mimeHeader);
     if (!foundPart->GetIsValid())
-      SetIsValid(PR_FALSE);
+      SetIsValid(false);
   }
   else
   {
-    SetIsValid(PR_FALSE);
+    SetIsValid(false);
   }
 }
 
 
 void nsIMAPBodyShell::AddPrefetchToQueue(nsIMAPeFetchFields fields, const char *partNumber)
 {
   nsIMAPMessagePartID *newPart = new nsIMAPMessagePartID(fields, partNumber);
   if (newPart)
@@ -205,17 +205,17 @@ void nsIMAPBodyShell::AddPrefetchToQueue
 void nsIMAPBodyShell::FlushPrefetchQueue()
 {
   m_protocolConnection->PipelinedFetchMessageParts(GetUID(), m_prefetchQueue);
   m_prefetchQueue->RemoveAndFreeAll();
 }
 
 // Requires that the shell is valid when called
 // Performs a preflight check on all message parts to see if they are all
-// inline.  Returns PR_TRUE if all parts are inline, PR_FALSE otherwise.
+// inline.  Returns true if all parts are inline, false otherwise.
 bool nsIMAPBodyShell::PreflightCheckAllInline()
 {
   bool rv = m_message->PreflightCheckAllInline(this);
   //	if (rv)
   //		PR_LOG(IMAP, out, ("BODYSHELL: All parts inline.  Reverting to whole message download."));
   return rv;
 }
 
@@ -233,85 +233,85 @@ bool nsIMAPBodyShell::PreflightCheckAllI
 // nested parts.  For instance, if a user clicks on a link to
 // a forwarded message, then that forwarded message may be 
 // generated along with any images that the forwarded message
 // contains, for instance.
 
 
 PRInt32 nsIMAPBodyShell::Generate(char *partNum)
 {
-  m_isBeingGenerated = PR_TRUE;
+  m_isBeingGenerated = true;
   m_generatingPart = partNum;
   PRInt32 contentLength = 0;
   
   if (!GetIsValid() || PreflightCheckAllInline())
   {
     // We don't have a valid shell, or all parts are going to be inline anyway.  Fall back to fetching the whole message.
 #ifdef DEBUG_chrisf
     NS_ASSERTION(GetIsValid());
 #endif
-    m_generatingWholeMessage = PR_TRUE;
-    PRUint32 messageSize = m_protocolConnection->GetMessageSize(GetUID().get(), PR_TRUE);
+    m_generatingWholeMessage = true;
+    PRUint32 messageSize = m_protocolConnection->GetMessageSize(GetUID().get(), true);
     m_protocolConnection->SetContentModified(IMAP_CONTENT_NOT_MODIFIED);	// So that when we cache it, we know we have the whole message
     if (!DeathSignalReceived())
       m_protocolConnection->FallbackToFetchWholeMsg(GetUID(), messageSize);
     contentLength = (PRInt32) messageSize;	// ugh
   }
   else
   {
     // We have a valid shell.
     bool streamCreated = false;
-    m_generatingWholeMessage = PR_FALSE;
+    m_generatingWholeMessage = false;
     
     ////// PASS 1 : PREFETCH ///////
     // First, prefetch any additional headers/data that we need
     if (!GetPseudoInterrupted())
-      m_message->Generate(this, PR_FALSE, PR_TRUE); // This queues up everything we need to prefetch
+      m_message->Generate(this, false, true); // This queues up everything we need to prefetch
     // Now, run a single pipelined prefetch  (neato!)
     FlushPrefetchQueue();
     
     ////// PASS 2 : COMPUTE STREAM SIZE ///////
     // Next, figure out the size from the parts that we're going to fill in,
     // plus all of the MIME headers, plus the message header itself
     if (!GetPseudoInterrupted())
-      contentLength = m_message->Generate(this, PR_FALSE, PR_FALSE);
+      contentLength = m_message->Generate(this, false, false);
     
     // Setup the stream
     if (!GetPseudoInterrupted() && !DeathSignalReceived())
     {
       nsresult rv = 
         m_protocolConnection->BeginMessageDownLoad(contentLength, MESSAGE_RFC822);
       if (NS_FAILED(rv))
       {
         m_generatingPart = nsnull;
         m_protocolConnection->AbortMessageDownLoad();
         return 0;
       }
       else
       {
-        streamCreated = PR_TRUE;
+        streamCreated = true;
       }
     }
     
     ////// PASS 3 : GENERATE ///////
     // Generate the message
     if (!GetPseudoInterrupted() && !DeathSignalReceived())
-      m_message->Generate(this, PR_TRUE, PR_FALSE);
+      m_message->Generate(this, true, false);
     
     // Close the stream here - normal.  If pseudointerrupted, the connection will abort the download stream
     if (!GetPseudoInterrupted() && !DeathSignalReceived())
       m_protocolConnection->NormalMessageEndDownload();
     else if (streamCreated)
       m_protocolConnection->AbortMessageDownLoad();
     
     m_generatingPart = NULL;
     
   }
   
-  m_isBeingGenerated = PR_FALSE;
+  m_isBeingGenerated = false;
   return contentLength;
 }
 
 bool nsIMAPBodyShell::GetPseudoInterrupted()
 {
   bool rv = m_protocolConnection->GetPseudoInterrupted();
   return rv;
 }
@@ -322,17 +322,17 @@ bool nsIMAPBodyShell::DeathSignalReceive
   return rv;
 }
 
 
 ///////////// nsIMAPBodypart ////////////////////////////////////
 
 nsIMAPBodypart::nsIMAPBodypart(char *partNumber, nsIMAPBodypart *parentPart)
 {
-  SetIsValid(PR_TRUE);
+  SetIsValid(true);
   m_parentPart = parentPart;
   m_partNumberString = partNumber;	// storage adopted
   m_partData = NULL;
   m_headerData = NULL;
   m_boundaryData = NULL;	// initialize from parsed BODYSTRUCTURE
   m_contentLength = 0;
   m_partLength = 0;
   
@@ -362,33 +362,33 @@ void nsIMAPBodypart::SetIsValid(bool val
 {
   m_isValid = valid;
   if (!m_isValid)
   {
     //PR_LOG(IMAP, out, ("BODYSHELL: Part is invalid.  Part Number: %s Content-Type: %s", m_partNumberString, m_contentType));
   }
 }
 
-// Adopts storage for part data buffer.  If NULL, sets isValid to PR_FALSE.
+// Adopts storage for part data buffer.  If NULL, sets isValid to false.
 void nsIMAPBodypart::AdoptPartDataBuffer(char *buf)
 {
   m_partData = buf;
   if (!m_partData)
   {
-    SetIsValid(PR_FALSE);
+    SetIsValid(false);
   }
 }
 
-// Adopts storage for header data buffer.  If NULL, sets isValid to PR_FALSE.
+// Adopts storage for header data buffer.  If NULL, sets isValid to false.
 void nsIMAPBodypart::AdoptHeaderDataBuffer(char *buf)
 {
   m_headerData = buf;
   if (!m_headerData)
   {
-    SetIsValid(PR_FALSE);
+    SetIsValid(false);
   }
 }
 
 // Finds the part with given part number
 // Returns a nsIMAPBodystructure of the matched part if it is this
 // or one of its children.  Returns NULL otherwise.
 nsIMAPBodypart *nsIMAPBodypart::FindPartWithNumber(const char *partNum)
 {
@@ -404,22 +404,22 @@ nsIMAPBodypart *nsIMAPBodypart::FindPart
   return NULL;
 }
 
 /*
 void nsIMAPBodypart::PrefetchMIMEHeader()
 {
 if (!m_headerData && !m_shell->DeathSignalReceived())
 {
-m_shell->GetConnection()->FetchMessage(m_shell->GetUID(), kMIMEHeader, PR_TRUE, 0, 0, m_partNumberString);
+m_shell->GetConnection()->FetchMessage(m_shell->GetUID(), kMIMEHeader, true, 0, 0, m_partNumberString);
 // m_headerLength will be filled in when it is adopted from the parser
 }
 if (!m_headerData)
 {
-SetIsValid(PR_FALSE);
+SetIsValid(false);
 }
 }
 */
 
 void nsIMAPBodypart::QueuePrefetchMIMEHeader(nsIMAPBodyShell *aShell)
 {
   aShell->AddPrefetchToQueue(kMIMEHeader, m_partNumberString);
 }
@@ -439,62 +439,62 @@ PRInt32 nsIMAPBodypart::GenerateMIMEHead
     {
       // if this part isn't inline, add the X-Mozilla-IMAP-Part header
       char *xPartHeader = PR_smprintf("%s: %s", IMAP_EXTERNAL_CONTENT_HEADER, m_partNumberString);
       if (xPartHeader)
       {
         if (stream)
         {
           aShell->GetConnection()->Log("SHELL","GENERATE-XHeader",m_partNumberString);
-          aShell->GetConnection()->HandleMessageDownLoadLine(xPartHeader, PR_FALSE);
+          aShell->GetConnection()->HandleMessageDownLoadLine(xPartHeader, false);
         }
         mimeHeaderLength += PL_strlen(xPartHeader);
         PR_Free(xPartHeader);
       }
     }
     
     mimeHeaderLength += PL_strlen(m_headerData);
     if (stream)
     {
       aShell->GetConnection()->Log("SHELL","GENERATE-MIMEHeader",m_partNumberString);
-      aShell->GetConnection()->HandleMessageDownLoadLine(m_headerData, PR_FALSE);  // all one line?  Can we do that?
+      aShell->GetConnection()->HandleMessageDownLoadLine(m_headerData, false);  // all one line?  Can we do that?
     }
     
     return mimeHeaderLength;
   }
   else 
   {
-    SetIsValid(PR_FALSE);	// prefetch didn't adopt a MIME header
+    SetIsValid(false);	// prefetch didn't adopt a MIME header
     return 0;
   }
 }
 
 PRInt32 nsIMAPBodypart::GeneratePart(nsIMAPBodyShell *aShell, bool stream, bool prefetch)
 {
   if (prefetch)
     return 0;	// don't need to prefetch anything
   
   if (m_partData)	// we have prefetched the part data
   {
     if (stream)
     {
       aShell->GetConnection()->Log("SHELL","GENERATE-Part-Prefetched",m_partNumberString);
-      aShell->GetConnection()->HandleMessageDownLoadLine(m_partData, PR_FALSE);
+      aShell->GetConnection()->HandleMessageDownLoadLine(m_partData, false);
     }
     return PL_strlen(m_partData);
   }
   else	// we are fetching and streaming this part's body as we go
   {
     if (stream && !aShell->DeathSignalReceived())
     {
       char *generatingPart = aShell->GetGeneratingPart();
       bool fetchingSpecificPart = (generatingPart && !PL_strcmp(generatingPart, m_partNumberString));
       
       aShell->GetConnection()->Log("SHELL","GENERATE-Part-Inline",m_partNumberString);
-      aShell->GetConnection()->FetchTryChunking(aShell->GetUID(), kMIMEPart, PR_TRUE, m_partNumberString, m_partLength, !fetchingSpecificPart);
+      aShell->GetConnection()->FetchTryChunking(aShell->GetUID(), kMIMEPart, true, m_partNumberString, m_partLength, !fetchingSpecificPart);
     }
     return m_partLength;	// the part length has been filled in from the BODYSTRUCTURE response
   }
 }
 
 PRInt32 nsIMAPBodypart::GenerateBoundary(nsIMAPBodyShell *aShell, bool stream, bool prefetch, bool lastBoundary)
 {
   if (prefetch)
@@ -502,29 +502,29 @@ PRInt32 nsIMAPBodypart::GenerateBoundary
   
   if (m_boundaryData)
   {
     if (!lastBoundary)
     {
       if (stream)
       {
         aShell->GetConnection()->Log("SHELL","GENERATE-Boundary",m_partNumberString);
-        aShell->GetConnection()->HandleMessageDownLoadLine(m_boundaryData, PR_FALSE);
+        aShell->GetConnection()->HandleMessageDownLoadLine(m_boundaryData, false);
       }
       return PL_strlen(m_boundaryData);
     }
     else	// the last boundary
     {
       char *lastBoundaryData = PR_smprintf("%s--", m_boundaryData);
       if (lastBoundaryData)
       {
         if (stream)
         {
           aShell->GetConnection()->Log("SHELL","GENERATE-Boundary-Last",m_partNumberString);
-          aShell->GetConnection()->HandleMessageDownLoadLine(lastBoundaryData, PR_FALSE);
+          aShell->GetConnection()->HandleMessageDownLoadLine(lastBoundaryData, false);
         }
         PRInt32 rv = PL_strlen(lastBoundaryData);
         PR_Free(lastBoundaryData);
         return rv;
       }
       else
       {
         //HandleMemoryFailure();
@@ -543,38 +543,38 @@ PRInt32 nsIMAPBodypart::GenerateEmptyFil
   
   const char emptyString[] = "This body part will be downloaded on demand.";
   // XP_GetString(MK_IMAP_EMPTY_MIME_PART);  ### need to be able to localize
   if (emptyString)
   {
     if (stream)
     {
       aShell->GetConnection()->Log("SHELL","GENERATE-Filling",m_partNumberString);
-      aShell->GetConnection()->HandleMessageDownLoadLine(emptyString, PR_FALSE);
+      aShell->GetConnection()->HandleMessageDownLoadLine(emptyString, false);
     }
     return PL_strlen(emptyString);
   }
   else
     return 0;
 }
 
 
-// Returns PR_TRUE if the prefs say that this content type should
+// Returns true if the prefs say that this content type should
 // explicitly be kept in when filling in the shell
 bool nsIMAPBodypart::ShouldExplicitlyFetchInline()
 {
-	 return PR_FALSE;
+	 return false;
 }
 
 
-// Returns PR_TRUE if the prefs say that this content type should
+// Returns true if the prefs say that this content type should
 // explicitly be left out when filling in the shell
 bool nsIMAPBodypart::ShouldExplicitlyNotFetchInline()
 {
-  return PR_FALSE;
+  return false;
 }
 
 
 ///////////// nsIMAPBodypartLeaf /////////////////////////////
 
 
 nsIMAPBodypartLeaf::nsIMAPBodypartLeaf(char *partNum,
                                        nsIMAPBodypart *parentPart,
@@ -589,17 +589,17 @@ nsIMAPBodypartLeaf::nsIMAPBodypartLeaf(c
   m_bodyID = bodyID;
   m_bodyDescription = bodyDescription;
   m_bodyEncoding = bodyEncoding;
   m_partLength = partLength;
   if (m_bodyType && m_bodySubType)
   {
     m_contentType = PR_smprintf("%s/%s", m_bodyType, m_bodySubType);
   }
-  SetIsValid(PR_TRUE);
+  SetIsValid(true);
 }
 
 nsIMAPBodypartType nsIMAPBodypartLeaf::GetType()
 {
   return IMAP_BODY_LEAF;
 }
 
 PRInt32 nsIMAPBodypartLeaf::Generate(nsIMAPBodyShell *aShell, bool stream, bool prefetch)
@@ -613,17 +613,17 @@ PRInt32 nsIMAPBodypartLeaf::Generate(nsI
       aShell->GetConnection()->Log("SHELL","GENERATE-Leaf",m_partNumberString);
     
     // Stream out the MIME part boundary
     //GenerateBoundary();
     NS_ASSERTION(m_parentPart, "part has no parent");
     //nsIMAPBodypartMessage *parentMessage = m_parentPart ? m_parentPart->GetnsIMAPBodypartMessage() : NULL;
     
     // Stream out the MIME header of this part, if this isn't the only body part of a message
-    //if (parentMessage ? !parentMessage->GetIsTopLevelMessage() : PR_TRUE)
+    //if (parentMessage ? !parentMessage->GetIsTopLevelMessage() : true)
     if ((m_parentPart->GetType() != IMAP_BODY_MESSAGE_RFC822)
       && !aShell->GetPseudoInterrupted())
       len += GenerateMIMEHeader(aShell, stream, prefetch);
     
     if (!aShell->GetPseudoInterrupted())
     {
       if (ShouldFetchInline(aShell))
       {
@@ -638,77 +638,77 @@ PRInt32 nsIMAPBodypartLeaf::Generate(nsI
     }
   }
   m_contentLength = len;
   return m_contentLength;
 }
 
 
 
-// returns PR_TRUE if this part should be fetched inline for generation.
+// returns true if this part should be fetched inline for generation.
 bool nsIMAPBodypartLeaf::ShouldFetchInline(nsIMAPBodyShell *aShell)
 {
   char *generatingPart = aShell->GetGeneratingPart();
   if (generatingPart)
   {
     // If we are generating a specific part
     if (!PL_strcmp(generatingPart, m_partNumberString))
     {
       // This is the part we're generating
-      return PR_TRUE;
+      return true;
     }
     else
     {
       // If this is the only body part of a message, and that
       // message is the part being generated, then this leaf should
       // be inline as well.
       if ((m_parentPart->GetType() == IMAP_BODY_MESSAGE_RFC822) &&
         (!PL_strcmp(m_parentPart->GetPartNumberString(), generatingPart)))
-        return PR_TRUE;
+        return true;
       
       // The parent of this part is a multipart
       if (m_parentPart->GetType() == IMAP_BODY_MULTIPART)
       {
         // This is the first text part of a forwarded message
         // with a multipart body, and that message is being generated,
         // then generate this part.
         nsIMAPBodypart *grandParent = m_parentPart->GetParentPart();
         // grandParent must exist, since multiparts need parents
         NS_ASSERTION(grandParent, "grandparent doesn't exist for multi-part alt");
         if (grandParent && 
           (grandParent->GetType() == IMAP_BODY_MESSAGE_RFC822) &&
           (!PL_strcmp(grandParent->GetPartNumberString(), generatingPart)) &&
           (m_partNumberString[PL_strlen(m_partNumberString)-1] == '1') &&
           !PL_strcasecmp(m_bodyType, "text"))
-          return PR_TRUE;	// we're downloading it inline
+          return true;	// we're downloading it inline
         
         
         // This is a child of a multipart/appledouble attachment,
         // and that multipart/appledouble attachment is being generated
         if (m_parentPart &&
           !PL_strcasecmp(m_parentPart->GetBodySubType(), "appledouble") &&
           !PL_strcmp(m_parentPart->GetPartNumberString(), generatingPart))
-          return PR_TRUE;	// we're downloading it inline
+          return true;	// we're downloading it inline
       }
       
       // Leave out all other leaves if this isn't the one
       // we're generating.
       // Maybe change later to check parents, etc.
-      return PR_FALSE;
+      return false;
     }
   }
   else
   {
     // We are generating the whole message, possibly (hopefully)
     // leaving out non-inline parts
     
     if (ShouldExplicitlyFetchInline())
-      return PR_TRUE;
+      return true;
     if (ShouldExplicitlyNotFetchInline())
-      return PR_FALSE;
+      return false;
     
     // If the parent is a message (this is the only body part of that
     // message), and that message should be inline, then its body
     // should inherit the inline characteristics of that message
     if (m_parentPart->GetType() == IMAP_BODY_MESSAGE_RFC822)
       return m_parentPart->ShouldFetchInline(aShell);
     
     // View Attachments As Links is on.
@@ -716,94 +716,94 @@ bool nsIMAPBodypartLeaf::ShouldFetchInli
     {
       // The last text part is still displayed inline,
       // even if View Attachments As Links is on.
       nsIMAPBodypart *grandParentPart = m_parentPart->GetParentPart();
       if ((mPreferPlainText ||
            !PL_strcasecmp(m_parentPart->GetBodySubType(), "mixed")) &&
           !PL_strcmp(m_partNumberString, "1") &&
           !PL_strcasecmp(m_bodyType, "text"))
-        return PR_TRUE;         // we're downloading it inline
+        return true;         // we're downloading it inline
 
       if ((!PL_strcasecmp(m_parentPart->GetBodySubType(), "alternative") ||
            (grandParentPart &&
             !PL_strcasecmp(grandParentPart->GetBodySubType(), "alternative"))) &&
           !PL_strcasecmp(m_bodyType, "text") &&
           ((!PL_strcasecmp(m_bodySubType, "plain") && mPreferPlainText) ||
            (!PL_strcasecmp(m_bodySubType, "html") && !mPreferPlainText)))
-        return PR_TRUE;
+        return true;
 
       // This is the first text part of a top-level multipart.
       // For instance, a message with multipart body, where the first
       // part is multipart, and this is the first leaf of that first part.
       if (m_parentPart->GetType() == IMAP_BODY_MULTIPART &&
           (PL_strlen(m_partNumberString) >= 2) &&
           !PL_strcmp(m_partNumberString + PL_strlen(m_partNumberString) - 2, ".1") && // this is the first text type on this level
           (!PL_strcmp(m_parentPart->GetPartNumberString(), "1") || !PL_strcmp(m_parentPart->GetPartNumberString(), "2")) && 
           !PL_strcasecmp(m_bodyType, "text"))
-        return PR_TRUE;
+        return true;
       // This is the first text part of a top-level multipart of the toplevelmessage
       // This 'assumes' the text body is first leaf. This is not required for valid email.
       // The only other way is to get content-disposition = attachment and exclude those text parts.
       if (m_parentPart->GetType() == IMAP_BODY_MULTIPART &&
           !PL_strcasecmp(m_bodyType, "text") &&
           !PL_strcmp(m_parentPart->GetPartNumberString(), "0") &&
           !PL_strcmp(m_partNumberString, "1"))
-         return PR_TRUE;
+         return true;
 
       // we may have future problems needing tests here
 
-      return PR_FALSE;  // we can leave it on the server
+      return false;  // we can leave it on the server
     }
 #ifdef XP_MACOSX
     // If it is either applesingle, or a resource fork for appledouble
     if (!PL_strcasecmp(m_contentType, "application/applefile"))
     {
       // if it is appledouble
       if (m_parentPart->GetType() == IMAP_BODY_MULTIPART &&
         !PL_strcasecmp(m_parentPart->GetBodySubType(), "appledouble"))
       {
         // This is the resource fork of a multipart/appledouble.
         // We inherit the inline attributes of the parent,
         // which was derived from its OTHER child.  (The data fork.)
         return m_parentPart->ShouldFetchInline(aShell);
       }
       else	// it is applesingle
       {
-        return PR_FALSE;	// we can leave it on the server
+        return false;	// we can leave it on the server
       }
     }
 #endif // XP_MACOSX
     
     // Leave out parts with type application/*
     if (!PL_strcasecmp(m_bodyType, "APPLICATION") &&	// If it is of type "application"
       PL_strncasecmp(m_bodySubType, "x-pkcs7", 7)	// and it's not a signature (signatures are inline)
       )
-      return PR_FALSE;	// we can leave it on the server
+      return false;	// we can leave it on the server
     if (!PL_strcasecmp(m_bodyType, "AUDIO"))
-      return PR_FALSE;
+      return false;
     // Here's where we can add some more intelligence -- let's leave out
     // any other parts that we know we can't display inline.
-    return PR_TRUE;	// we're downloading it inline
+    return true;	// we're downloading it inline
   }
 }
 
 
 
 bool nsIMAPBodypartMultipart::IsLastTextPart(const char *partNumberString)
 {
  // iterate backwards over the parent's part list and if the part is
   // text, compare it to the part number string
   for (int i = m_partList->Count() - 1; i >= 0; i--)
   {
       nsIMAPBodypart *part = (nsIMAPBodypart *)(m_partList->ElementAt(i));
       if (!PL_strcasecmp(part->GetBodyType(), "text"))
         return !PL_strcasecmp(part->GetPartNumberString(), partNumberString);
   }
-  return PR_FALSE;
+  return false;
 }
 
 bool nsIMAPBodypartLeaf::PreflightCheckAllInline(nsIMAPBodyShell *aShell)
 {
   // only need to check this part, since it has no children.
   return ShouldFetchInline(aShell);
 }
 
@@ -824,28 +824,28 @@ nsIMAPBodypartMessage::nsIMAPBodypartMes
                       preferPlainText)
 {
   m_topLevelMessage = topLevelMessage;
   if (m_topLevelMessage)
   {
     m_partNumberString = PR_smprintf("0");
     if (!m_partNumberString)
     {
-      SetIsValid(PR_FALSE);
+      SetIsValid(false);
       return;
     }
   }
   m_body = NULL;
   m_headers = new nsIMAPMessageHeaders(m_partNumberString, this);  // We always have a Headers object
   if (!m_headers || !m_headers->GetIsValid())
   {
-    SetIsValid(PR_FALSE);
+    SetIsValid(false);
     return;
   }
-  SetIsValid(PR_TRUE);
+  SetIsValid(true);
 }
 
 void nsIMAPBodypartMessage::SetBody(nsIMAPBodypart *body)
 {
   if (m_body)
     delete m_body;
   m_body = body;
 }
@@ -902,62 +902,62 @@ PRInt32 nsIMAPBodypartMessage::Generate(
 }
 
 
 
 
 bool nsIMAPBodypartMessage::ShouldFetchInline(nsIMAPBodyShell *aShell)
 {
   if (m_topLevelMessage)	// the main message should always be defined as "inline"
-    return PR_TRUE;
+    return true;
   
   char *generatingPart = aShell->GetGeneratingPart();
   if (generatingPart)
   {
     // If we are generating a specific part
     // Always generate containers (just don't fill them in)
     // because it is low cost (everything is cached)
     // and it gives the message its full MIME structure,
     // to avoid any potential mishap.
-    return PR_TRUE;
+    return true;
   }
   else
   {
     // Generating whole message
     
     if (ShouldExplicitlyFetchInline())
-      return PR_TRUE;
+      return true;
     if (ShouldExplicitlyNotFetchInline())
-      return PR_FALSE;
+      return false;
     
     
     // Message types are inline, by default.
-    return PR_TRUE;
+    return true;
   }
 }
 
 bool nsIMAPBodypartMessage::PreflightCheckAllInline(nsIMAPBodyShell *aShell)
 {
   if (!ShouldFetchInline(aShell))
-    return PR_FALSE;
+    return false;
   
   return m_body->PreflightCheckAllInline(aShell);
 }
 
 // Fills in buffer (and adopts storage) for header object
 void nsIMAPBodypartMessage::AdoptMessageHeaders(char *headers)
 {
   if (!GetIsValid())
     return;
   
   // we are going to say that the message headers only have
   // part data, and no header data.
   m_headers->AdoptPartDataBuffer(headers);
   if (!m_headers->GetIsValid())
-    SetIsValid(PR_FALSE);
+    SetIsValid(false);
 }
 
 // Finds the part with given part number
 // Returns a nsIMAPBodystructure of the matched part if it is this
 // or one of its children.  Returns NULL otherwise.
 nsIMAPBodypart *nsIMAPBodypartMessage::FindPartWithNumber(const char *partNum)
 {
   // either brute force, or do it the smart way - look at the number.
@@ -984,19 +984,19 @@ nsIMAPBodypart(partNum, parentPart)
       m_partNumberString = PR_smprintf("0");
     }
     else
       m_partNumberString = NS_strdup(m_parentPart->GetPartNumberString());
   }
   m_partList = new nsVoidArray();
   m_bodyType = NS_strdup("multipart");
   if (m_partList && m_parentPart && m_bodyType)
-    SetIsValid(PR_TRUE);
+    SetIsValid(true);
   else
-    SetIsValid(PR_FALSE);
+    SetIsValid(false);
 }
 
 nsIMAPBodypartType nsIMAPBodypartMultipart::GetType()
 {
   return IMAP_BODY_MULTIPART;
 }
 
 nsIMAPBodypartMultipart::~nsIMAPBodypartMultipart()
@@ -1040,22 +1040,22 @@ PRInt32 nsIMAPBodypartMultipart::Generat
       len += GenerateMIMEHeader(aShell, stream, prefetch);
     }
     
     if (ShouldFetchInline(aShell))
     {
       for (int i = 0; i < m_partList->Count(); i++)
       {
         if (!aShell->GetPseudoInterrupted())
-          len += GenerateBoundary(aShell, stream, prefetch, PR_FALSE);
+          len += GenerateBoundary(aShell, stream, prefetch, false);
         if (!aShell->GetPseudoInterrupted())
           len += ((nsIMAPBodypart *)(m_partList->ElementAt(i)))->Generate(aShell, stream, prefetch);
       }
       if (!aShell->GetPseudoInterrupted())
-        len += GenerateBoundary(aShell, stream, prefetch, PR_TRUE);
+        len += GenerateBoundary(aShell, stream, prefetch, true);
     }
     else
     {
       // fill in the filling within the empty part
       if (!aShell->GetPseudoInterrupted())
         len += GenerateEmptyFilling(aShell, stream, prefetch);
     }
   }
@@ -1069,50 +1069,50 @@ bool nsIMAPBodypartMultipart::ShouldFetc
   char *generatingPart = aShell->GetGeneratingPart();
   if (generatingPart)
   {
     // If we are generating a specific part
     // Always generate containers (just don't fill them in)
     // because it is low cost (everything is cached)
     // and it gives the message its full MIME structure,
     // to avoid any potential mishap.
-    return PR_TRUE;
+    return true;
   }
   else
   {
     // Generating whole message
     
     if (ShouldExplicitlyFetchInline())
-      return PR_TRUE;
+      return true;
     if (ShouldExplicitlyNotFetchInline())
-      return PR_FALSE;
+      return false;
 
     if (!PL_strcasecmp(m_bodySubType, "alternative"))
-      return PR_TRUE;
+      return true;
 
     nsIMAPBodypart *grandparentPart = m_parentPart->GetParentPart();
 
     // if we're a multipart sub-part of multipart alternative, we need to 
     // be fetched because mime will always display us.
     if (!PL_strcasecmp(m_parentPart->GetBodySubType(), "alternative") &&
         GetType() == IMAP_BODY_MULTIPART)
-      return PR_TRUE;
+      return true;
     // If "Show Attachments as Links" is on, and
     // the parent of this multipart is not a message,
     // then it's not inline.
     if (!(aShell->GetContentModified() == IMAP_CONTENT_MODIFIED_VIEW_INLINE) &&
       (m_parentPart->GetType() != IMAP_BODY_MESSAGE_RFC822) &&
       (m_parentPart->GetType() == IMAP_BODY_MULTIPART ?
-      (grandparentPart ? grandparentPart->GetType() != IMAP_BODY_MESSAGE_RFC822 : PR_TRUE)
-      : PR_TRUE))
-      return PR_FALSE;
+      (grandparentPart ? grandparentPart->GetType() != IMAP_BODY_MESSAGE_RFC822 : true)
+      : true))
+      return false;
     
     // multiparts are always inline (even multipart/appledouble)
     // (their children might not be, though)
-    return PR_TRUE;
+    return true;
   }
 }
 
 bool nsIMAPBodypartMultipart::PreflightCheckAllInline(nsIMAPBodyShell *aShell)
 {
   bool rv = ShouldFetchInline(aShell);
   
   int i = 0;
@@ -1151,30 +1151,30 @@ nsIMAPBodypart	*nsIMAPBodypartMultipart:
 
 
 
 nsIMAPMessageHeaders::nsIMAPMessageHeaders(char *partNum, nsIMAPBodypart *parentPart) : 
 nsIMAPBodypart(partNum, parentPart)
 {
   if (!partNum)
   {
-    SetIsValid(PR_FALSE);
+    SetIsValid(false);
     return;
   }
   m_partNumberString = NS_strdup(partNum);
   if (!m_partNumberString)
   {
-    SetIsValid(PR_FALSE);
+    SetIsValid(false);
     return;
   }
   if (!m_parentPart || !m_parentPart->GetnsIMAPBodypartMessage())
   {
     // Message headers created without a valid Message parent
-    NS_ASSERTION(PR_FALSE, "creating message headers with invalid message parent");
-    SetIsValid(PR_FALSE);
+    NS_ASSERTION(false, "creating message headers with invalid message parent");
+    SetIsValid(false);
   }
 }
 
 nsIMAPBodypartType nsIMAPMessageHeaders::GetType()
 {
   return IMAP_BODY_MESSAGE_HEADER;
 }
 
@@ -1249,38 +1249,38 @@ nsIMAPBodyShellCache::~nsIMAPBodyShellCa
 }
 
 // We'll use an LRU scheme here.
 // We will add shells in numerical order, so the
 // least recently used one will be in slot 0.
 bool nsIMAPBodyShellCache::EjectEntry()
 {
   if (m_shellList->Count() < 1)
-    return PR_FALSE;
+    return false;
 
   nsIMAPBodyShell *removedShell = (nsIMAPBodyShell *) (m_shellList->ElementAt(0));
 
   m_shellList->RemoveElementAt(0);
   m_shellHash.Remove(removedShell->GetUID());
 
-  return PR_TRUE;
+  return true;
 }
 
 void nsIMAPBodyShellCache::Clear()
 {
   while (EjectEntry()) ;
 }
 
 bool nsIMAPBodyShellCache::AddShellToCache(nsIMAPBodyShell *shell)
 {
   // If it's already in the cache, then just return.
   // This has the side-effect of re-ordering the LRU list
   // to put this at the top, which is good, because it's what we want.
   if (FindShellForUID(shell->GetUID(), shell->GetFolderName(), shell->GetContentModified()))
-    return PR_TRUE;
+    return true;
 
   // OK, so it's not in the cache currently.
 
   // First, for safety sake, remove any entry with the given UID,
   // just in case we have a collision between two messages in different
   // folders with the same UID.
   nsRefPtr<nsIMAPBodyShell> foundShell;
   m_shellHash.Get(shell->GetUID(), getter_AddRefs(foundShell));
@@ -1289,17 +1289,17 @@ bool nsIMAPBodyShellCache::AddShellToCac
     m_shellHash.Remove(foundShell->GetUID());
     m_shellList->RemoveElement(foundShell);
   }
 
   // Add the new one to the cache
   m_shellList->AppendElement(shell);
 
   m_shellHash.Put(shell->GetUID(), shell);
-  shell->SetIsCached(PR_TRUE);
+  shell->SetIsCached(true);
 
   // while we're not over our size limit, eject entries
   bool rv = true;
   while (GetSize() > GetMaxSize())
     rv = EjectEntry();
 
   return rv;
 
--- a/mailnews/imap/src/nsIMAPBodyShell.h
+++ b/mailnews/imap/src/nsIMAPBodyShell.h
@@ -65,27 +65,27 @@ public:
 	// Construction
 	virtual bool GetIsValid() { return m_isValid; }
 	virtual void	SetIsValid(bool valid);
 	virtual nsIMAPBodypartType	GetType() = 0;
 
 	// Generation
     // Generates an HTML representation of this part.  Returns content length generated, -1 if failed.
     virtual PRInt32 Generate(nsIMAPBodyShell *aShell, bool /*stream*/, bool /* prefetch */) { return -1; }
-    virtual void AdoptPartDataBuffer(char *buf);    // Adopts storage for part data buffer.  If NULL, sets isValid to PR_FALSE.
-    virtual void AdoptHeaderDataBuffer(char *buf);  // Adopts storage for header data buffer.  If NULL, sets isValid to PR_FALSE.
+    virtual void AdoptPartDataBuffer(char *buf);    // Adopts storage for part data buffer.  If NULL, sets isValid to false.
+    virtual void AdoptHeaderDataBuffer(char *buf);  // Adopts storage for header data buffer.  If NULL, sets isValid to false.
     virtual bool ShouldFetchInline(nsIMAPBodyShell *aShell) { return true; }  // returns true if this part should be fetched inline for generation.
     virtual bool PreflightCheckAllInline(nsIMAPBodyShell *aShell) { return true; }
 
 	virtual bool ShouldExplicitlyFetchInline();
 	virtual bool ShouldExplicitlyNotFetchInline();
         virtual bool IsLastTextPart(const char *partNumberString) {return true;}
 
 protected:
-    // If stream is PR_FALSE, simply returns the content length that will be generated
+    // If stream is false, simply returns the content length that will be generated
     // the body of the part itself
     virtual PRInt32 GeneratePart(nsIMAPBodyShell *aShell, bool stream, bool prefetch);
     // the MIME headers of the part
     virtual PRInt32 GenerateMIMEHeader(nsIMAPBodyShell *aShell, bool stream, bool prefetch); 
     // Generates the MIME boundary wrapper for this part.
     virtual PRInt32 GenerateBoundary(nsIMAPBodyShell *aShell, bool stream, bool prefetch, bool lastBoundary);
     // lastBoundary indicates whether or not this should be the boundary for the
     // final MIME part of the multipart message.
@@ -181,17 +181,17 @@ class nsIMAPBodypartLeaf : public nsIMAP
 public:
   nsIMAPBodypartLeaf(char *partNum, nsIMAPBodypart *parentPart, char *bodyType,
                      char *bodySubType, char *bodyID, char *bodyDescription,
                      char *bodyEncoding, PRInt32 partLength,
                      bool preferPlainText);
 	virtual nsIMAPBodypartType	GetType();
     // Generates an HTML representation of this part.  Returns content length generated, -1 if failed.
     virtual PRInt32 Generate(nsIMAPBodyShell *aShell, bool stream, bool prefetch);
-    // returns PR_TRUE if this part should be fetched inline for generation.
+    // returns true if this part should be fetched inline for generation.
     virtual bool ShouldFetchInline(nsIMAPBodyShell *aShell);
     virtual bool PreflightCheckAllInline(nsIMAPBodyShell *aShell);
 private:
   bool mPreferPlainText;
 };
 
 
 class nsIMAPBodypartMessage : public nsIMAPBodypartLeaf
@@ -253,42 +253,42 @@ public:
   // Runs a single pipelined command which fetches all of the
   // elements in the prefetch queue
   void FlushPrefetchQueue();
   // Fills in buffer (and adopts storage) for header object
   // partNum specifies the message part number to which the
   // headers correspond.  NULL indicates the top-level message
   void AdoptMessageHeaders(char *headers, const char *partNum);
   // Fills in buffer (and adopts storage) for MIME headers in appropriate object.
-  // If object can't be found, sets isValid to PR_FALSE.
+  // If object can't be found, sets isValid to false.
   void AdoptMimeHeader(const char *partNum, char *mimeHeader);
 
   // Generation
   // Streams out an HTML representation of this IMAP message, going along and
   // fetching parts it thinks it needs, and leaving empty shells for the parts
   // it doesn't.
   // Returns number of bytes generated, or -1 if invalid.
   // If partNum is not NULL, then this works to generates a MIME part that hasn't been downloaded yet
   // and leaves out all other parts.  By default, to generate a normal message, partNum should be NULL.
   virtual PRInt32 Generate(char *partNum);
 
   // Returns TRUE if the user has the pref "Show Attachments Inline" set.
   // Returns FALSE if the setting is "Show Attachments as Links"
   virtual bool GetShowAttachmentsInline();
-  // Returns PR_TRUE if all parts are inline, PR_FALSE otherwise. Does not generate anything.
+  // Returns true if all parts are inline, false otherwise. Does not generate anything.
   bool PreflightCheckAllInline();
 
   // Helpers
   nsImapProtocol *GetConnection() { return m_protocolConnection; }
   bool GetPseudoInterrupted();
   bool DeathSignalReceived();
   nsCString &GetUID() { return m_UID; }
   const char *GetFolderName() { return m_folderName; }
   char *GetGeneratingPart() { return m_generatingPart; }
-  // Returns PR_TRUE if this is in the process of being generated,
+  // Returns true if this is in the process of being generated,
   // so we don't re-enter
   bool IsBeingGenerated() { return m_isBeingGenerated; }
   bool IsShellCached() { return m_cached; }
   void SetIsCached(bool isCached) { m_cached = isCached; }
   bool GetGeneratingWholeMessage() { return m_generatingWholeMessage; }
   IMAP_ContentModifiedType	GetContentModified() { return m_contentModified; }
   void SetContentModified(IMAP_ContentModifiedType modType) { m_contentModified = modType; }
 protected:
@@ -302,17 +302,17 @@ protected:
   nsCString                       m_UID;                  // UID of this message
   char                            *m_folderName;          // folder that contains this message
   char                            *m_generatingPart;      // If a specific part is being generated, this is it.  Otherwise, NULL.
   bool                            m_isBeingGenerated;     // true if this body shell is in the process of being generated
   bool                            m_gotAttachmentPref;    // Whether or not m_showAttachmentsInline has been initialized 
   bool                            m_showAttachmentsInline; // Whether or not we should display attachment inline
   bool                            m_cached;                 // Whether or not this shell is cached
   bool                            m_generatingWholeMessage; // whether or not we are generating the whole (non-MPOD) message
-                                                          // Set to PR_FALSE if we are generating by parts
+                                                          // Set to false if we are generating by parts
   // under what conditions the content has been modified.
   // Either IMAP_CONTENT_MODIFIED_VIEW_INLINE or IMAP_CONTENT_MODIFIED_VIEW_AS_LINKS
   IMAP_ContentModifiedType        m_contentModified; 
 };
 
 
 
 // This class caches shells, so we don't have to always go and re-fetch them.
@@ -337,18 +337,18 @@ public:
   // Looks up a shell in the cache given the message's UID.
   nsIMAPBodyShell *FindShellForUID(nsCString &UID, const char *mailboxName,
                                    IMAP_ContentModifiedType modType);
   void Clear();
 
 protected:
   nsIMAPBodyShellCache();
   // Chooses an entry to eject;  deletes that entry;  and ejects it from the
-  // cache, clearing up a new space.  Returns PR_TRUE if it found an entry
-  // to eject, PR_FALSE otherwise.
+  // cache, clearing up a new space.  Returns true if it found an entry
+  // to eject, false otherwise.
   bool EjectEntry();
   PRUint32 GetSize() { return m_shellList->Count(); }
   PRUint32 GetMaxSize() { return 20; }
   nsVoidArray *m_shellList; // For maintenance
   // For quick lookup based on UID
   nsRefPtrHashtableMT <nsCStringHashKey, nsIMAPBodyShell> m_shellHash;
 };
 
--- a/mailnews/imap/src/nsIMAPGenericParser.cpp
+++ b/mailnews/imap/src/nsIMAPGenericParser.cpp
@@ -47,39 +47,39 @@
 
 
 nsIMAPGenericParser::nsIMAPGenericParser() :
 fNextToken(nsnull),
 fCurrentLine(nsnull),
 fLineOfTokens(nsnull),
 fStartOfLineOfTokens(nsnull),
 fCurrentTokenPlaceHolder(nsnull),
-fAtEndOfLine(PR_FALSE),
+fAtEndOfLine(false),
 fParserState(stateOK)
 {
 }
 
 nsIMAPGenericParser::~nsIMAPGenericParser()
 {
   PR_FREEIF( fCurrentLine );
   PR_FREEIF( fStartOfLineOfTokens);
 }
 
 void nsIMAPGenericParser::HandleMemoryFailure()
 {
-  SetConnected(PR_FALSE);
+  SetConnected(false);
 }
 
 void nsIMAPGenericParser::ResetLexAnalyzer()
 {
   PR_FREEIF( fCurrentLine );
   PR_FREEIF( fStartOfLineOfTokens );
   
   fNextToken = fCurrentLine = fLineOfTokens = fStartOfLineOfTokens = fCurrentTokenPlaceHolder = nsnull;
-  fAtEndOfLine = PR_FALSE;
+  fAtEndOfLine = false;
 }
 
 bool nsIMAPGenericParser::LastCommandSuccessful()
 {
   return fParserState == stateOK;
 }
 
 void nsIMAPGenericParser::SetSyntaxError(bool error, const char *msg)
@@ -162,35 +162,35 @@ void nsIMAPGenericParser::AdvanceToNextT
         return;
       }
       fLineOfTokens = fStartOfLineOfTokens;
       fCurrentTokenPlaceHolder = fStartOfLineOfTokens;
     }
     fNextToken = NS_strtok(WHITESPACE, &fCurrentTokenPlaceHolder);
     if (!fNextToken)
     {
-      fAtEndOfLine = PR_TRUE;
+      fAtEndOfLine = true;
       fNextToken = CRLF;
     }
   }
 }
 
 void nsIMAPGenericParser::AdvanceToNextLine()
 {
   PR_FREEIF( fCurrentLine );
   PR_FREEIF( fStartOfLineOfTokens);
   
   bool ok = GetNextLineForParser(&fCurrentLine);
   if (!ok)
   {
-    SetConnected(PR_FALSE);
+    SetConnected(false);
     fStartOfLineOfTokens = nsnull;
     fLineOfTokens = nsnull;
     fCurrentTokenPlaceHolder = nsnull;
-    fAtEndOfLine = PR_TRUE;
+    fAtEndOfLine = true;
     fNextToken = CRLF;
   }
   else if (!fCurrentLine)
   {
     HandleMemoryFailure();
   }
   else
   {
@@ -241,17 +241,17 @@ void nsIMAPGenericParser::AdvanceTokeniz
 // the end of the Astring.  Call AdvanceToNextToken() to get the token after it.
 char *nsIMAPGenericParser::CreateAstring()
 {
   if (*fNextToken == '{')
     return CreateLiteral();		// literal
   else if (*fNextToken == '"')
     return CreateQuoted();		// quoted
   else
-    return CreateAtom(PR_TRUE); // atom
+    return CreateAtom(true); // atom
 }
 
 // Create an atom
 // This function does not advance the parser.
 // Call AdvanceToNextToken() to get the next token after the atom.
 // RFC3501:  atom            = 1*ATOM-CHAR
 //           ASTRING-CHAR    = ATOM-CHAR / resp-specials
 //           ATOM-CHAR       = <any CHAR except atom-specials>
@@ -273,17 +273,17 @@ char *nsIMAPGenericParser::CreateAtom(bo
   // 1-31 (CTL), 32 (SP), 34 '"', 37 '%', 40-42 "()*", 92 '\\', 123 '{'
   // also, ']' is only allowed in astrings
   char *last = rv;
   char c = *last;
   while ((c > 42 || c == 33 || c == 35 || c == 36 || c == 38 || c == 39)
          && c != '\\' && c != '{' && (isAstring || c != ']'))
      c = *++last;
   if (rv == last) {
-     SetSyntaxError(PR_TRUE, "no atom characters found");
+     SetSyntaxError(true, "no atom characters found");
      PL_strfree(rv);
      return nsnull;
   }
   if (*last)
   {
     // not the whole token was consumed  
     *last = '\0';
     AdvanceTokenizerStartingPoint((fNextToken - fLineOfTokens) + (last-rv));
@@ -326,17 +326,17 @@ char *nsIMAPGenericParser::CreateString(
   }
   else if (*fNextToken == '"')
   {
     char *rv = CreateQuoted();		// quoted
     return (rv);
   }
   else
   {
-    SetSyntaxError(PR_TRUE, "string does not start with '{' or '\"'");
+    SetSyntaxError(true, "string does not start with '{' or '\"'");
     return NULL;
   }
 }
 
 // This function sets fCurrentTokenPlaceHolder immediately after the end of the
 // closing quote.  Call AdvanceToNextToken() to get the token after it.
 // QUOTED_CHAR     ::= <any TEXT_CHAR except quoted_specials> /
 //                     "\" quoted_specials
@@ -351,17 +351,17 @@ char *nsIMAPGenericParser::CreateQuoted(
   
   int escapeCharsCut = 0;
   nsCString returnString(currentChar);
   int charIndex;
   for (charIndex = 0; returnString.CharAt(charIndex) != '"'; charIndex++)
   {
     if (!returnString.CharAt(charIndex))
     {
-      SetSyntaxError(PR_TRUE, "no closing '\"' found in quoted");
+      SetSyntaxError(true, "no closing '\"' found in quoted");
       return nsnull;
     }
     else if (returnString.CharAt(charIndex) == '\\')
     {
       // eat the escape character, but keep the escaped character
       returnString.Cut(charIndex, 1);
       escapeCharsCut++;
     }
@@ -502,17 +502,17 @@ char *nsIMAPGenericParser::CreateParenGr
         if (numOpenParens == 0)
           break;
       }
     }
   }
   
   if (numOpenParens != 0 || !ContinueParse())
   {
-    SetSyntaxError(PR_TRUE, "closing ')' not found in paren group");
+    SetSyntaxError(true, "closing ')' not found in paren group");
     return nsnull;
   }
 
   returnString.Append(parenGroupStart, fCurrentTokenPlaceHolder - parenGroupStart);
   AdvanceToNextToken();  
   return ToNewCString(returnString);
 }
 
--- a/mailnews/imap/src/nsIMAPGenericParser.h
+++ b/mailnews/imap/src/nsIMAPGenericParser.h
@@ -63,18 +63,18 @@ public:
   void SetConnected(bool error);
     
 protected:
 
 	// This is a pure virtual member which must be overridden in the derived class
 	// for each different implementation of a nsIMAPGenericParser.
 	// For instance, one implementation (the nsIMAPServerState) might get the next line
 	// from an open socket, whereas another implementation might just get it from a buffer somewhere.
-	// This fills in nextLine with the buffer, and returns PR_TRUE if everything is OK.
-	// Returns PR_FALSE if there was some error encountered.  In that case, we reset the parser.
+	// This fills in nextLine with the buffer, and returns true if everything is OK.
+	// Returns false if there was some error encountered.  In that case, we reset the parser.
 	virtual bool	GetNextLineForParser(char **nextLine) = 0;	
 
   virtual void	HandleMemoryFailure();
   void skip_to_CRLF();
   void skip_to_close_paren();
   char *CreateString();
   char *CreateAstring();
   char *CreateNilString();
--- a/mailnews/imap/src/nsIMAPHostSessionList.cpp
+++ b/mailnews/imap/src/nsIMAPHostSessionList.cpp
@@ -54,34 +54,34 @@ nsIMAPHostInfo::nsIMAPHostInfo(const cha
   fServerKey = serverKey;
   NS_ASSERTION(server, "*** Fatal null imap incoming server...\n");
   server->GetServerDirectory(fOnlineDir);
   fNextHost = NULL;
   fCachedPassword = NULL;
   fCapabilityFlags = kCapabilityUndefined;
   fHierarchyDelimiters = NULL;
 #ifdef DEBUG_bienvenu1
-  fHaveWeEverDiscoveredFolders = PR_TRUE; // try this, see what bad happens - we'll need to
+  fHaveWeEverDiscoveredFolders = true; // try this, see what bad happens - we'll need to
   // figure out a way to make new accounts have it be false
 #else
-  fHaveWeEverDiscoveredFolders = PR_FALSE; // try this, see what bad happens
+  fHaveWeEverDiscoveredFolders = false; // try this, see what bad happens
 #endif
   fCanonicalOnlineSubDir = NULL;
   fNamespaceList = nsIMAPNamespaceList::CreatensIMAPNamespaceList();
-  fUsingSubscription = PR_TRUE;
+  fUsingSubscription = true;
   server->GetUsingSubscription(&fUsingSubscription);
-  fOnlineTrashFolderExists = PR_FALSE;
-  fShouldAlwaysListInbox = PR_TRUE;
+  fOnlineTrashFolderExists = false;
+  fShouldAlwaysListInbox = true;
   fShellCache = nsIMAPBodyShellCache::Create();
-  fPasswordVerifiedOnline = PR_FALSE;
-  fDeleteIsMoveToTrash = PR_TRUE;
-  fShowDeletedMessages = PR_FALSE;
-  fGotNamespaces = PR_FALSE;
-  fHaveAdminURL = PR_FALSE;
-  fNamespacesOverridable = PR_TRUE;
+  fPasswordVerifiedOnline = false;
+  fDeleteIsMoveToTrash = true;
+  fShowDeletedMessages = false;
+  fGotNamespaces = false;
+  fHaveAdminURL = false;
+  fNamespacesOverridable = true;
   server->GetOverrideNamespaces(&fNamespacesOverridable);
   fTempNamespaceList = nsIMAPNamespaceList::CreatensIMAPNamespaceList();
 }
 
 nsIMAPHostInfo::~nsIMAPHostInfo()
 {
   PR_Free(fCachedPassword);
   PR_Free(fHierarchyDelimiters);
@@ -109,18 +109,18 @@ nsIMAPHostSessionList::~nsIMAPHostSessio
 }
 
 nsresult nsIMAPHostSessionList::Init()
 {
   nsresult rv;
   nsCOMPtr<nsIObserverService> observerService = do_GetService("@mozilla.org/observer-service;1", &rv);
   if (NS_SUCCEEDED(rv))
   {
-    observerService->AddObserver(this, "profile-before-change", PR_TRUE);
-    observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_TRUE);
+    observerService->AddObserver(this, "profile-before-change", true);
+    observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, true);
   }
   return rv;
 }
 
 
 NS_IMETHODIMP nsIMAPHostSessionList::Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *someData)
 {
   nsresult rv;
@@ -230,17 +230,17 @@ NS_IMETHODIMP nsIMAPHostSessionList::Set
   return (host == NULL) ? NS_ERROR_ILLEGAL_VALUE : NS_OK;
 }
 
 NS_IMETHODIMP nsIMAPHostSessionList::SetPasswordVerifiedOnline(const char *serverKey)
 {
   PR_EnterMonitor(gCachedHostInfoMonitor);
   nsIMAPHostInfo *host = FindHost(serverKey);
   if (host)
-    host->fPasswordVerifiedOnline = PR_TRUE;
+    host->fPasswordVerifiedOnline = true;
   PR_ExitMonitor(gCachedHostInfoMonitor);
   return (host == NULL) ? NS_ERROR_ILLEGAL_VALUE : NS_OK;
 }
 
 NS_IMETHODIMP nsIMAPHostSessionList::GetPasswordVerifiedOnline(const char *serverKey, bool &result)
 {
   PR_EnterMonitor(gCachedHostInfoMonitor);
   nsIMAPHostInfo *host = FindHost(serverKey);
@@ -442,17 +442,17 @@ NS_IMETHODIMP nsIMAPHostSessionList::Set
       {
         int len = host->fNamespaceList->UnserializeNamespaces(namespacePref, prefixes, numNamespaces);
         for (int i = 0; i < len; i++)
         {
           char *thisns = prefixes[i];
           char delimiter = '/';	// a guess
           if (PL_strlen(thisns) >= 1)
             delimiter = thisns[PL_strlen(thisns)-1];
-          nsIMAPNamespace *ns = new nsIMAPNamespace(nstype, thisns, delimiter, PR_TRUE);
+          nsIMAPNamespace *ns = new nsIMAPNamespace(nstype, thisns, delimiter, true);
           if (ns)
             host->fNamespaceList->AddNewNamespace(ns);
           PR_FREEIF(thisns);
         }
         PR_Free(prefixes);
       }
     }
   }
@@ -471,28 +471,28 @@ NS_IMETHODIMP nsIMAPHostSessionList::Get
 }
 
 
 NS_IMETHODIMP nsIMAPHostSessionList::ClearPrefsNamespacesForHost(const char *serverKey)
 {
   PR_EnterMonitor(gCachedHostInfoMonitor);
   nsIMAPHostInfo *host = FindHost(serverKey);
   if (host)
-    host->fNamespaceList->ClearNamespaces(PR_TRUE, PR_FALSE, PR_TRUE);
+    host->fNamespaceList->ClearNamespaces(true, false, true);
   PR_ExitMonitor(gCachedHostInfoMonitor);
   return (host == NULL) ? NS_ERROR_ILLEGAL_VALUE : NS_OK;
 }
 
 
 NS_IMETHODIMP nsIMAPHostSessionList::ClearServerAdvertisedNamespacesForHost(const char *serverKey)
 {
   PR_EnterMonitor(gCachedHostInfoMonitor);
   nsIMAPHostInfo *host = FindHost(serverKey);
   if (host)
-    host->fNamespaceList->ClearNamespaces(PR_FALSE, PR_TRUE, PR_TRUE);
+    host->fNamespaceList->ClearNamespaces(false, true, true);
   PR_ExitMonitor(gCachedHostInfoMonitor);
   return (host == NULL) ? NS_ERROR_ILLEGAL_VALUE : NS_OK;
 }
 
 NS_IMETHODIMP nsIMAPHostSessionList::GetDefaultNamespaceOfTypeForHost(const char *serverKey, EIMAPNamespaceType type, nsIMAPNamespace * &result)
 {
   PR_EnterMonitor(gCachedHostInfoMonitor);
   nsIMAPHostInfo *host = FindHost(serverKey);
@@ -550,17 +550,17 @@ nsresult nsIMAPHostSessionList::SetNames
 {
   if (type == kPersonalNamespace)
     aHost->SetPersonalNamespace(nsDependentCString(pref));
   else if (type == kPublicNamespace)
     aHost->SetPublicNamespace(nsDependentCString(pref));
   else if (type == kOtherUsersNamespace)
     aHost->SetOtherUsersNamespace(nsDependentCString(pref));
   else
-    NS_ASSERTION(PR_FALSE, "bogus namespace type");
+    NS_ASSERTION(false, "bogus namespace type");
   return NS_OK;
 
 }
 // do we need this? What should we do about the master thing?
 // Make sure this is running in the Mozilla thread when called
 NS_IMETHODIMP nsIMAPHostSessionList::CommitNamespacesForHost(nsIImapIncomingServer *aHost)
 {
   NS_ENSURE_ARG_POINTER(aHost);
@@ -571,17 +571,17 @@ NS_IMETHODIMP nsIMAPHostSessionList::Com
 
   nsresult rv = incomingServer->GetKey(serverKey);
   NS_ENSURE_SUCCESS(rv, rv);
 
   PR_EnterMonitor(gCachedHostInfoMonitor);
   nsIMAPHostInfo *host = FindHost(serverKey.get());
   if (host)
   {
-    host->fGotNamespaces = PR_TRUE;	// so we only issue NAMESPACE once per host per session.
+    host->fGotNamespaces = true;	// so we only issue NAMESPACE once per host per session.
     EIMAPNamespaceType type = kPersonalNamespace;
     for (int i = 1; i <= 3; i++)
     {
       switch(i)
       {
       case 1:
         type = kPersonalNamespace;
         break;
@@ -622,32 +622,32 @@ NS_IMETHODIMP nsIMAPHostSessionList::Com
         if (pref)
         {
           SetNamespacesPrefForHost(aHost, type, pref);
           PR_Free(pref);
         }
       }
     }
     // clear, but don't delete the entries in, the temp namespace list
-    host->fTempNamespaceList->ClearNamespaces(PR_TRUE, PR_TRUE, PR_FALSE);
+    host->fTempNamespaceList->ClearNamespaces(true, true, false);
 
     // Now reset all of libmsg's namespace references.
     // Did I mention this needs to be running in the mozilla thread?
     aHost->ResetNamespaceReferences();
   }
   PR_ExitMonitor(gCachedHostInfoMonitor);
   return (host == NULL) ? NS_ERROR_ILLEGAL_VALUE : NS_OK;
 }
 
 NS_IMETHODIMP nsIMAPHostSessionList::FlushUncommittedNamespacesForHost(const char *serverKey, bool &result)
 {
 	PR_EnterMonitor(gCachedHostInfoMonitor);
 	nsIMAPHostInfo *host = FindHost(serverKey);
 	if (host)
-		host->fTempNamespaceList->ClearNamespaces(PR_TRUE, PR_TRUE, PR_TRUE);
+		host->fTempNamespaceList->ClearNamespaces(true, true, true);
 	PR_ExitMonitor(gCachedHostInfoMonitor);
 	return (host == NULL) ? NS_ERROR_ILLEGAL_VALUE : NS_OK;
 }
 
 
 // Returns NULL if there is no personal namespace on the given host
 NS_IMETHODIMP nsIMAPHostSessionList::GetOnlineInboxPathForHost(const char *serverKey, nsString &result)
 {
@@ -666,17 +666,17 @@ NS_IMETHODIMP nsIMAPHostSessionList::Get
   else
     result.Truncate();
   PR_ExitMonitor(gCachedHostInfoMonitor);
   return (host == NULL) ? NS_ERROR_ILLEGAL_VALUE : NS_OK;
 }
 
 NS_IMETHODIMP nsIMAPHostSessionList::GetShouldAlwaysListInboxForHost(const char* /*serverKey*/, bool &result)
 {
-	result = PR_TRUE;
+	result = true;
 
 	/*
 	PR_EnterMonitor(gCachedHostInfoMonitor);
 	nsIMAPHostInfo *host = FindHost(serverKey);
 	if (host)
 		ret = host->fShouldAlwaysListInbox;
 	PR_ExitMonitor(gCachedHostInfoMonitor);
 	*/
@@ -696,17 +696,17 @@ NS_IMETHODIMP nsIMAPHostSessionList::Set
 NS_IMETHODIMP nsIMAPHostSessionList::SetNamespaceHierarchyDelimiterFromMailboxForHost(const char *serverKey, const char *boxName, char delimiter)
 {
   PR_EnterMonitor(gCachedHostInfoMonitor);
   nsIMAPHostInfo *host = FindHost(serverKey);
   if (host)
   {
     nsIMAPNamespace *ns = host->fNamespaceList->GetNamespaceForMailbox(boxName);
     if (ns && !ns->GetIsDelimiterFilledIn())
-      ns->SetDelimiter(delimiter, PR_TRUE);
+      ns->SetDelimiter(delimiter, true);
   }
   PR_ExitMonitor(gCachedHostInfoMonitor);
   return (host) ? NS_OK : NS_ERROR_ILLEGAL_VALUE ;
 }
 
 NS_IMETHODIMP nsIMAPHostSessionList::AddShellToCacheForHost(const char *serverKey, nsIMAPBodyShell *shell)
 {
 	PR_EnterMonitor(gCachedHostInfoMonitor);
@@ -717,17 +717,17 @@ NS_IMETHODIMP nsIMAPHostSessionList::Add
 		{
 			bool rv = host->fShellCache->AddShellToCache(shell);
 			PR_ExitMonitor(gCachedHostInfoMonitor);
 			return rv;
 		}
 		else
 		{
 			PR_ExitMonitor(gCachedHostInfoMonitor);
-			return PR_FALSE;
+			return false;
 		}
 	}
 	PR_ExitMonitor(gCachedHostInfoMonitor);
 	return (host == NULL) ? NS_ERROR_ILLEGAL_VALUE : NS_OK;
 }
 
 NS_IMETHODIMP nsIMAPHostSessionList::FindShellInCacheForHost(const char *serverKey, const char *mailboxName, const char *UID,
                                                              IMAP_ContentModifiedType modType, nsIMAPBodyShell **shell)
--- a/mailnews/imap/src/nsIMAPNamespace.cpp
+++ b/mailnews/imap/src/nsIMAPNamespace.cpp
@@ -118,17 +118,17 @@ nsresult nsIMAPNamespaceList::InitFromSt
 		{
 			int len = UnserializeNamespaces(nameSpaceString, prefixes, numNamespaces);
 			for (int i = 0; i < len; i++)
 			{
 				char *thisns = prefixes[i];
 				char delimiter = '/';	// a guess
 				if (PL_strlen(thisns) >= 1)
 					delimiter = thisns[PL_strlen(thisns)-1];
-				nsIMAPNamespace *ns = new nsIMAPNamespace(nstype, thisns, delimiter, PR_TRUE);
+				nsIMAPNamespace *ns = new nsIMAPNamespace(nstype, thisns, delimiter, true);
 				if (ns)
 					AddNewNamespace(ns);
 				PR_FREEIF(thisns);
 			}
 			PR_Free(prefixes);
 		}
 	}
 
@@ -216,17 +216,17 @@ nsIMAPNamespace *nsIMAPNamespaceList::Ge
 	}
 	if (!rv)
 		rv = firstOfType;
 	return rv;
 }
 
 nsIMAPNamespaceList::~nsIMAPNamespaceList()
 {
-	ClearNamespaces(PR_TRUE, PR_TRUE, PR_TRUE);
+	ClearNamespaces(true, true, true);
 }
 
 // ClearNamespaces removes and deletes the namespaces specified, and if there are no namespaces left,
 void nsIMAPNamespaceList::ClearNamespaces(bool deleteFromPrefsNamespaces, bool deleteServerAdvertisedNamespaces, bool reallyDelete)
 {
 	int nodeIndex;
 	
     // iterate backwards because we delete elements
@@ -498,17 +498,17 @@ nsIMAPNamespace* nsIMAPNamespaceList::Ge
              do_GetService(kCImapHostSessionListCID, &rv);
     if (NS_FAILED(rv)) 
       return nsnull;
     hostSessionList->GetNamespaceForMailboxForHost(hostName, convertedFolderName, resultNamespace);
     PR_Free(convertedFolderName);
   }
   else
   {
-    NS_ASSERTION(PR_FALSE, "couldn't get converted folder name");
+    NS_ASSERTION(false, "couldn't get converted folder name");
   }
   
   return resultNamespace;
 }
 
 /* static */
 char *nsIMAPNamespaceList::AllocateServerFolderName(const char *canonicalFolderName, char delimiter)
 {
@@ -525,17 +525,17 @@ char *nsIMAPNamespaceList::AllocateServe
 	owned by another user.  This function extracts the folder owner's name from the
 	canonical name of the folder, and returns an allocated copy of that owner's name
 */
 /* static */
 char *nsIMAPNamespaceList::GetFolderOwnerNameFromPath(nsIMAPNamespace *namespaceForFolder, const char *canonicalFolderName)
 {
   if (!namespaceForFolder || !canonicalFolderName)
   {
-    NS_ASSERTION(PR_FALSE,"null namespace or canonical folder name");
+    NS_ASSERTION(false,"null namespace or canonical folder name");
     return nsnull;
   }
   
   char *rv = nsnull;
   
   // convert the canonical path to the online path
   char *convertedFolderName = AllocateServerFolderName(canonicalFolderName, namespaceForFolder->GetDelimiter());
   if (convertedFolderName)
@@ -554,17 +554,17 @@ char *nsIMAPNamespaceList::GetFolderOwne
         *nextDelimiter = 0;
       }
       rv = PL_strdup(owner);
     }
     PR_Free(convertedFolderName);
   }
   else
   {
-    NS_ASSERTION(PR_FALSE, "couldn't allocate server folder name");
+    NS_ASSERTION(false, "couldn't allocate server folder name");
   }
   
   return rv;
 }
 
 /*
 GetFolderIsNamespace returns TRUE if the given folder is the folder representing
 a namespace.
@@ -576,17 +576,17 @@ bool nsIMAPNamespaceList::GetFolderIsNam
 {
   NS_ASSERTION(namespaceForFolder, "null namespace");
   
   bool rv = false;
   
   const char *prefix = namespaceForFolder->GetPrefix();
   NS_ASSERTION(prefix, "namespace has no prefix");
   if (!prefix || !*prefix)	// empty namespace prefix
-    return PR_FALSE;
+    return false;
   
   char *convertedFolderName = AllocateServerFolderName(canonicalFolderName, delimiter);
   if (convertedFolderName)
   {
     bool lastCharIsDelimiter = (prefix[strlen(prefix) - 1] == delimiter);
     
     if (lastCharIsDelimiter)
     {
@@ -597,34 +597,34 @@ bool nsIMAPNamespaceList::GetFolderIsNam
     {
       rv = (strcmp(convertedFolderName, prefix) == 0);
     }
     
     PR_Free(convertedFolderName);
   }
   else
   {
-    NS_ASSERTION(PR_FALSE, "couldn't allocate server folder name");
+    NS_ASSERTION(false, "couldn't allocate server folder name");
   }
   
   return rv;
 }
 
 /*
   SuggestHierarchySeparatorForNamespace takes a namespace from libmsg
   and a hierarchy delimiter.  If the namespace has not been filled in from
   online NAMESPACE command yet, it fills in the suggested delimiter to be
   used from then on (until it is overridden by an online response).
 */
 
 void nsIMAPNamespaceList::SuggestHierarchySeparatorForNamespace(nsIMAPNamespace *namespaceForFolder, char delimiterFromFolder)
 {
   NS_ASSERTION(namespaceForFolder, "need namespace");
   if (namespaceForFolder && !namespaceForFolder->GetIsDelimiterFilledIn())
-    namespaceForFolder->SetDelimiter(delimiterFromFolder, PR_FALSE);
+    namespaceForFolder->SetDelimiter(delimiterFromFolder, false);
 }
 
 
 /*
  GenerateFullFolderNameWithDefaultNamespace takes a folder name in canonical form,
   converts it to online form, allocates a string to contain the full online server name
   including the namespace prefix of the default namespace of the given type, in the form:
   PR_smprintf("%s%s", prefix, onlineServerName) if there is a NULL owner
@@ -671,19 +671,19 @@ char *nsIMAPNamespaceList::GenerateFullF
       {
         fullFolderName = AllocateCanonicalFolderName(convertedReturnName, ns->GetDelimiter());
         PR_Free(convertedReturnName);
       }
       PR_Free(convertedFolderName);
     }
     else
     {
-      NS_ASSERTION(PR_FALSE, "couldn't allocate server folder name");
+      NS_ASSERTION(false, "couldn't allocate server folder name");
     }
   }
   else
   {
     // Could not find other users namespace on the given host
-    NS_ASSERTION(PR_FALSE, "couldn't find namespace for given host");
+    NS_ASSERTION(false, "couldn't find namespace for given host");
   }
   return (fullFolderName);
 }
 
--- a/mailnews/imap/src/nsImapFlagAndUidState.cpp
+++ b/mailnews/imap/src/nsImapFlagAndUidState.cpp
@@ -111,17 +111,17 @@ NS_IMETHODIMP nsImapFlagAndUidState::Get
 
 nsImapFlagAndUidState::nsImapFlagAndUidState(PRInt32 numberOfMessages)
   : fUids(numberOfMessages),
     fFlags(numberOfMessages),
     mLock("nsImapFlagAndUidState.mLock")
 {
   fSupportedUserFlags = 0;
   fNumberDeleted = 0;
-  fPartialUIDFetch = PR_TRUE;
+  fPartialUIDFetch = true;
   m_customFlagsHash.Init(10);
 }
 
 /* static */PLDHashOperator nsImapFlagAndUidState::FreeCustomFlags(const PRUint32 &aKey, char *aData,
                                         void *closure)
 {
   PR_Free(aData);
   return PL_DHASH_NEXT;
@@ -155,17 +155,17 @@ NS_IMETHODIMP nsImapFlagAndUidState::Res
 {
   PR_CEnterMonitor(this);
   fNumberDeleted = 0;
   if (m_customFlagsHash.IsInitialized())
     m_customFlagsHash.EnumerateRead(FreeCustomFlags, nsnull);
   m_customFlagsHash.Clear();
   fUids.Clear();
   fFlags.Clear();
-  fPartialUIDFetch = PR_TRUE;
+  fPartialUIDFetch = true;
   PR_CExitMonitor(this);
   return NS_OK;
 }
 
 
 // Remove (expunge) a message from our array, since now it is gone for good
 
 NS_IMETHODIMP nsImapFlagAndUidState::ExpungeByIndex(PRUint32 msgIndex)
@@ -247,22 +247,22 @@ PRUint32  nsImapFlagAndUidState::GetHigh
 // Has the user read the last message here ? Used when we first open the inbox to see if there
 // really is new mail there.
 
 bool nsImapFlagAndUidState::IsLastMessageUnseen()
 {
   PRUint32 msgIndex = fUids.Length();
   
   if (msgIndex <= 0)
-    return PR_FALSE;
+    return false;
   msgIndex--;
   // if last message is deleted, it was probably filtered the last time around
   if (fUids[msgIndex] && (fFlags[msgIndex] & (kImapMsgSeenFlag | kImapMsgDeletedFlag)))
-    return PR_FALSE;
-  return PR_TRUE; 
+    return false;
+  return true; 
 }
 
 // find a message flag given a key with non-recursive binary search, since some folders
 // may have thousand of messages, once we find the key set its index, or the index of
 // where the key should be inserted
 
 imapMessageFlagsType nsImapFlagAndUidState::GetMessageFlagsFromUID(PRUint32 uid, bool *foundIt, PRInt32 *ndx)
 {
--- a/mailnews/imap/src/nsImapIncomingServer.cpp
+++ b/mailnews/imap/src/nsImapIncomingServer.cpp
@@ -104,21 +104,21 @@ NS_INTERFACE_MAP_BEGIN(nsImapIncomingSer
   NS_INTERFACE_MAP_ENTRY(nsISubscribableServer)
   NS_INTERFACE_MAP_ENTRY(nsIUrlListener)
 NS_INTERFACE_MAP_END_INHERITING(nsMsgIncomingServer)
 
 nsImapIncomingServer::nsImapIncomingServer()
   : mLock("nsImapIncomingServer.mLock")
 {
   m_capability = kCapabilityUndefined;
-  mDoingSubscribeDialog = PR_FALSE;
-  mDoingLsub = PR_FALSE;
-  m_canHaveFilters = PR_TRUE;
-  m_userAuthenticated = PR_FALSE;
-  m_shuttingDown = PR_FALSE;
+  mDoingSubscribeDialog = false;
+  mDoingLsub = false;
+  m_canHaveFilters = true;
+  m_userAuthenticated = false;
+  m_shuttingDown = false;
 }
 
 nsImapIncomingServer::~nsImapIncomingServer()
 {
   nsresult rv = ClearInner();
   NS_ASSERTION(NS_SUCCEEDED(rv), "ClearInner failed");
   CloseCachedConnections();
 }
@@ -454,17 +454,17 @@ nsImapIncomingServer::GetImapConnectionA
   if (aProtocol)
   {
     rv = aProtocol->LoadImapUrl(mailnewsurl, aConsumer);
     // *** jt - in case of the time out situation or the connection gets
     // terminated by some unforseen problems let's give it a second chance
     // to run the url
     if (NS_FAILED(rv))
     {
-      NS_ASSERTION(PR_FALSE, "shouldn't get an error loading url");
+      NS_ASSERTION(false, "shouldn't get an error loading url");
       rv = aProtocol->LoadImapUrl(mailnewsurl, aConsumer);
     }
   }
   else
   {   // unable to get an imap connection to run the url; add to the url
     // queue
     nsImapProtocol::LogImapUrl("queuing url", aImapUrl);
     PR_CEnterMonitor(this);
@@ -565,23 +565,23 @@ nsImapIncomingServer::LoadNextQueuedUrl(
           {
             nsImapProtocol::LogImapUrl("playing queued url", aImapUrl);
             rv = protocolInstance->LoadImapUrl(url, aConsumer);
             NS_ASSERTION(NS_SUCCEEDED(rv), "failed running queued url");
             bool isInbox;
             protocolInstance->IsBusy(&urlRun, &isInbox);
             if (!urlRun)
               nsImapProtocol::LogImapUrl("didn't need to run", aImapUrl);
-            removeUrlFromQueue = PR_TRUE;
+            removeUrlFromQueue = true;
           }
         }
         else
         {
           nsImapProtocol::LogImapUrl("failed creating protocol instance to play queued url", aImapUrl);
-          keepGoing = PR_FALSE;
+          keepGoing = false;
         }
         NS_IF_RELEASE(aConsumer);
       }
       if (removeUrlFromQueue)
       {
         m_urlQueue.RemoveObjectAt(0);
         m_urlConsumers.RemoveElementAt(0);
       }
@@ -640,29 +640,29 @@ nsresult nsImapIncomingServer::DoomUrlIf
       nsresult requestStatus;
       nsCOMPtr<nsIRequest> request = do_QueryInterface(mockChannel);
       if (!request)
         return NS_ERROR_FAILURE;
       request->GetStatus(&requestStatus);
       if (NS_FAILED(requestStatus))
       {
         nsresult res;
-        *urlDoomed = PR_TRUE;
+        *urlDoomed = true;
         nsImapProtocol::LogImapUrl("dooming url", aImapUrl);
 
         mockChannel->Close(); // try closing it to get channel listener nulled out.
 
         if (aMailNewsUrl)
         {
           nsCOMPtr<nsICacheEntryDescriptor>  cacheEntry;
           res = aMailNewsUrl->GetMemCacheEntry(getter_AddRefs(cacheEntry));
           if (NS_SUCCEEDED(res) && cacheEntry)
             cacheEntry->Doom();
           // we're aborting this url - tell listeners
-          aMailNewsUrl->SetUrlState(PR_FALSE, NS_MSG_ERROR_URL_ABORTED);
+          aMailNewsUrl->SetUrlState(false, NS_MSG_ERROR_URL_ABORTED);
         }
       }
     }
   }
   return rv;
 }
 
 NS_IMETHODIMP
@@ -704,18 +704,18 @@ nsImapIncomingServer::ConnectionTimeOut(
   LL_SUB(t, elapsedTime, cacheTimeoutLimits);
   if (LL_GE_ZERO(t))
   {
       nsCOMPtr<nsIImapProtocol> aProtocol(do_QueryInterface(aConnection,
                                                             &rv));
       if (NS_SUCCEEDED(rv) && aProtocol)
       {
         RemoveConnection(aConnection);
-        aProtocol->TellThreadToDie(PR_FALSE);
-        retVal = PR_TRUE;
+        aProtocol->TellThreadToDie(false);
+        retVal = true;
       }
   }
   return retVal;
 }
 
 nsresult
 nsImapIncomingServer::GetImapConnection(nsIEventTarget *aEventTarget,
                                            nsIImapUrl * aImapUrl,
@@ -928,17 +928,17 @@ NS_IMETHODIMP nsImapIncomingServer::Clos
     connection = m_connectionCache[i];
     if (connection)
     {
       rv = connection->GetSelectedMailboxName(getter_Copies(connectionFolderName));
       if (connectionFolderName.Equals(inFolderName))
       {
         rv = connection->IsBusy(&isBusy, &isInbox);
         if (!isBusy)
-          rv = connection->TellThreadToDie(PR_TRUE);
+          rv = connection->TellThreadToDie(true);
         break; // found it, end of the loop
       }
     }
   }
 
   PR_CExitMonitor(this);
   return rv;
 }
@@ -1018,17 +1018,17 @@ nsImapIncomingServer::VerifyLogon(nsIUrl
 }
 
 NS_IMETHODIMP nsImapIncomingServer::PerformBiff(nsIMsgWindow* aMsgWindow)
 {
   nsCOMPtr<nsIMsgFolder> rootMsgFolder;
   nsresult rv = GetRootMsgFolder(getter_AddRefs(rootMsgFolder));
   if(NS_SUCCEEDED(rv))
   {
-    SetPerformingBiff(PR_TRUE);
+    SetPerformingBiff(true);
     rv = rootMsgFolder->GetNewMessages(aMsgWindow, nsnull);
   }
   return rv;
 }
 
 
 NS_IMETHODIMP
 nsImapIncomingServer::CloseCachedConnections()
@@ -1038,17 +1038,17 @@ nsImapIncomingServer::CloseCachedConnect
 
   // iterate through the connection cache closing open connections.
   PRInt32 cnt = m_connectionCache.Count();
 
   for (PRInt32 i = cnt; i > 0; --i)
   {
     connection = m_connectionCache[i - 1];
     if (connection)
-      connection->TellThreadToDie(PR_TRUE);
+      connection->TellThreadToDie(true);
   }
 
   PR_CExitMonitor(this);
   return NS_OK;
 }
 
 nsresult
 nsImapIncomingServer::CreateRootFolderFromUri(const nsCString &serverUri,
@@ -1074,17 +1074,17 @@ NS_IMETHODIMP nsImapIncomingServer::Poss
   // folderPath is in canonical format, i.e., hierarchy separator has been replaced with '/'
   nsresult rv;
   bool found = false;
   bool haveParent = false;
   nsCOMPtr<nsIMsgImapMailFolder> hostFolder;
   nsCOMPtr<nsIMsgFolder> aFolder;
   bool explicitlyVerify = false;
 
-  *aNewFolder = PR_FALSE;
+  *aNewFolder = false;
   nsCOMPtr<nsIMsgFolder> a_nsIFolder;
   rv = GetRootFolder(getter_AddRefs(a_nsIFolder));
 
   if(NS_FAILED(rv))
     return rv;
 
   nsCAutoString dupFolderPath(folderPath);
   if (dupFolderPath.Last() == '/')
@@ -1157,78 +1157,78 @@ NS_IMETHODIMP nsImapIncomingServer::Poss
   nsCAutoString parentUri(uri);
 
   if (leafPos > 0)
   {
     // If there is a hierarchy, there is a parent.
     // Don't strip off slash if it's the first character
     parentName.SetLength(leafPos);
     folderName.Cut(0, leafPos + 1);	// get rid of the parent name
-    haveParent = PR_TRUE;
+    haveParent = true;
     parentUri.Append('/');
     parentUri.Append(parentName);
   }
   if (MsgLowerCaseEqualsLiteral(folderPath, "inbox") &&
     hierarchyDelimiter == kOnlineHierarchySeparatorNil)
   {
     hierarchyDelimiter = '/'; // set to default in this case (as in 4.x)
     hostFolder->SetHierarchyDelimiter(hierarchyDelimiter);
   }
 
   nsCOMPtr <nsIMsgFolder> child;
 
   // nsCString possibleName(aSpec->allocatedPathName);
   uri.Append('/');
   uri.Append(dupFolderPath);
   bool caseInsensitive = MsgLowerCaseEqualsLiteral(dupFolderPath, "inbox");
-  a_nsIFolder->GetChildWithURI(uri, PR_TRUE, caseInsensitive, getter_AddRefs(child));
+  a_nsIFolder->GetChildWithURI(uri, true, caseInsensitive, getter_AddRefs(child));
   // if we couldn't find this folder by URI, tell the imap code it's a new folder to us
   *aNewFolder = !child;
   if (child)
-    found = PR_TRUE;
+    found = true;
   if (!found)
   {
     // trying to find/discover the parent
     if (haveParent)
     {
       nsCOMPtr <nsIMsgFolder> parent;
       bool parentIsNew;
       caseInsensitive = MsgLowerCaseEqualsLiteral(parentName, "inbox");
-      a_nsIFolder->GetChildWithURI(parentUri, PR_TRUE, caseInsensitive, getter_AddRefs(parent));
+      a_nsIFolder->GetChildWithURI(parentUri, true, caseInsensitive, getter_AddRefs(parent));
       if (!parent /* || parentFolder->GetFolderNeedsAdded()*/)
       {
         PossibleImapMailbox(parentName, hierarchyDelimiter, kNoselect | // be defensive
           ((boxFlags  & //only inherit certain flags from the child
           (kPublicMailbox | kOtherUsersMailbox | kPersonalMailbox))), &parentIsNew);
       }
     }
-    rv = hostFolder->CreateClientSubfolderInfo(dupFolderPath, hierarchyDelimiter,boxFlags, PR_FALSE);
+    rv = hostFolder->CreateClientSubfolderInfo(dupFolderPath, hierarchyDelimiter,boxFlags, false);
     NS_ENSURE_SUCCESS(rv, rv);
     caseInsensitive = MsgLowerCaseEqualsLiteral(dupFolderPath, "inbox");
-    a_nsIFolder->GetChildWithURI(uri, PR_TRUE, caseInsensitive, getter_AddRefs(child));
+    a_nsIFolder->GetChildWithURI(uri, true, caseInsensitive, getter_AddRefs(child));
   }
   if (child)
   {
     nsCOMPtr <nsIMsgImapMailFolder> imapFolder = do_QueryInterface(child);
     if (imapFolder)
     {
       nsCAutoString onlineName;
       nsAutoString unicodeName;
-      imapFolder->SetVerifiedAsOnlineFolder(PR_TRUE);
+      imapFolder->SetVerifiedAsOnlineFolder(true);
       imapFolder->SetHierarchyDelimiter(hierarchyDelimiter);
       if (boxFlags & kImapTrash)
       {
         PRInt32 deleteModel;
         GetDeleteModel(&deleteModel);
         if (deleteModel == nsMsgImapDeleteModels::MoveToTrash)
           child->SetFlag(nsMsgFolderFlags::Trash);
       }
       // only GMail will have an AllMail folder.
       if (boxFlags & kImapAllMail)
-        SetIsGMailServer(PR_TRUE);
+        SetIsGMailServer(true);
 
       imapFolder->SetBoxFlags(boxFlags);
       imapFolder->SetExplicitlyVerify(explicitlyVerify);
       imapFolder->GetOnlineName(onlineName);
 
       // online name needs to use the correct hierarchy delimiter (I think...)
       // or the canonical path - one or the other, but be consistent.
       MsgReplaceChar(dupFolderPath, '/', hierarchyDelimiter);
@@ -1288,17 +1288,17 @@ NS_IMETHODIMP nsImapIncomingServer::Fold
       if (NS_SUCCEEDED(rv) && foundFolder)
       {
         nsCOMPtr <nsIImapMailFolderSink> folderSink = do_QueryInterface(foundFolder);
         if (folderSink)
           return folderSink->GetFolderNeedsACLListed(aNeedsACLInitialized);
       }
     }
   }
-  *aNeedsACLInitialized = PR_FALSE; // maybe we want to say TRUE here...
+  *aNeedsACLInitialized = false; // maybe we want to say TRUE here...
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapIncomingServer::RefreshFolderRights(const nsACString& folderPath)
 {
   nsCOMPtr <nsIMsgFolder> rootFolder;
   nsresult rv = GetRootFolder(getter_AddRefs(rootFolder));
   if(NS_SUCCEEDED(rv) && rootFolder)
@@ -1415,17 +1415,17 @@ NS_IMETHODIMP  nsImapIncomingServer::Fol
   nsresult rv = GetFolder(aFolderName, getter_AddRefs(msgFolder));
   if (NS_SUCCEEDED(rv) && msgFolder)
   {
     PRUint32 flags;
     msgFolder->GetFlags(&flags);
     *result = ((flags & nsMsgFolderFlags::ImapNoselect) != 0);
   }
   else
-   *result = PR_FALSE;
+   *result = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapIncomingServer::SetFolderAdminURL(const nsACString& aFolderName, const nsACString& aFolderAdminUrl)
 {
   nsCOMPtr <nsIMsgFolder> rootFolder;
   nsresult rv = GetRootFolder(getter_AddRefs(rootFolder));
   if(NS_SUCCEEDED(rv) && rootFolder)
@@ -1440,17 +1440,17 @@ NS_IMETHODIMP nsImapIncomingServer::SetF
     }
   }
   return rv;
 }
 
 NS_IMETHODIMP  nsImapIncomingServer::FolderVerifiedOnline(const nsACString& folderName, bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = PR_FALSE;
+  *aResult = false;
   nsCOMPtr<nsIMsgFolder> rootFolder;
   nsresult rv = GetRootFolder(getter_AddRefs(rootFolder));
   if (NS_SUCCEEDED(rv) && rootFolder)
   {
     nsCOMPtr<nsIMsgFolder> folder;
     rv = rootFolder->FindSubFolder(folderName, getter_AddRefs(folder));
     if (NS_SUCCEEDED(rv) && folder)
     {
@@ -1613,17 +1613,17 @@ NS_IMETHODIMP nsImapIncomingServer::Disc
       {
         // If there are no subfolders and this is unverified, we don't want to
         // run this url. That is, we want to undiscover the folder.
         // If there are subfolders and no descendants are verified, we want to
         // undiscover all of the folders.
         // Only if there are subfolders and at least one of them is verified
         // do we want to refresh that folder's flags, because it won't be going
         // away.
-        currentImapFolder->SetExplicitlyVerify(PR_FALSE);
+        currentImapFolder->SetExplicitlyVerify(false);
         currentImapFolder->List();
       }
     }
     else
       DeleteNonVerifiedFolders(currentFolder);
   }
 
   return rv;
@@ -1641,17 +1641,17 @@ bool nsImapIncomingServer::CheckSpecialF
                                                 PRUint32 folderFlag,
                                                 nsCString &existingUri)
 {
   bool foundExistingFolder = false;
   nsCOMPtr<nsIRDFResource> res;
   nsCOMPtr<nsIMsgFolder> folder;
   nsCOMPtr<nsIMsgFolder> rootMsgFolder;
   nsresult rv = GetRootFolder(getter_AddRefs(rootMsgFolder));
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   if (!folderUri.IsEmpty() && NS_SUCCEEDED(rdf->GetResource(folderUri, getter_AddRefs(res))))
   {
     folder = do_QueryInterface(res, &rv);
     if (NS_SUCCEEDED(rv))
     {
       nsCOMPtr<nsIMsgFolder> parent;
       folder->GetParent(getter_AddRefs(parent));
@@ -1659,17 +1659,17 @@ bool nsImapIncomingServer::CheckSpecialF
       // told us about an existing one.
       if (!parent)
       {
         nsCOMPtr<nsIMsgFolder> existingFolder;
         rootMsgFolder->GetFolderWithFlags(folderFlag, getter_AddRefs(existingFolder));
         if (existingFolder)
         {
           existingFolder->GetURI(existingUri);
-          foundExistingFolder = PR_TRUE;
+          foundExistingFolder = true;
         }
       }
       if (!foundExistingFolder)
         folder->SetFlag(folderFlag);
 
       nsString folderName;
       folder->GetPrettyName(folderName);
       // this will set the localized name based on the folder flag.
@@ -1715,17 +1715,17 @@ nsresult nsImapIncomingServer::DeleteNon
           bool usingSubscription = true;
           GetUsingSubscription(&usingSubscription);
           if (usingSubscription)
           {
             bool folderIsNameSpace = false;
             bool noDescendentsAreVerified = NoDescendentsAreVerified(childFolder);
             bool shouldDieBecauseNoSelect = (folderIsNoSelectFolder ?
               ((noDescendentsAreVerified || AllDescendentsAreNoSelect(childFolder)) && !folderIsNameSpace)
-              : PR_FALSE);
+              : false);
             if (!childVerified && (noDescendentsAreVerified || shouldDieBecauseNoSelect))
             {
             }
           }
           else
           {
           }
         }
@@ -2039,17 +2039,17 @@ nsresult nsImapIncomingServer::ResetFold
     NS_ENSURE_SUCCESS(rv, rv);
     return ResetFoldersToUnverified(rootFolder);
   }
   else
   {
     nsCOMPtr<nsISimpleEnumerator> subFolders;
     nsCOMPtr<nsIMsgImapMailFolder> imapFolder = do_QueryInterface(parentFolder, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
-    rv = imapFolder->SetVerifiedAsOnlineFolder(PR_FALSE);
+    rv = imapFolder->SetVerifiedAsOnlineFolder(false);
     rv = parentFolder->GetSubFolders(getter_AddRefs(subFolders));
     NS_ENSURE_SUCCESS(rv, rv);
 
     bool moreFolders = false;
     while (NS_SUCCEEDED(subFolders->HasMoreElements(&moreFolders)) && moreFolders)
     {
       nsCOMPtr<nsISupports> child;
       rv = subFolders->GetNext(getter_AddRefs(child));
@@ -2073,17 +2073,17 @@ nsImapIncomingServer::GetUnverifiedFolde
 {
   nsCOMPtr<nsIMsgFolder> rootFolder;
   if (NS_FAILED(GetRootFolder(getter_AddRefs(rootFolder))) || !rootFolder)
     return;
 
   nsCOMPtr<nsIMsgImapMailFolder> imapRoot(do_QueryInterface(rootFolder));
   // don't need to verify the root.
   if (imapRoot)
-    imapRoot->SetVerifiedAsOnlineFolder(PR_TRUE);
+    imapRoot->SetVerifiedAsOnlineFolder(true);
 
   GetUnverifiedSubFolders(rootFolder, aFoldersArray);
 }
 
 void
 nsImapIncomingServer::GetUnverifiedSubFolders(nsIMsgFolder *parentFolder,
                                               nsCOMArray<nsIMsgImapMailFolder> &aFoldersArray)
 {
@@ -2131,17 +2131,17 @@ NS_IMETHODIMP nsImapIncomingServer::Forg
   // (see #143848).  if we exited, we've set the password to null
   // but if we're authenticated, and the biff timer goes off
   // we'll still perform biff, because we use m_userAuthenticated
   // to determine if we require a password for biff.
   // (if authenticated, we don't require a password
   // see nsMsgBiffManager::PerformBiff())
   // performing biff without a password will pop up the prompt dialog
   // which is pretty wacky, when it happens after you quit the application
-  m_userAuthenticated = PR_FALSE;
+  m_userAuthenticated = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapIncomingServer::GetServerRequiresPasswordForBiff(bool *aServerRequiresPasswordForBiff)
 {
   NS_ENSURE_ARG_POINTER(aServerRequiresPasswordForBiff);
   // if the user has already been authenticated, we've got the password
   *aServerRequiresPasswordForBiff = !m_userAuthenticated;
@@ -2267,17 +2267,17 @@ NS_IMETHODIMP nsImapIncomingServer::SetU
   m_userAuthenticated = aUserAuthenticated;
   if (aUserAuthenticated)
   {
     nsresult rv;
     nsCOMPtr<nsIMsgAccountManager> accountManager =
       do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    accountManager->SetUserNeedsToAuthenticate(PR_FALSE);
+    accountManager->SetUserNeedsToAuthenticate(false);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapIncomingServer::GetUserAuthenticated(bool *aUserAuthenticated)
 {
   NS_ENSURE_ARG_POINTER(aUserAuthenticated);
   *aUserAuthenticated = m_userAuthenticated;
@@ -2302,28 +2302,28 @@ NS_IMETHODIMP nsImapIncomingServer::GetM
   manageMailAccountUrl = m_manageMailAccountUrl;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapIncomingServer::StartPopulatingWithUri(nsIMsgWindow *aMsgWindow, bool aForceToServer /*ignored*/, const char *uri)
 {
   nsresult rv;
-  mDoingSubscribeDialog = PR_TRUE;
+  mDoingSubscribeDialog = true;
 
   rv = EnsureInner();
   NS_ENSURE_SUCCESS(rv,rv);
   rv = mInner->StartPopulatingWithUri(aMsgWindow, aForceToServer, uri);
   NS_ENSURE_SUCCESS(rv,rv);
 
   // imap always uses the canonical delimiter form of paths for subscribe ui.
   rv = SetDelimiter('/');
   NS_ENSURE_SUCCESS(rv,rv);
 
-  rv = SetShowFullName(PR_FALSE);
+  rv = SetShowFullName(false);
   NS_ENSURE_SUCCESS(rv,rv);
 
   nsCString serverUri;
   rv = GetServerURI(serverUri);
   NS_ENSURE_SUCCESS(rv,rv);
 
   nsCOMPtr<nsIImapService> imapService = do_GetService(NS_IMAPSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
@@ -2335,28 +2335,28 @@ nsImapIncomingServer::StartPopulatingWit
   const char *path = uri + serverUri.Length() + 1;
   return imapService->GetListOfFoldersWithPath(this, aMsgWindow, nsDependentCString(path));
 }
 
 NS_IMETHODIMP
 nsImapIncomingServer::StartPopulating(nsIMsgWindow *aMsgWindow, bool aForceToServer /*ignored*/, bool aGetOnlyNew)
 {
   nsresult rv;
-  mDoingSubscribeDialog = PR_TRUE;
+  mDoingSubscribeDialog = true;
 
   rv = EnsureInner();
   NS_ENSURE_SUCCESS(rv,rv);
   rv = mInner->StartPopulating(aMsgWindow, aForceToServer, aGetOnlyNew);
   NS_ENSURE_SUCCESS(rv,rv);
 
   // imap always uses the canonical delimiter form of paths for subscribe ui.
   rv = SetDelimiter('/');
   NS_ENSURE_SUCCESS(rv,rv);
 
-  rv = SetShowFullName(PR_FALSE);
+  rv = SetShowFullName(false);
   NS_ENSURE_SUCCESS(rv,rv);
 
   nsCOMPtr<nsIImapService> imapService = do_GetService(NS_IMAPSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
   return imapService->GetListOfFoldersOnServer(this, aMsgWindow);
 }
 
 NS_IMETHODIMP
@@ -2376,17 +2376,17 @@ nsImapIncomingServer::OnStopRunningUrl(n
   if (imapUrl) {
     nsImapAction imapAction = nsIImapUrl::nsImapTest;
     imapUrl->GetImapAction(&imapAction);
     switch (imapAction) {
     case nsIImapUrl::nsImapDiscoverAllAndSubscribedBoxesUrl:
     case nsIImapUrl::nsImapDiscoverChildrenUrl:
       rv = UpdateSubscribed();
       NS_ENSURE_SUCCESS(rv, rv);
-      mDoingSubscribeDialog = PR_FALSE;
+      mDoingSubscribeDialog = false;
       rv = StopPopulating(msgWindow);
       NS_ENSURE_SUCCESS(rv, rv);
       break;
     case nsIImapUrl::nsImapDiscoverAllBoxesUrl:
       if (NS_SUCCEEDED(exitCode))
         DiscoveryDone();
       break;
     case nsIImapUrl::nsImapFolderStatus:
@@ -2527,25 +2527,25 @@ nsImapIncomingServer::GetSubscribeListen
   return mInner->GetSubscribeListener(aListener);
 }
 
 NS_IMETHODIMP
 nsImapIncomingServer::Subscribe(const PRUnichar *aName)
 {
   NS_ENSURE_ARG_POINTER(aName);
   
-  return SubscribeToFolder(nsDependentString(aName), PR_TRUE, nsnull);
+  return SubscribeToFolder(nsDependentString(aName), true, nsnull);
 }
 
 NS_IMETHODIMP
 nsImapIncomingServer::Unsubscribe(const PRUnichar *aName)
 {
   NS_ENSURE_ARG_POINTER(aName);
 
-  return SubscribeToFolder(nsDependentString(aName), PR_FALSE, nsnull);
+  return SubscribeToFolder(nsDependentString(aName), false, nsnull);
 }
 
 NS_IMETHODIMP
 nsImapIncomingServer::SubscribeToFolder(const nsAString& aName, bool subscribe, nsIURI **aUri)
 {
   nsresult rv;
   nsCOMPtr<nsIImapService> imapService = do_GetService(NS_IMAPSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -2690,66 +2690,66 @@ nsImapIncomingServer::CommitSubscribeCha
 {
   return ReDiscoverAllFolders();
 }
 
 NS_IMETHODIMP
 nsImapIncomingServer::GetCanBeDefaultServer(bool *canBeDefaultServer)
 {
   NS_ENSURE_ARG_POINTER(canBeDefaultServer);
-  *canBeDefaultServer = PR_TRUE;
+  *canBeDefaultServer = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapIncomingServer::GetCanCompactFoldersOnServer(bool *canCompactFoldersOnServer)
 {
   NS_ENSURE_ARG_POINTER(canCompactFoldersOnServer);
   // Initialize canCompactFoldersOnServer true, a default value for IMAP
-  *canCompactFoldersOnServer = PR_TRUE;
+  *canCompactFoldersOnServer = true;
   GetPrefForServerAttribute("canCompactFoldersOnServer", canCompactFoldersOnServer);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapIncomingServer::GetCanUndoDeleteOnServer(bool *canUndoDeleteOnServer)
 {
   NS_ENSURE_ARG_POINTER(canUndoDeleteOnServer);
   // Initialize canUndoDeleteOnServer true, a default value for IMAP
-  *canUndoDeleteOnServer = PR_TRUE;
+  *canUndoDeleteOnServer = true;
   GetPrefForServerAttribute("canUndoDeleteOnServer", canUndoDeleteOnServer);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapIncomingServer::GetCanSearchMessages(bool *canSearchMessages)
 {
   NS_ENSURE_ARG_POINTER(canSearchMessages);
   // Initialize canSearchMessages true, a default value for IMAP
-  *canSearchMessages = PR_TRUE;
+  *canSearchMessages = true;
   GetPrefForServerAttribute("canSearchMessages", canSearchMessages);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapIncomingServer::GetCanEmptyTrashOnExit(bool *canEmptyTrashOnExit)
 {
   NS_ENSURE_ARG_POINTER(canEmptyTrashOnExit);
   // Initialize canEmptyTrashOnExit true, a default value for IMAP
-  *canEmptyTrashOnExit = PR_TRUE;
+  *canEmptyTrashOnExit = true;
   GetPrefForServerAttribute("canEmptyTrashOnExit", canEmptyTrashOnExit);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapIncomingServer::GetIsSecureServer(bool *isSecureServer)
 {
   NS_ENSURE_ARG_POINTER(isSecureServer);
   // Initialize isSecureServer true, a default value for IMAP
-  *isSecureServer = PR_TRUE;
+  *isSecureServer = true;
   GetPrefForServerAttribute("isSecureServer", isSecureServer);
   return NS_OK;
 }
 
 nsresult
 nsImapIncomingServer::CreateHostSpecificPrefName(const char *prefPrefix, nsCAutoString &prefName)
 {
   NS_ENSURE_ARG_POINTER(prefPrefix);
@@ -2774,17 +2774,17 @@ nsImapIncomingServer::GetSupportsDiskSpa
 
   nsCOMPtr<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
   if (NS_SUCCEEDED(rv))
      rv = prefBranch->GetBoolPref(prefName.get(), aSupportsDiskSpace);
 
   // Couldn't get the default value with the hostname.
   // Fall back on IMAP default value
   if (NS_FAILED(rv)) // set default value
-     *aSupportsDiskSpace = PR_TRUE;
+     *aSupportsDiskSpace = true;
   return NS_OK;
 }
 
 // count number of non-busy connections in cache
 NS_IMETHODIMP
 nsImapIncomingServer::GetNumIdleConnections(PRInt32 *aNumIdleConnections)
 {
   NS_ENSURE_ARG_POINTER(aNumIdleConnections);
@@ -2823,17 +2823,17 @@ nsImapIncomingServer::GetNumIdleConnecti
  * We do want to identify all those servers that don't allow creation of subfolders
  * and take them out of the account picker in the Copies and Folder panel.
  */
 NS_IMETHODIMP
 nsImapIncomingServer::GetCanCreateFoldersOnServer(bool *aCanCreateFoldersOnServer)
 {
   NS_ENSURE_ARG_POINTER(aCanCreateFoldersOnServer);
   // Initialize aCanCreateFoldersOnServer true, a default value for IMAP
-  *aCanCreateFoldersOnServer = PR_TRUE;
+  *aCanCreateFoldersOnServer = true;
   GetPrefForServerAttribute("canCreateFolders", aCanCreateFoldersOnServer);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapIncomingServer::GetOfflineSupportLevel(PRInt32 *aSupportLevel)
 {
   NS_ENSURE_ARG_POINTER(aSupportLevel);
@@ -2881,21 +2881,21 @@ nsImapIncomingServer::GeneratePrettyName
 
   PRInt32 defaultServerPort;
   PRInt32 defaultSecureServerPort;
 
   nsCOMPtr <nsIMsgProtocolInfo> protocolInfo = do_GetService("@mozilla.org/messenger/protocol/info;1?type=imap", &rv);
   NS_ENSURE_SUCCESS(rv,rv);
 
   // Get the default port
-  rv = protocolInfo->GetDefaultServerPort(PR_FALSE, &defaultServerPort);
+  rv = protocolInfo->GetDefaultServerPort(false, &defaultServerPort);
   NS_ENSURE_SUCCESS(rv,rv);
 
   // Get the default secure port
-  rv = protocolInfo->GetDefaultServerPort(PR_TRUE, &defaultSecureServerPort);
+  rv = protocolInfo->GetDefaultServerPort(true, &defaultSecureServerPort);
   NS_ENSURE_SUCCESS(rv,rv);
 
   // Get the current server port
   PRInt32 serverPort = PORT_NOT_SET;
   rv = GetPort(&serverPort);
   NS_ENSURE_SUCCESS(rv,rv);
 
   // Is the server secure ?
@@ -2903,17 +2903,17 @@ nsImapIncomingServer::GeneratePrettyName
   rv = GetSocketType(&socketType);
   NS_ENSURE_SUCCESS(rv,rv);
   bool isSecure = (socketType == nsMsgSocketType::SSL);
 
   // Is server port a default port ?
   bool isItDefaultPort = false;
   if (((serverPort == defaultServerPort) && !isSecure)||
       ((serverPort == defaultSecureServerPort) && isSecure))
-      isItDefaultPort = PR_TRUE;
+      isItDefaultPort = true;
 
   // Construct pretty name from username and hostname
   nsAutoString constructedPrettyName;
   CopyASCIItoUTF16(userName,constructedPrettyName);
   constructedPrettyName.Append('@');
   constructedPrettyName.Append(NS_ConvertASCIItoUTF16(hostName));
 
   // If the port is valid and not default, add port value to the pretty name
@@ -2965,32 +2965,32 @@ nsImapIncomingServer::GetPrefForServerAt
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapIncomingServer::GetCanFileMessagesOnServer(bool *aCanFileMessagesOnServer)
 {
   NS_ENSURE_ARG_POINTER(aCanFileMessagesOnServer);
   // Initialize aCanFileMessagesOnServer true, a default value for IMAP
-  *aCanFileMessagesOnServer = PR_TRUE;
+  *aCanFileMessagesOnServer = true;
   GetPrefForServerAttribute("canFileMessages", aCanFileMessagesOnServer);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapIncomingServer::SetSearchValue(const nsAString &searchValue)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 nsImapIncomingServer::GetSupportsSubscribeSearch(bool *retVal)
 {
   NS_ENSURE_ARG_POINTER(retVal);
-  *retVal = PR_FALSE;
+  *retVal = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapIncomingServer::GetFilterScope(nsMsgSearchScopeValue *filterScope)
 {
   NS_ENSURE_ARG_POINTER(filterScope);
   // If the inbox is enabled for offline use, then use the offline filter
@@ -3047,31 +3047,31 @@ nsImapIncomingServer::GetNewMessagesForN
   bool canOpen;
   imapFolder->GetCanOpenFolder(&canOpen);
   if (canOpen && ((forceAllFolders &&
                  !(flags & (nsMsgFolderFlags::Inbox | nsMsgFolderFlags::Trash |
                    nsMsgFolderFlags::Junk | nsMsgFolderFlags::Virtual))) ||
                 flags & nsMsgFolderFlags::CheckNew))
   {
     // Get new messages for this folder.
-    aFolder->SetGettingNewMessages(PR_TRUE);
+    aFolder->SetGettingNewMessages(true);
     if (performingBiff)
-      imapFolder->SetPerformingBiff(PR_TRUE);
+      imapFolder->SetPerformingBiff(true);
     bool isOpen = false;
     nsCOMPtr <nsIMsgMailSession> mailSession = do_GetService(NS_MSGMAILSESSION_CONTRACTID);
     if (mailSession && aFolder)
       mailSession->IsFolderOpenInWindow(aFolder, &isOpen);
     // eventually, the gGotStatusPref should go away, once we work out the kinks
     // from using STATUS.
     if (!gGotStatusPref)
     {
       nsCOMPtr<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID);
       if(prefBranch)
         prefBranch->GetBoolPref("mail.imap.use_status_for_biff", &gUseStatus);
-      gGotStatusPref = PR_TRUE;
+      gGotStatusPref = true;
     }
     if (gUseStatus && !isOpen)
     {
       if (!isServer && m_foldersToStat.IndexOf(imapFolder) == -1)
         m_foldersToStat.AppendObject(imapFolder);
     }
     else
       aFolder->UpdateFolder(aWindow);
@@ -3111,17 +3111,17 @@ nsImapIncomingServer::GetArbitraryHeader
   NS_ENSURE_SUCCESS(rv,rv);
   return filterList->GetArbitraryHeaders(aResult);
 }
 
 NS_IMETHODIMP
 nsImapIncomingServer::GetShowAttachmentsInline(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = PR_TRUE; // true per default
+  *aResult = true; // true per default
   nsresult rv;
   nsCOMPtr<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
 
   prefBranch->GetBoolPref("mail.inline_attachments", aResult);
   return NS_OK; // In case this pref is not set we need to return NS_OK.
 }
 
@@ -3144,17 +3144,17 @@ nsImapIncomingServer::OnUserOrHostNameCh
 
   // 2. Reset 'HaveWeEverDiscoveredFolders' flag so the new folder list can be
   //    reloaded (ie, DiscoverMailboxList() will be invoked in nsImapProtocol).
   nsCOMPtr<nsIImapHostSessionList> hostSessionList = do_GetService(kCImapHostSessionListCID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   nsCAutoString serverKey;
   rv = GetKey(serverKey);
   NS_ENSURE_SUCCESS(rv, rv);
-  hostSessionList->SetHaveWeEverDiscoveredFoldersForHost(serverKey.get(), PR_FALSE);
+  hostSessionList->SetHaveWeEverDiscoveredFoldersForHost(serverKey.get(), false);
   // 3. Make all the existing folders 'unverified' so that they can be
   //    removed from the folder pane after users log into the new server.
   ResetFoldersToUnverified(nsnull);
   return NS_OK;
 }
 
 // use canonical format in originalUri & convertedUri
 NS_IMETHODIMP
@@ -3189,17 +3189,17 @@ nsImapIncomingServer::GetUriWithNamespac
 
       MsgReplaceChar(namespacePrefix, ns->GetDelimiter(), '/'); // use canonical format
       nsCString uri(originalUri);
       PRInt32 index = uri.Find("//");           // find scheme
       index = uri.FindChar('/', index + 2);       // find '/' after scheme
       // it may be the case that this is the INBOX uri, in which case
       // we don't want to prepend the namespace. In that case, the uri ends with "INBOX",
       // but the namespace is "INBOX/", so they don't match.
-      if (MsgFind(uri, namespacePrefix, PR_FALSE, index + 1) != index + 1 &&
+      if (MsgFind(uri, namespacePrefix, false, index + 1) != index + 1 &&
           !MsgLowerCaseEqualsLiteral(Substring(uri, index + 1), "inbox"))
         uri.Insert(namespacePrefix, index + 1);   // insert namespace prefix
       convertedUri = uri;
     }
   }
   return rv;
 }
 
@@ -3241,30 +3241,30 @@ nsImapIncomingServer::GetMsgFolderFromUR
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr <nsIMsgFolder> msgFolder;
   bool namespacePrefixAdded = false;
   nsCString folderUriWithNamespace;
 
   // Check if the folder exists as is...Even if we have a personal namespace,
   // it might be in another namespace (e.g., shared) and this will catch that.
-  rv = rootMsgFolder->GetChildWithURI(aURI, PR_TRUE, PR_FALSE, getter_AddRefs(msgFolder));
+  rv = rootMsgFolder->GetChildWithURI(aURI, true, false, getter_AddRefs(msgFolder));
 
   // If we couldn't find the folder as is, check if we need to prepend the
   // personal namespace
   if (!msgFolder)
   {
     GetUriWithNamespacePrefixIfNecessary(kPersonalNamespace, aURI, folderUriWithNamespace);
     if (!folderUriWithNamespace.IsEmpty())
     {
-      namespacePrefixAdded = PR_TRUE;
-      rv = rootMsgFolder->GetChildWithURI(folderUriWithNamespace, PR_TRUE, PR_FALSE, getter_AddRefs(msgFolder));
+      namespacePrefixAdded = true;
+      rv = rootMsgFolder->GetChildWithURI(folderUriWithNamespace, true, false, getter_AddRefs(msgFolder));
     }
     else
-      rv = rootMsgFolder->GetChildWithURI(aURI, PR_TRUE, PR_FALSE, getter_AddRefs(msgFolder));
+      rv = rootMsgFolder->GetChildWithURI(aURI, true, false, getter_AddRefs(msgFolder));
   }
 
   if (NS_FAILED(rv) || !msgFolder) {
     // we didn't find the folder so we will have to create a new one.
     if (namespacePrefixAdded)
     {
       nsCOMPtr <nsIRDFService> rdf = do_GetService("@mozilla.org/rdf/rdf-service;1", &rv);
       NS_ENSURE_SUCCESS(rv,rv);
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -207,36 +207,36 @@ nsresult RecursiveCopy(nsIFile* srcDir, 
     rv = dirIterator->HasMoreElements(&hasMore);
     if (NS_FAILED(rv)) return rv;
   }
 
   return rv;
 }
 
 nsImapMailFolder::nsImapMailFolder() :
-    m_initialized(PR_FALSE),m_haveDiscoveredAllFolders(PR_FALSE),
+    m_initialized(false),m_haveDiscoveredAllFolders(false),
     m_curMsgUid(0), m_nextMessageByteLength(0),
-    m_urlRunning(PR_FALSE),
-    m_verifiedAsOnlineFolder(PR_FALSE),
-    m_explicitlyVerify(PR_FALSE),
-    m_folderIsNamespace(PR_FALSE),
-    m_folderNeedsSubscribing(PR_FALSE),
-    m_folderNeedsAdded(PR_FALSE),
-    m_folderNeedsACLListed(PR_TRUE),
-    m_performingBiff(PR_FALSE),
-    m_folderQuotaCommandIssued(PR_FALSE),
-    m_folderQuotaDataIsValid(PR_FALSE),
-    m_updatingFolder(PR_FALSE),
-    m_downloadingFolderForOfflineUse(PR_FALSE),
+    m_urlRunning(false),
+    m_verifiedAsOnlineFolder(false),
+    m_explicitlyVerify(false),
+    m_folderIsNamespace(false),
+    m_folderNeedsSubscribing(false),
+    m_folderNeedsAdded(false),
+    m_folderNeedsACLListed(true),
+    m_performingBiff(false),
+    m_folderQuotaCommandIssued(false),
+    m_folderQuotaDataIsValid(false),
+    m_updatingFolder(false),
+    m_downloadingFolderForOfflineUse(false),
     m_folderQuotaUsedKB(0),
     m_folderQuotaMaxKB(0),
-    m_compactingOfflineStore(PR_FALSE),
-    m_expunging(PR_FALSE),
-    m_applyIncomingFilters(PR_FALSE),
-    m_filterListRequiresBody(PR_FALSE)
+    m_compactingOfflineStore(false),
+    m_expunging(false),
+    m_applyIncomingFilters(false),
+    m_filterListRequiresBody(false)
 {
   MOZ_COUNT_CTOR(nsImapMailFolder); // double count these for now.
 
   m_thread = do_GetCurrentThread();
   m_moveCoalescer = nsnull;
   m_boxFlags = 0;
   m_uidValidity = kUidUnknown;
   m_numServerRecentMessages = 0;
@@ -290,22 +290,22 @@ nsresult nsImapMailFolder::AddDirectoryS
 
   return NS_OK;
 }
 
 static bool
 nsShouldIgnoreFile(nsString& name)
 {
   PRInt32 len = name.Length();
-  if (len > 4 && name.RFind(SUMMARY_SUFFIX, PR_TRUE) == len - 4)
+  if (len > 4 && name.RFind(SUMMARY_SUFFIX, true) == len - 4)
   {
     name.SetLength(len-4); // truncate the string
-    return PR_FALSE;
-  }
-  return PR_TRUE;
+    return false;
+  }
+  return true;
 }
 
 nsresult nsImapMailFolder::CreateChildFromURI(const nsCString &uri, nsIMsgFolder **folder)
 {
   nsImapMailFolder *newFolder = new nsImapMailFolder;
   if (!newFolder)
     return NS_ERROR_OUT_OF_MEMORY;
   newFolder->Init(uri.get());
@@ -330,17 +330,17 @@ NS_IMETHODIMP nsImapMailFolder::AddSubfo
   // that loads the virtual folders for each account, expects utf8 not modified utf-7.
   nsCAutoString escapedName;
   rv = NS_MsgEscapeEncodeURLPath(aName, escapedName);
   NS_ENSURE_SUCCESS(rv, rv);
 
   uri += escapedName.get();
 
   nsCOMPtr <nsIMsgFolder> msgFolder;
-  rv = GetChildWithURI(uri, PR_FALSE/*deep*/, PR_TRUE /*case Insensitive*/, getter_AddRefs(msgFolder));
+  rv = GetChildWithURI(uri, false/*deep*/, true /*case Insensitive*/, getter_AddRefs(msgFolder));
   if (NS_SUCCEEDED(rv) && msgFolder)
     return NS_MSG_FOLDER_EXISTS;
 
   nsCOMPtr<nsIRDFResource> res;
   rv = rdf->GetResource(uri, getter_AddRefs(res));
   if (NS_FAILED(rv))
     return rv;
 
@@ -399,17 +399,17 @@ nsresult nsImapMailFolder::AddSubfolderW
   bool isServer;
   rv = GetIsServer(&isServer);
   NS_ENSURE_SUCCESS(rv, rv);
 
   bool isInbox = isServer && name.LowerCaseEqualsLiteral("inbox");
 
   //will make sure mSubFolders does not have duplicates because of bogus msf files.
   nsCOMPtr <nsIMsgFolder> msgFolder;
-  rv = GetChildWithURI(uri, PR_FALSE/*deep*/, isInbox /*case Insensitive*/, getter_AddRefs(msgFolder));
+  rv = GetChildWithURI(uri, false/*deep*/, isInbox /*case Insensitive*/, getter_AddRefs(msgFolder));
   if (NS_SUCCEEDED(rv) && msgFolder)
     return NS_MSG_FOLDER_EXISTS;
 
   nsCOMPtr<nsIRDFResource> res;
   rv = rdf->GetResource(uri, getter_AddRefs(res));
   if (NS_FAILED(rv))
     return rv;
 
@@ -522,17 +522,17 @@ nsresult nsImapMailFolder::CreateSubFold
         PRUint32 folderFlags;
         rv = cacheElement->GetInt32Property("flags", (PRInt32 *) &folderFlags);
         if (NS_SUCCEEDED(rv) && folderFlags & nsMsgFolderFlags::Virtual) //ignore virtual folders
           continue;
         PRInt32 hierarchyDelimiter;
         rv = cacheElement->GetInt32Property("hierDelim", &hierarchyDelimiter);
         if (NS_SUCCEEDED(rv) && hierarchyDelimiter == kOnlineHierarchySeparatorUnknown)
         {
-          currentFolderPath->Remove(PR_FALSE);
+          currentFolderPath->Remove(false);
           continue; // blow away .msf files for folders with unknown delimiter.
         }
         rv = cacheElement->GetStringProperty("onlineName", onlineFullUtf7Name);
         if (NS_SUCCEEDED(rv) && !onlineFullUtf7Name.IsEmpty())
         {
           CopyMUTF7toUTF16(onlineFullUtf7Name, currentFolderNameStr);
           char delimiter = 0;
           GetHierarchyDelimiter(&delimiter);
@@ -586,17 +586,17 @@ NS_IMETHODIMP nsImapMailFolder::GetSubFo
 
     // host directory does not need .sbd tacked on
     if (!isServer)
     {
       rv = AddDirectorySeparator(pathFile);
       if(NS_FAILED(rv)) return rv;
     }
 
-    m_initialized = PR_TRUE;      // need to set this here to avoid infinite recursion from CreateSubfolders.
+    m_initialized = true;      // need to set this here to avoid infinite recursion from CreateSubfolders.
     // we have to treat the root folder specially, because it's name
     // doesn't end with .sbd
 
     PRInt32 newFlags = nsMsgFolderFlags::Mail;
     bool isDirectory = false;
     pathFile->IsDirectory(&isDirectory);
     if (isDirectory)
     {
@@ -608,25 +608,25 @@ NS_IMETHODIMP nsImapMailFolder::GetSubFo
     if (isServer)
     {
       nsCOMPtr <nsIMsgFolder> inboxFolder;
 
       GetFolderWithFlags(nsMsgFolderFlags::Inbox, getter_AddRefs(inboxFolder));
       if (!inboxFolder)
       {
         // create an inbox if we don't have one.
-        CreateClientSubfolderInfo(NS_LITERAL_CSTRING("INBOX"), kOnlineHierarchySeparatorUnknown, 0, PR_TRUE);
+        CreateClientSubfolderInfo(NS_LITERAL_CSTRING("INBOX"), kOnlineHierarchySeparatorUnknown, 0, true);
       }
     }
 
     PRInt32 count = mSubFolders.Count();
     for (PRInt32 i = 0; i < count; i++)
       mSubFolders[i]->GetSubFolders(nsnull);
 
-    UpdateSummaryTotals(PR_FALSE);
+    UpdateSummaryTotals(false);
     if (NS_FAILED(rv)) return rv;
   }
 
   return aResult ? NS_NewArrayEnumerator(aResult, mSubFolders) : NS_ERROR_NULL_POINTER;
 }
 
 //Makes sure the database is open and exists.  If the database is valid then
 //returns NS_OK.  Otherwise returns a failure error value.
@@ -634,28 +634,28 @@ nsresult nsImapMailFolder::GetDatabase()
 {
   nsresult rv = NS_OK;
   if (!mDatabase)
   {
     nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // Create the database, blowing it away if it needs to be rebuilt
-    rv = msgDBService->OpenFolderDB(this, PR_FALSE, getter_AddRefs(mDatabase));
+    rv = msgDBService->OpenFolderDB(this, false, getter_AddRefs(mDatabase));
     if (NS_FAILED(rv))
       rv = msgDBService->CreateNewDB(this, getter_AddRefs(mDatabase));
 
     NS_ENSURE_SUCCESS(rv, rv);
 
     // UpdateNewMessages/UpdateSummaryTotals can null mDatabase, so we save a local copy
     nsCOMPtr<nsIMsgDatabase> database(mDatabase);
     UpdateNewMessages();
     if(mAddListener)
       database->AddListener(this);
-    UpdateSummaryTotals(PR_TRUE);
+    UpdateSummaryTotals(true);
     mDatabase = database;
   }
   return rv;
 }
 
 NS_IMETHODIMP nsImapMailFolder::UpdateFolder(nsIMsgWindow * inMsgWindow)
 {
   return UpdateFolderWithListener(inMsgWindow, nsnull);
@@ -676,17 +676,17 @@ NS_IMETHODIMP nsImapMailFolder::UpdateFo
 
   if (mFlags & nsMsgFolderFlags::Inbox || m_applyIncomingFilters)
   {
     if (!m_filterList)
       rv = GetFilterList(aMsgWindow, getter_AddRefs(m_filterList));
     // if there's no msg window, but someone is updating the inbox, we're
     // doing something biff-like, and may download headers, so make biff notify.
     if (!aMsgWindow && mFlags & nsMsgFolderFlags::Inbox)
-      SetPerformingBiff(PR_TRUE);
+      SetPerformingBiff(true);
   }
 
   if (m_filterList)
   {
     nsCOMPtr<nsIMsgIncomingServer> server;
     rv = GetServer(getter_AddRefs(server));
     NS_ENSURE_SUCCESS(rv, rv);
 
@@ -698,17 +698,17 @@ NS_IMETHODIMP nsImapMailFolder::UpdateFo
     if (canFileMessagesOnServer)
     {
       rv = server->ConfigureTemporaryFilters(m_filterList);
       NS_ENSURE_SUCCESS(rv, rv);
     }
 
     // If a body filter is enabled for an offline folder, delay the filter
     // application until after message has been downloaded.
-    m_filterListRequiresBody = PR_FALSE;
+    m_filterListRequiresBody = false;
 
     if (mFlags & nsMsgFolderFlags::Offline)
     {
       nsCOMPtr<nsIMsgFilterService> filterService =
         do_GetService(NS_MSGFILTERSERVICE_CONTRACTID, &rv);
       PRUint32 filterCount = 0;
       m_filterList->GetFilterCount(&filterCount);
       for (PRUint32 index = 0;
@@ -739,30 +739,30 @@ NS_IMETHODIMP nsImapMailFolder::UpdateFo
           nsCOMPtr<nsIMsgSearchTerm> term;
           rv = searchTerms->QueryElementAt(termIndex,
                                            NS_GET_IID(nsIMsgSearchTerm),
                                            getter_AddRefs(term));
           nsMsgSearchAttribValue attrib;
           rv = term->GetAttrib(&attrib);
           NS_ENSURE_SUCCESS(rv, rv);
           if (attrib == nsMsgSearchAttrib::Body)
-            m_filterListRequiresBody = PR_TRUE;
+            m_filterListRequiresBody = true;
           else if (attrib == nsMsgSearchAttrib::Custom)
           {
             nsCAutoString customId;
             rv = term->GetCustomId(customId);
             nsCOMPtr<nsIMsgSearchCustomTerm> customTerm;
             if (NS_SUCCEEDED(rv) && filterService)
               rv = filterService->GetCustomTerm(customId,
                                                 getter_AddRefs(customTerm));
             bool needsBody = false;
             if (NS_SUCCEEDED(rv) && customTerm)
               rv = customTerm->GetNeedsBody(&needsBody);
             if (NS_SUCCEEDED(rv) && needsBody)
-              m_filterListRequiresBody = PR_TRUE;
+              m_filterListRequiresBody = true;
           }
         }
 
         // Also check if filter actions need the body, as this
         //  is supported in custom actions.
         nsCOMPtr<nsISupportsArray> actionList;
         filter->GetActionList(getter_AddRefs(actionList));
         PRUint32 numActions = 0;
@@ -779,40 +779,40 @@ NS_IMETHODIMP nsImapMailFolder::UpdateFo
             continue;
           nsCOMPtr<nsIMsgFilterCustomAction> customAction;
           rv = action->GetCustomAction(getter_AddRefs(customAction));
           if (NS_FAILED(rv) || !customAction)
             continue;
           bool needsBody = false;
           customAction->GetNeedsBody(&needsBody);
           if (needsBody)
-            m_filterListRequiresBody = PR_TRUE;
+            m_filterListRequiresBody = true;
         }
       }
     }
   }
 
-  selectFolder = PR_TRUE;
+  selectFolder = true;
 
   bool isServer;
   rv = GetIsServer(&isServer);
   if (NS_SUCCEEDED(rv) && isServer)
   {
     if (!m_haveDiscoveredAllFolders)
     {
       bool hasSubFolders = false;
       GetHasSubFolders(&hasSubFolders);
       if (!hasSubFolders)
       {
-        rv = CreateClientSubfolderInfo(NS_LITERAL_CSTRING("Inbox"), kOnlineHierarchySeparatorUnknown,0, PR_FALSE);
+        rv = CreateClientSubfolderInfo(NS_LITERAL_CSTRING("Inbox"), kOnlineHierarchySeparatorUnknown,0, false);
         NS_ENSURE_SUCCESS(rv, rv);
       }
-      m_haveDiscoveredAllFolders = PR_TRUE;
-    }
-    selectFolder = PR_FALSE;
+      m_haveDiscoveredAllFolders = true;
+    }
+    selectFolder = false;
   }
   rv = GetDatabase();
   if (NS_FAILED(rv))
   {
     ThrowAlertMsg("errorGettingDB", aMsgWindow);
     return rv;
   }
   bool canOpenThisFolder = true;
@@ -837,29 +837,29 @@ NS_IMETHODIMP nsImapMailFolder::UpdateFo
     }
   }
 
   // Check it we're password protecting the local store.
   if (!PromptForMasterPasswordIfNecessary())
     return NS_ERROR_FAILURE;
 
   if (!canOpenThisFolder)
-    selectFolder = PR_FALSE;
+    selectFolder = false;
   // don't run select if we can't select the folder...
   if (NS_SUCCEEDED(rv) && !m_urlRunning && selectFolder)
   {
     nsCOMPtr<nsIImapService> imapService = do_GetService(NS_IMAPSERVICE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr <nsIURI> url;
     rv = imapService->SelectFolder(m_thread, this, m_urlListener, aMsgWindow, getter_AddRefs(url));
     if (NS_SUCCEEDED(rv))
     {
-      m_urlRunning = PR_TRUE;
-      m_updatingFolder = PR_TRUE;
+      m_urlRunning = true;
+      m_updatingFolder = true;
     }
     if (url)
     {
       nsCOMPtr <nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(url, &rv);
       NS_ENSURE_SUCCESS(rv, rv);
       mailnewsUrl->RegisterListener(this);
       m_urlListener = aUrlListener;
     }
@@ -974,36 +974,36 @@ NS_IMETHODIMP nsImapMailFolder::CreateCl
   nsCOMPtr<nsIMsgDatabase> unusedDB;
   nsCOMPtr <nsILocalFile> dbFile;
 
   // warning, path will be changed
   rv = CreateFileForDB(folderNameStr, path, getter_AddRefs(dbFile));
   NS_ENSURE_SUCCESS(rv,rv);
 
   //Now let's create the actual new folder
-  rv = AddSubfolderWithPath(folderNameStr, dbFile, getter_AddRefs(child), PR_TRUE);
+  rv = AddSubfolderWithPath(folderNameStr, dbFile, getter_AddRefs(child), true);
   NS_ENSURE_SUCCESS(rv, rv);
-  rv = msgDBService->OpenMailDBFromFile(dbFile, child, PR_TRUE, PR_TRUE,
+  rv = msgDBService->OpenMailDBFromFile(dbFile, child, true, true,
                                         getter_AddRefs(unusedDB));
   if (rv == NS_MSG_ERROR_FOLDER_SUMMARY_MISSING)
     rv = NS_OK;
 
   if (NS_SUCCEEDED(rv) && unusedDB)
   {
   //need to set the folder name
     nsCOMPtr <nsIDBFolderInfo> folderInfo;
     rv = unusedDB->GetDBFolderInfo(getter_AddRefs(folderInfo));
     nsCOMPtr <nsIMsgImapMailFolder> imapFolder = do_QueryInterface(child, &rv);
     if (NS_SUCCEEDED(rv))
     {
       nsCAutoString onlineName(m_onlineFolderName);
       if (!onlineName.IsEmpty())
         onlineName.Append(hierarchyDelimiter);
       onlineName.Append(NS_LossyConvertUTF16toASCII(folderNameStr));
-      imapFolder->SetVerifiedAsOnlineFolder(PR_TRUE);
+      imapFolder->SetVerifiedAsOnlineFolder(true);
       imapFolder->SetOnlineName(onlineName);
       imapFolder->SetHierarchyDelimiter(hierarchyDelimiter);
       imapFolder->SetBoxFlags(flags);
 
       child->SetFlag(nsMsgFolderFlags::Elided);
       nsString unicodeName;
       rv = CopyMUTF7toUTF16(nsCString(folderName), unicodeName);
       if (NS_SUCCEEDED(rv))
@@ -1011,19 +1011,19 @@ NS_IMETHODIMP nsImapMailFolder::CreateCl
 
       // store the online name as the mailbox name in the db folder info
       // I don't think anyone uses the mailbox name, so we'll use it
       // to restore the online name when blowing away an imap db.
       if (folderInfo)
         folderInfo->SetMailboxName(NS_ConvertASCIItoUTF16(onlineName));
     }
 
-    unusedDB->SetSummaryValid(PR_TRUE);
+    unusedDB->SetSummaryValid(true);
     unusedDB->Commit(nsMsgDBCommitType::kLargeCommit);
-    unusedDB->Close(PR_TRUE);
+    unusedDB->Close(true);
     // don't want to hold onto this newly created db.
     child->SetMsgDatabase(nsnull);
   }
 
   if (!suppressNotification)
   {
     nsCOMPtr <nsIAtom> folderCreateAtom;
     if(NS_SUCCEEDED(rv) && child)
@@ -1054,17 +1054,17 @@ NS_IMETHODIMP nsImapMailFolder::List()
 
 NS_IMETHODIMP nsImapMailFolder::RemoveSubFolder (nsIMsgFolder *which)
 {
   nsresult rv;
   nsCOMPtr<nsIMutableArray> folders(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv));
   NS_ENSURE_TRUE(folders, rv);
   nsCOMPtr<nsISupports> folderSupport = do_QueryInterface(which, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
-  folders->AppendElement(folderSupport, PR_FALSE);
+  folders->AppendElement(folderSupport, false);
   rv = nsMsgDBFolder::DeleteSubFolders(folders, nsnull);
   which->Delete();
   return rv;
 }
 
 NS_IMETHODIMP nsImapMailFolder::CreateStorageIfMissing(nsIUrlListener* urlListener)
 {
   nsresult rv = NS_OK;
@@ -1130,17 +1130,17 @@ NS_IMETHODIMP nsImapMailFolder::SetVerif
       {
         nsCOMPtr<nsIMsgImapMailFolder> imapParent = do_QueryInterface(parent);
         if (imapParent)
         {
           bool verifiedOnline;
           imapParent->GetVerifiedAsOnlineFolder(&verifiedOnline);
           if (verifiedOnline)
             break;
-          imapParent->SetVerifiedAsOnlineFolder(PR_TRUE);
+          imapParent->SetVerifiedAsOnlineFolder(true);
         }
       }
     }
     while (parent);
   }
   return NS_OK;
 }
 
@@ -1174,24 +1174,24 @@ NS_IMETHODIMP nsImapMailFolder::GetHiera
       {
         nsresult rv = childFolder->GetHierarchyDelimiter(aHierarchyDelimiter);
         // some code uses m_hierarchyDelimiter directly, so we should set it.
         m_hierarchyDelimiter = *aHierarchyDelimiter;
         return rv;
       }
     }
   }
-  ReadDBFolderInfo(PR_FALSE); // update cache first.
+  ReadDBFolderInfo(false); // update cache first.
   *aHierarchyDelimiter = m_hierarchyDelimiter;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapMailFolder::SetBoxFlags(PRInt32 aBoxFlags)
 {
-  ReadDBFolderInfo(PR_FALSE);
+  ReadDBFolderInfo(false);
 
   m_boxFlags = aBoxFlags;
   PRUint32 newFlags = mFlags;
 
   newFlags |= nsMsgFolderFlags::ImapBox;
 
   if (m_boxFlags & kNoinferiors)
     newFlags |= nsMsgFolderFlags::ImapNoinferiors;
@@ -1338,34 +1338,34 @@ NS_IMETHODIMP nsImapMailFolder::Compact(
   if (mDatabase)
     ApplyRetentionSettings();
 
   m_urlListener = aListener;
   // We should be able to compact the offline store now that this should
   // just be called by the UI.
   if (aMsgWindow && (mFlags & nsMsgFolderFlags::Offline))
   {
-    m_compactingOfflineStore = PR_TRUE;
+    m_compactingOfflineStore = true;
     CompactOfflineStore(aMsgWindow, this);
   }
   if (WeAreOffline())
     return NS_OK;
-  m_expunging = PR_TRUE;
+  m_expunging = true;
   return Expunge(this, aMsgWindow);
 }
 
 NS_IMETHODIMP
 nsImapMailFolder::NotifyCompactCompleted()
 {
   if (!m_expunging && m_urlListener)
   {
     m_urlListener->OnStopRunningUrl(nsnull, NS_OK);
     m_urlListener = nsnull;
   }
-  m_compactingOfflineStore = PR_FALSE;
+  m_compactingOfflineStore = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapMailFolder::MarkPendingRemoval(nsIMsgDBHdr *aHdr, bool aMark)
 {
   NS_ENSURE_ARG_POINTER(aHdr);
   PRUint32 offlineMessageSize;
   aHdr->GetOfflineMessageSize(&offlineMessageSize);
@@ -1419,19 +1419,19 @@ NS_IMETHODIMP nsImapMailFolder::CompactA
     {
       nsCOMPtr<nsISupports> supports = dont_AddRef(allDescendents->ElementAt(i));
       nsCOMPtr<nsIMsgFolder> folder = do_QueryInterface(supports, &rv);
       NS_ENSURE_SUCCESS(rv, rv);
       PRUint32 folderFlags;
       folder->GetFlags(&folderFlags);
       if (! (folderFlags & (nsMsgFolderFlags::Virtual | nsMsgFolderFlags::ImapNoselect)))
       {
-        rv = folderArray->AppendElement(supports, PR_FALSE);
+        rv = folderArray->AppendElement(supports, false);
         if (aCompactOfflineAlso)
-          offlineFolderArray->AppendElement(supports, PR_FALSE);
+          offlineFolderArray->AppendElement(supports, false);
       }
     }
     rv = folderArray->GetLength(&cnt);
     NS_ENSURE_SUCCESS(rv, rv);
     if (cnt == 0)
       return NotifyCompactCompleted();
   }
   nsCOMPtr <nsIMsgFolderCompactor> folderCompactor =
@@ -1449,17 +1449,17 @@ NS_IMETHODIMP nsImapMailFolder::UpdateSt
 
   nsCOMPtr <nsIURI> uri;
   rv = imapService->UpdateFolderStatus(m_thread, this, aListener, getter_AddRefs(uri));
   if (uri && !aMsgWindow)
   {
     nsCOMPtr <nsIMsgMailNewsUrl> mailNewsUrl = do_QueryInterface(uri, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     // if no msg window, we won't put up error messages (this is almost certainly a biff-inspired status)
-    mailNewsUrl->SetSuppressErrorMsgs(PR_TRUE);
+    mailNewsUrl->SetSuppressErrorMsgs(true);
   }
   return rv;
 }
 
 NS_IMETHODIMP nsImapMailFolder::EmptyTrash(nsIMsgWindow *aMsgWindow, nsIUrlListener *aListener)
 {
   nsCOMPtr<nsIMsgFolder> trashFolder;
   nsresult rv = GetTrashFolder(getter_AddRefs(trashFolder));
@@ -1491,17 +1491,17 @@ NS_IMETHODIMP nsImapMailFolder::EmptyTra
       nsCOMPtr <nsIMsgDatabase> trashDB;
       rv = trashFolder->GetMsgDatabase(getter_AddRefs(trashDB));
       if (trashDB)
       {
         nsMsgKey fakeKey;
         trashDB->GetNextFakeOfflineMsgKey(&fakeKey);
 
         nsCOMPtr <nsIMsgOfflineImapOperation> op;
-        rv = trashDB->GetOfflineOpForKey(fakeKey, PR_TRUE, getter_AddRefs(op));
+        rv = trashDB->GetOfflineOpForKey(fakeKey, true, getter_AddRefs(op));
         trashFolder->SetFlag(nsMsgFolderFlags::OfflineEvents);
         op->SetOperation(nsIMsgOfflineImapOperation::kDeleteAllMsgs);
       }
       return rv;
     }
     nsCOMPtr <nsIDBFolderInfo> transferInfo;
     rv = trashFolder->GetDBTransferInfo(getter_AddRefs(transferInfo));
     rv = trashFolder->Delete(); // delete summary spec
@@ -1603,17 +1603,17 @@ NS_IMETHODIMP nsImapMailFolder::EmptyTra
         {
           nsCOMPtr<nsIMsgFolder> folder(do_QueryInterface(item, &rv));
           if (NS_SUCCEEDED(rv))
             array.AppendObject(folder);
         }
       }
       for (PRInt32 i = array.Count() - 1; i >= 0; i--)
       {
-        trashFolder->PropagateDelete(array[i], PR_TRUE, aMsgWindow);
+        trashFolder->PropagateDelete(array[i], true, aMsgWindow);
         // Remove the object, presumably to free it up before we delete the next.
         array.RemoveObjectAt(i);
       }
     }
 
     // The trash folder has effectively been deleted
     nsCOMPtr<nsIMsgFolderNotificationService> notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
     if (notifier)
@@ -1647,24 +1647,24 @@ NS_IMETHODIMP nsImapMailFolder::Delete()
     nsCOMPtr<nsILocalFile> summaryLocation;
     rv = GetSummaryFileLocation(path, getter_AddRefs(summaryLocation));
     if (NS_SUCCEEDED(rv))
     {
       bool exists = false;
       rv = summaryLocation->Exists(&exists);
       if (NS_SUCCEEDED(rv) && exists)
       {
-        rv = summaryLocation->Remove(PR_FALSE);
+        rv = summaryLocation->Remove(false);
         if (NS_FAILED(rv))
           NS_WARNING("failed to remove imap summary file");
       }
     }
   }
   if (mPath)
-    mPath->Remove(PR_FALSE);
+    mPath->Remove(false);
   // should notify nsIMsgFolderListeners about the folder getting deleted...
   return rv;
 }
 
 NS_IMETHODIMP nsImapMailFolder::Rename (const nsAString& newName, nsIMsgWindow *msgWindow)
 {
   if (mFlags & nsMsgFolderFlags::Virtual)
     return nsMsgDBFolder::Rename(newName, msgWindow);
@@ -1775,17 +1775,17 @@ NS_IMETHODIMP nsImapMailFolder::RenameLo
   if (count > 0)
     rv = CreateDirectoryForFolder(getter_AddRefs(dirFile));
 
   nsCOMPtr <nsILocalFile> oldSummaryFile;
   rv = GetSummaryFileLocation(oldPathFile, getter_AddRefs(oldSummaryFile));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCAutoString newNameStr;
-  oldSummaryFile->Remove(PR_FALSE);
+  oldSummaryFile->Remove(false);
   if (count > 0)
   {
     newNameStr = leafname;
     NS_MsgHashIfNecessary(newNameStr);
     newNameStr += ".sbd";
     nsCAutoString leafName;
     dirFile->GetNativeLeafName(leafName);
     if (!leafName.Equals(newNameStr))
@@ -1795,17 +1795,17 @@ NS_IMETHODIMP nsImapMailFolder::RenameLo
     bool isDirectory = false;
     parentPathFile->IsDirectory(&isDirectory);
     if (!isDirectory)
       parentPathFile->Create(nsIFile::DIRECTORY_TYPE, 0700);
     else
       NS_ERROR("Directory already exists.");
     rv = RecursiveCopy(dirFile, parentPathFile);
     NS_ENSURE_SUCCESS(rv,rv);
-    dirFile->Remove(PR_TRUE);                         // moving folders
+    dirFile->Remove(true);                         // moving folders
   }
   return rv;
 }
 
 NS_IMETHODIMP nsImapMailFolder::GetPrettyName(nsAString& prettyName)
 {
   return GetName(prettyName);
 }
@@ -1863,17 +1863,17 @@ nsImapMailFolder::GetCanCreateSubfolders
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapMailFolder::GetCanSubscribe(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = PR_FALSE;
+  *aResult = false;
 
   bool isImapServer = false;
   nsresult rv = GetIsServer(&isImapServer);
   if (NS_FAILED(rv)) return rv;
   // you can only subscribe to imap servers, not imap folders
   *aResult = isImapServer;
   return NS_OK;
 }
@@ -1909,19 +1909,19 @@ nsImapMailFolder::AddMessageDispositionS
 
   // set the mark message answered flag on the server for this message...
   if (aMessage)
   {
     nsMsgKey msgKey;
     aMessage->GetMessageKey(&msgKey);
 
     if (aDispositionFlag == nsIMsgFolder::nsMsgDispositionState_Replied)
-      StoreImapFlags(kImapMsgAnsweredFlag, PR_TRUE, &msgKey, 1, nsnull);
+      StoreImapFlags(kImapMsgAnsweredFlag, true, &msgKey, 1, nsnull);
     else if (aDispositionFlag == nsIMsgFolder::nsMsgDispositionState_Forwarded)
-      StoreImapFlags(kImapMsgForwardedFlag, PR_TRUE, &msgKey, 1, nsnull);
+      StoreImapFlags(kImapMsgForwardedFlag, true, &msgKey, 1, nsnull);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapMailFolder::MarkMessagesRead(nsIArray *messages, bool markRead)
 {
   // tell the folder to do it, which will mark them read in the db.
@@ -1948,38 +1948,38 @@ nsImapMailFolder::SetLabelForMessages(ns
 
   nsresult rv = nsMsgDBFolder::SetLabelForMessages(aMessages, aLabel);
   if (NS_SUCCEEDED(rv))
   {
     nsCAutoString messageIds;
     nsTArray<nsMsgKey> keysToLabel;
     nsresult rv = BuildIdsAndKeyArray(aMessages, messageIds, keysToLabel);
     NS_ENSURE_SUCCESS(rv, rv);
-    StoreImapFlags((aLabel << 9), PR_TRUE, keysToLabel.Elements(), keysToLabel.Length(), nsnull);
+    StoreImapFlags((aLabel << 9), true, keysToLabel.Elements(), keysToLabel.Length(), nsnull);
     rv = GetDatabase();
     if (NS_SUCCEEDED(rv))
       mDatabase->Commit(nsMsgDBCommitType::kLargeCommit);
   }
   return rv;
 }
 
 NS_IMETHODIMP
 nsImapMailFolder::MarkAllMessagesRead(nsIMsgWindow *aMsgWindow)
 {
   nsresult rv = GetDatabase();
   if(NS_SUCCEEDED(rv))
   {
     nsMsgKey *thoseMarked;
     PRUint32 numMarked;
-    EnableNotifications(allMessageCountNotifications, PR_FALSE, PR_TRUE /*dbBatching*/);
+    EnableNotifications(allMessageCountNotifications, false, true /*dbBatching*/);
     rv = mDatabase->MarkAllRead(&numMarked, &thoseMarked);
-    EnableNotifications(allMessageCountNotifications, PR_TRUE, PR_TRUE /*dbBatching*/);
+    EnableNotifications(allMessageCountNotifications, true, true /*dbBatching*/);
     if (NS_SUCCEEDED(rv))
     {
-      rv = StoreImapFlags(kImapMsgSeenFlag, PR_TRUE, thoseMarked,
+      rv = StoreImapFlags(kImapMsgSeenFlag, true, thoseMarked,
                           numMarked, nsnull);
       mDatabase->Commit(nsMsgDBCommitType::kLargeCommit);
 
       // Setup a undo-state
       if (aMsgWindow)
         rv = AddMarkAllReadUndoAction(aMsgWindow, thoseMarked, numMarked);
       nsMemory::Free(thoseMarked);
     }
@@ -1992,17 +1992,17 @@ NS_IMETHODIMP nsImapMailFolder::MarkThre
   nsresult rv = GetDatabase();
   if(NS_SUCCEEDED(rv))
   {
     nsMsgKey *keys;
     PRUint32 numKeys;
     rv = mDatabase->MarkThreadRead(thread, nsnull, &numKeys, &keys);
     if (NS_SUCCEEDED(rv))
     {
-      rv = StoreImapFlags(kImapMsgSeenFlag, PR_TRUE, keys, numKeys, nsnull);
+      rv = StoreImapFlags(kImapMsgSeenFlag, true, keys, numKeys, nsnull);
       mDatabase->Commit(nsMsgDBCommitType::kLargeCommit);
       nsMemory::Free(keys);
     }
   }
   return rv;
 }
 
 
@@ -2100,17 +2100,17 @@ NS_IMETHODIMP nsImapMailFolder::SetOnlin
     db->Commit(nsMsgDBCommitType::kLargeCommit);
   }
   folderInfo = nsnull;
   return rv;
 }
 
 NS_IMETHODIMP nsImapMailFolder::GetOnlineName(nsACString& aOnlineFolderName)
 {
-  ReadDBFolderInfo(PR_FALSE); // update cache first.
+  ReadDBFolderInfo(false); // update cache first.
   aOnlineFolderName = m_onlineFolderName;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapMailFolder::GetDBFolderInfoAndDB(nsIDBFolderInfo **folderInfo, nsIMsgDatabase **db)
 {
   NS_ENSURE_ARG_POINTER (folderInfo);
@@ -2268,17 +2268,17 @@ NS_IMETHODIMP nsImapMailFolder::DeleteMe
   nsCOMPtr<nsIImapIncomingServer> imapServer;
   nsresult rv = GetFlag(nsMsgFolderFlags::Trash, &deleteImmediatelyNoTrash);
   rv = GetImapIncomingServer(getter_AddRefs(imapServer));
 
   if (NS_SUCCEEDED(rv) && imapServer)
   {
     imapServer->GetDeleteModel(&deleteModel);
     if (deleteModel != nsMsgImapDeleteModels::MoveToTrash || deleteStorage)
-      deleteImmediatelyNoTrash = PR_TRUE;
+      deleteImmediatelyNoTrash = true;
     // if we're deleting a message, we should pseudo-interrupt the msg
     //load of the current message.
     bool interrupted = false;
     imapServer->PseudoInterruptMsgLoad(this, msgWindow, &interrupted);
   }
 
   rv = BuildIdsAndKeyArray(messages, messageIds, srcKeyArray);
   if (NS_FAILED(rv)) return rv;
@@ -2291,28 +2291,28 @@ NS_IMETHODIMP nsImapMailFolder::DeleteMe
     rv = GetRootFolder(getter_AddRefs(rootFolder));
     if (NS_SUCCEEDED(rv) && rootFolder)
     {
       rootFolder->GetFolderWithFlags(nsMsgFolderFlags::Trash,
                                      getter_AddRefs(trashFolder));
       NS_ASSERTION(trashFolder != 0, "couldn't find trash");
       // if we can't find the trash, we'll just have to do an imap delete and pretend this is the trash
       if (!trashFolder)
-        deleteImmediatelyNoTrash = PR_TRUE;
+        deleteImmediatelyNoTrash = true;
     }
   }
 
   if ((NS_SUCCEEDED(rv) && deleteImmediatelyNoTrash) || deleteModel == nsMsgImapDeleteModels::IMAPDelete )
   {
     if (allowUndo)
     {
       //need to take care of these two delete models
       nsRefPtr<nsImapMoveCopyMsgTxn> undoMsgTxn = new nsImapMoveCopyMsgTxn;
       if (!undoMsgTxn || NS_FAILED(undoMsgTxn->Init(this, &srcKeyArray, messageIds.get(), nsnull,
-                                                      PR_TRUE, isMove, m_thread)))
+                                                      true, isMove, m_thread)))
         return NS_ERROR_OUT_OF_MEMORY;
 
       undoMsgTxn->SetTransactionType(nsIMessenger::eDeleteMsg);
       // we're adding this undo action before the delete is successful. This is evil,
       // but 4.5 did it as well.
       nsCOMPtr <nsITransactionManager> txnMgr;
       if (msgWindow)
         msgWindow->GetTransactionManager(getter_AddRefs(txnMgr));
@@ -2320,26 +2320,26 @@ NS_IMETHODIMP nsImapMailFolder::DeleteMe
         txnMgr->DoTransaction(undoMsgTxn);
     }
 
     if (deleteModel == nsMsgImapDeleteModels::IMAPDelete && !deleteStorage)
     {
       PRUint32 cnt, flags;
       rv = messages->GetLength(&cnt);
       NS_ENSURE_SUCCESS(rv, rv);
-      deleteMsgs = PR_FALSE;
+      deleteMsgs = false;
       for (PRUint32 i=0; i <cnt; i++)
       {
         nsCOMPtr <nsIMsgDBHdr> msgHdr = do_QueryElementAt(messages, i);
         if (msgHdr)
         {
           msgHdr->GetFlags(&flags);
           if (!(flags & nsMsgMessageFlags::IMAPDeleted))
           {
-            deleteMsgs = PR_TRUE;
+            deleteMsgs = true;
             break;
           }
         }
       }
     }
     // if copy service listener is also a url listener, pass that
     // url listener into StoreImapFlags.
     nsCOMPtr <nsIUrlListener> urlListener = do_QueryInterface(listener);
@@ -2351,26 +2351,26 @@ NS_IMETHODIMP nsImapMailFolder::DeleteMe
     if (NS_SUCCEEDED(rv))
     {
       if (mDatabase)
       {
         if (deleteModel == nsMsgImapDeleteModels::IMAPDelete)
           MarkMessagesImapDeleted(&srcKeyArray, deleteMsgs, mDatabase);
         else
         {
-          EnableNotifications(allMessageCountNotifications, PR_FALSE, PR_TRUE /*dbBatching*/);  //"remove it immediately" model
+          EnableNotifications(allMessageCountNotifications, false, true /*dbBatching*/);  //"remove it immediately" model
           // Notify if this is an actual delete.
           if (!isMove)
           {
             nsCOMPtr<nsIMsgFolderNotificationService> notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
             if (notifier)
               notifier->NotifyMsgsDeleted(messages);
           }
           mDatabase->DeleteMessages(srcKeyArray.Length(), srcKeyArray.Elements(), nsnull);
-          EnableNotifications(allMessageCountNotifications, PR_TRUE, PR_TRUE /*dbBatching*/);
+          EnableNotifications(allMessageCountNotifications, true, true /*dbBatching*/);
         }
         NotifyFolderEvent(mDeleteOrMoveMsgCompletedAtom);
       }
     }
     return rv;
   }
   else  // have to move the messages to the trash
   {
@@ -2379,44 +2379,44 @@ NS_IMETHODIMP nsImapMailFolder::DeleteMe
       nsCOMPtr<nsIMsgFolder> srcFolder;
       nsCOMPtr<nsISupports>srcSupport;
       PRUint32 count = 0;
       rv = messages->GetLength(&count);
 
       rv = QueryInterface(NS_GET_IID(nsIMsgFolder), getter_AddRefs(srcFolder));
       nsCOMPtr<nsIMsgCopyService> copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv);
       NS_ENSURE_SUCCESS(rv, rv);
-      rv = copyService->CopyMessages(srcFolder, messages, trashFolder, PR_TRUE, listener, msgWindow, allowUndo);
+      rv = copyService->CopyMessages(srcFolder, messages, trashFolder, true, listener, msgWindow, allowUndo);
     }
   }
   return rv;
 }
 
 // check if folder is the trash, or a descendent of the trash
 // so we can tell if the folders we're deleting from it should
 // be *really* deleted.
 bool
 nsImapMailFolder::TrashOrDescendentOfTrash(nsIMsgFolder* folder)
 {
-  NS_ENSURE_TRUE(folder, PR_FALSE);
+  NS_ENSURE_TRUE(folder, false);
   nsCOMPtr<nsIMsgFolder> parent;
   nsCOMPtr<nsIMsgFolder> curFolder = folder;
   nsresult rv;
   PRUint32 flags = 0;
   do
   {
     rv = curFolder->GetFlags(&flags);
-    if (NS_FAILED(rv)) return PR_FALSE;
+    if (NS_FAILED(rv)) return false;
     if (flags & nsMsgFolderFlags::Trash)
-      return PR_TRUE;
+      return true;
     curFolder->GetParent(getter_AddRefs(parent));
-    if (!parent) return PR_FALSE;
+    if (!parent) return false;
     curFolder = parent;
   } while (NS_SUCCEEDED(rv) && curFolder);
-  return PR_FALSE;
+  return false;
 }
 NS_IMETHODIMP
 nsImapMailFolder::DeleteSubFolders(nsIArray* folders, nsIMsgWindow *msgWindow)
 {
   nsCOMPtr<nsIMsgFolder> curFolder;
   nsCOMPtr<nsIUrlListener> urlListener;
   nsCOMPtr<nsIMsgFolder> trashFolder;
   PRInt32 i;
@@ -2436,21 +2436,21 @@ nsImapMailFolder::DeleteSubFolders(nsIAr
     if (NS_SUCCEEDED(rv))
     {
       PRUint32 folderFlags;
       curFolder->GetFlags(&folderFlags);
       if (folderFlags & nsMsgFolderFlags::Virtual)
       {
         RemoveSubFolder(curFolder);
         // since the folder pane only allows single selection, we can do this
-        deleteNoTrash = confirmed = PR_TRUE;
-        confirmDeletion = PR_FALSE;
+        deleteNoTrash = confirmed = true;
+        confirmDeletion = false;
       }
       else
-        foldersRemaining->InsertElementAt(curFolder, 0, PR_FALSE);
+        foldersRemaining->InsertElementAt(curFolder, 0, false);
     }
   }
 
   foldersRemaining->GetLength(&folderCount);
 
   nsCOMPtr<nsIImapService> imapService = do_GetService(NS_IMAPSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   if (!deleteNoTrash)
@@ -2465,20 +2465,20 @@ nsImapMailFolder::DeleteSubFolders(nsIAr
     if (canHaveSubFoldersOfTrash) // UW server doesn't set NOINFERIORS - check dual use pref
     {
       nsCOMPtr<nsIImapIncomingServer> imapServer;
       rv = GetImapIncomingServer(getter_AddRefs(imapServer));
       NS_ENSURE_SUCCESS(rv, rv);
       bool serverSupportsDualUseFolders;
       imapServer->GetDualUseFolders(&serverSupportsDualUseFolders);
       if (!serverSupportsDualUseFolders)
-        canHaveSubFoldersOfTrash = PR_FALSE;
+        canHaveSubFoldersOfTrash = false;
     }
     if (!canHaveSubFoldersOfTrash)
-      deleteNoTrash = PR_TRUE;
+      deleteNoTrash = true;
     nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
     NS_ENSURE_SUCCESS(rv, rv);
     prefBranch->GetBoolPref("mailnews.confirm.moveFoldersToTrash", &confirmDeletion);
   }
   if (!confirmed && (confirmDeletion || deleteNoTrash)) //let us alert the user if we are deleting folder immediately
   {
     nsCOMPtr<nsIStringBundle> bundle;
     rv = IMAPGetStringBundle(getter_AddRefs(bundle));
@@ -2524,17 +2524,17 @@ nsImapMailFolder::DeleteSubFolders(nsIAr
                              buttonFlags,  deleteFolderButtonLabel.get(),
                              nsnull, nsnull, nsnull, &dummyValue,
                              &buttonPressed);
       NS_ENSURE_SUCCESS(rv, rv);
       confirmed = !buttonPressed; // "ok" is in position 0
     }
   }
   else
-    confirmed = PR_TRUE;
+    confirmed = true;
 
   if (confirmed)
   {
     for (i = 0; i < folderCount; i++)
     {
       curFolder = do_QueryElementAt(foldersRemaining, i, &rv);
       if (NS_SUCCEEDED(rv))
       {
@@ -2544,17 +2544,17 @@ nsImapMailFolder::DeleteSubFolders(nsIAr
                                          curFolder,
                                          urlListener,
                                          msgWindow,
                                          nsnull);
         else
         {
           bool confirm = false;
           bool match = false;
-          rv = curFolder->MatchOrChangeFilterDestination(nsnull, PR_FALSE, &match);
+          rv = curFolder->MatchOrChangeFilterDestination(nsnull, false, &match);
           if (match)
           {
             curFolder->ConfirmFolderDeletionForFilter(msgWindow, &confirm);
             if (!confirm)
               return NS_OK;
           }
           rv = imapService->MoveFolder(m_thread,
                                        curFolder,
@@ -2578,22 +2578,22 @@ nsImapMailFolder::DeleteSubFolders(nsIAr
 /*static*/
 bool nsImapMailFolder::ShouldCheckAllFolders(nsIImapIncomingServer *imapServer)
 {
   // Check legacy global preference to see if we should check all folders for
   // new messages, or just the inbox and marked ones.
   bool checkAllFolders = false;
   nsresult rv;
   nsCOMPtr<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
   // This pref might not exist, which is OK.
   (void) prefBranch->GetBoolPref("mail.check_all_imap_folders_for_new", &checkAllFolders);
 
   if (checkAllFolders)
-    return PR_TRUE;
+    return true;
 
   // If the legacy preference doesn't exist or has its default value (False),
   // the true preference is read.
   imapServer->GetCheckAllFoldersForNew(&checkAllFolders);
   return checkAllFolders;
 }
 
 // Called by Biff, or when user presses GetMsg button.
@@ -2620,29 +2620,29 @@ NS_IMETHODIMP nsImapMailFolder::GetNewMe
     nsCOMPtr<nsIMsgFolder> inbox;
     rv = rootFolder->GetFolderWithFlags(nsMsgFolderFlags::Inbox,
                                         getter_AddRefs(inbox));
     if (inbox)
     {
       nsCOMPtr<nsIMsgImapMailFolder> imapFolder = do_QueryInterface(inbox, &rv);
       NS_ENSURE_SUCCESS(rv, rv);
       imapFolder->SetPerformingBiff(performingBiff);
-      inbox->SetGettingNewMessages(PR_TRUE);
+      inbox->SetGettingNewMessages(true);
       rv = inbox->UpdateFolder(aWindow);
     }
     // Get new messages for other folders if marked, or all of them if the pref is set
     rv = imapServer->GetNewMessagesForNonInboxFolders(rootFolder, aWindow, checkAllFolders, performingBiff);
   }
   return rv;
 }
 
 NS_IMETHODIMP nsImapMailFolder::Shutdown(bool shutdownChildren)
 {
   m_filterList = nsnull;
-  m_initialized = PR_FALSE;
+  m_initialized = false;
   // mPath is used to decide if folder pathname needs to be reconstructed in GetPath().
   mPath = nsnull;
   NS_IF_RELEASE(m_moveCoalescer);
   m_msgParser = nsnull;
   m_pendingOfflineMoves.Clear();
   return nsMsgDBFolder::Shutdown(shutdownChildren);
 }
 
@@ -2685,17 +2685,17 @@ NS_IMETHODIMP nsImapMailFolder::OnNewIdl
 
   bool checkAllFolders = ShouldCheckAllFolders(imapServer);
 
   // only trigger biff if we're checking all new folders for new messages, or this particular folder,
   // but excluding trash,junk, sent, and no select folders, by default.
   if ((checkAllFolders &&
     !(mFlags & (nsMsgFolderFlags::Trash | nsMsgFolderFlags::Junk | nsMsgFolderFlags::SentMail | nsMsgFolderFlags::ImapNoselect)))
     || (mFlags & (nsMsgFolderFlags::CheckNew|nsMsgFolderFlags::Inbox)))
-    SetPerformingBiff(PR_TRUE);
+    SetPerformingBiff(true);
   return UpdateFolder(nsnull);
 }
 
 NS_IMETHODIMP nsImapMailFolder::UpdateImapMailboxInfo(nsIImapProtocol* aProtocol, nsIMailboxSpec* aSpec)
 {
   nsresult rv;
   ChangeNumPendingTotalMessages(-GetNumPendingTotalMessages());
   ChangeNumPendingUnread(-GetNumPendingUnread());
@@ -2783,17 +2783,17 @@ NS_IMETHODIMP nsImapMailFolder::UpdateIm
         mDatabase->ForceClosed();
     }
     mDatabase = nsnull;
 
     nsCOMPtr <nsILocalFile> summaryFile;
     rv = GetSummaryFileLocation(pathFile, getter_AddRefs(summaryFile));
     // Remove summary file.
     if (NS_SUCCEEDED(rv) && summaryFile)
-      summaryFile->Remove(PR_FALSE);
+      summaryFile->Remove(false);
 
     // Create a new summary file, update the folder message counts, and
     // Close the summary file db.
     bool created;
     rv = msgDBService->CreateNewDB(this, getter_AddRefs(mDatabase));
 
     if (NS_FAILED(rv) && mDatabase)
     {
@@ -2828,17 +2828,17 @@ NS_IMETHODIMP nsImapMailFolder::UpdateIm
     //      keysToDelete.CopyArray(&existingKeys);
 
     if (flagState)
     {
       nsTArray<nsMsgKey> no_existingKeys;
       FindKeysToAdd(no_existingKeys, m_keysToFetch, numNewUnread, flagState);
     }
     if (NS_FAILED(rv))
-      pathFile->Remove(PR_FALSE);
+      pathFile->Remove(false);
 
   }
   else if (!flagState /*&& !NET_IsOffline() */) // if there are no messages on the server
     keysToDelete = existingKeys;
   else /* if ( !NET_IsOffline()) */
   {
     PRUint32 boxFlags;
     aSpec->GetBox_flags(&boxFlags);
@@ -2877,32 +2877,32 @@ NS_IMETHODIMP nsImapMailFolder::UpdateIm
   // If we are performing biff for this folder, tell the
   // stand-alone biff about the new high water mark
   if (m_performingBiff && numNewUnread)
   {
     // We must ensure that the server knows that we are performing biff.
     // Otherwise the stand-alone biff won't fire.
     nsCOMPtr<nsIMsgIncomingServer> server;
     if (NS_SUCCEEDED(GetServer(getter_AddRefs(server))) && server)
-      server->SetPerformingBiff(PR_TRUE);
+      server->SetPerformingBiff(true);
      SetNumNewMessages(numNewUnread);
   }
   SyncFlags(flagState);
   if (mDatabase && mNumUnreadMessages + m_keysToFetch.Length() > numUnreadFromServer)
     mDatabase->SyncCounts();
 
   if (!m_keysToFetch.IsEmpty() && aProtocol)
     PrepareToAddHeadersToMailDB(aProtocol);
   else
   {
     bool gettingNewMessages;
     GetGettingNewMessages(&gettingNewMessages);
     if (gettingNewMessages)
       ProgressStatus(aProtocol, IMAP_NO_NEW_MESSAGES, nsnull);
-    SetPerformingBiff(PR_FALSE);
+    SetPerformingBiff(false);
   }
   aSpec->GetNumMessages(&m_numServerTotalMessages);
   aSpec->GetNumUnseenMessages(&m_numServerUnseenMessages);
   aSpec->GetNumRecentMessages(&m_numServerRecentMessages);
 
   // some servers don't return UIDNEXT on SELECT - don't crunch
   // existing values in that case.
   PRInt32 nextUID;
@@ -2937,29 +2937,29 @@ NS_IMETHODIMP nsImapMailFolder::UpdateIm
   {
     PRInt32 unreadDelta = numUnread - (GetNumPendingUnread() + mNumUnreadMessages);
     if (numUnread - previousUnreadMessages != unreadDelta)
        NS_WARNING("unread count should match server count");
     ChangeNumPendingUnread(unreadDelta);
     if (unreadDelta > 0 &&
         !(mFlags & (nsMsgFolderFlags::Trash | nsMsgFolderFlags::Junk)))
     {
-      SetHasNewMessages(PR_TRUE);
+      SetHasNewMessages(true);
       SetNumNewMessages(unreadDelta);
       SetBiffState(nsMsgBiffState_NewMail);
     }
-    summaryChanged = PR_TRUE;
-  }
-  SetPerformingBiff(PR_FALSE);
+    summaryChanged = true;
+  }
+  SetPerformingBiff(false);
   if (m_numServerUnseenMessages != numUnread || m_numServerTotalMessages != numTotal)
   {
     if (numUnread > m_numServerUnseenMessages ||
         m_numServerTotalMessages > numTotal)
       NotifyHasPendingMsgs();
-    summaryChanged = PR_TRUE;
+    summaryChanged = true;
     m_numServerUnseenMessages = numUnread;
     m_numServerTotalMessages = numTotal;
   }
   if (summaryChanged)
     SummaryChanged();
 
   return NS_OK;
 }
@@ -3104,17 +3104,17 @@ nsresult nsImapMailFolder::NormalEndHead
   nsCOMPtr<nsIMsgIncomingServer> server;
   rv = GetServer(getter_AddRefs(server));
   NS_ENSURE_SUCCESS(rv, rv);
   newMsgHdr->SetMessageKey(m_curMsgUid);
   TweakHeaderFlags(aProtocol, newMsgHdr);
   PRUint32 messageSize;
   if (NS_SUCCEEDED(newMsgHdr->GetMessageSize(&messageSize)))
     mFolderSize += messageSize;
-  m_msgMovedByFilter = PR_FALSE;
+  m_msgMovedByFilter = false;
 
   // If this is the inbox, try to apply filters. Otherwise, test the inherited
   // folder property "applyIncomingFilters" (which defaults to empty). If this
   // inherited property has the string value "true", then apply filters even
   // if this is not the Inbox folder.
   if (mFlags & nsMsgFolderFlags::Inbox || m_applyIncomingFilters)
   {
     PRUint32 msgFlags;
@@ -3135,45 +3135,45 @@ nsresult nsImapMailFolder::NormalEndHead
           // if a dup is marked read, it shouldn't trigger biff.
           // Same for deleting it or moving it to trash.
           switch (duplicateAction)
           {
             case nsIMsgIncomingServer::deleteDups:
               {
                 PRUint32 newFlags;
                 newMsgHdr->OrFlags(nsMsgMessageFlags::Read | nsMsgMessageFlags::IMAPDeleted, &newFlags);
-                StoreImapFlags(kImapMsgSeenFlag | kImapMsgDeletedFlag, PR_TRUE,
+                StoreImapFlags(kImapMsgSeenFlag | kImapMsgDeletedFlag, true,
                                &m_curMsgUid, 1, nsnull);
-                m_msgMovedByFilter = PR_TRUE;
+                m_msgMovedByFilter = true;
               }
               break;
             case nsIMsgIncomingServer::moveDupsToTrash:
               {
                 nsCOMPtr <nsIMsgFolder> trash;
                 GetTrashFolder(getter_AddRefs(trash));
                 if (trash)
                 {
                   nsCString trashUri;
                   trash->GetURI(trashUri);
                   nsresult err = MoveIncorporatedMessage(newMsgHdr, mDatabase, trashUri, nsnull, msgWindow);
                   if (NS_SUCCEEDED(err))
-                    m_msgMovedByFilter = PR_TRUE;
+                    m_msgMovedByFilter = true;
                 }
               }
               break;
             case nsIMsgIncomingServer::markDupsRead:
               {
                 PRUint32 newFlags;
                 newMsgHdr->OrFlags(nsMsgMessageFlags::Read, &newFlags);
-                StoreImapFlags(kImapMsgSeenFlag, PR_TRUE, &m_curMsgUid, 1, nsnull);
+                StoreImapFlags(kImapMsgSeenFlag, true, &m_curMsgUid, 1, nsnull);
               }
               break;
           }
           PRInt32 numNewMessages;
-          GetNumNewMessages(PR_FALSE, &numNewMessages);
+          GetNumNewMessages(false, &numNewMessages);
           SetNumNewMessages(numNewMessages - 1);
         }
       }
       rv = m_msgParser->GetAllHeaders(&headers, &headersSize);
 
       if (NS_SUCCEEDED(rv) && headers && !m_msgMovedByFilter &&
           !m_filterListRequiresBody)
       {
@@ -3202,17 +3202,17 @@ nsresult nsImapMailFolder::NormalEndHead
     newMsgHdr->GetMessageId(getter_Copies(newMessageId));
     if (m_pseudoHdrs.IsInitialized())
       m_pseudoHdrs.Get(newMessageId, &pseudoKey);
     if (notifier && pseudoKey != nsMsgKey_None)
     {
       notifier->NotifyMsgKeyChanged(pseudoKey, newMsgHdr);
       m_pseudoHdrs.Remove(newMessageId);
     }
-    mDatabase->AddNewHdrToDB(newMsgHdr, PR_TRUE);
+    mDatabase->AddNewHdrToDB(newMsgHdr, true);
     if (notifier)
       notifier->NotifyMsgAdded(newMsgHdr);
     // mark the header as not yet reported classified
     OrProcessingFlags(m_curMsgUid, nsMsgProcessingFlags::NotReportedClassified);
   }
   // adjust highestRecordedUID
   if (mDatabase)
   {
@@ -3238,17 +3238,17 @@ NS_IMETHODIMP nsImapMailFolder::AbortHea
 }
 
 NS_IMETHODIMP nsImapMailFolder::BeginCopy(nsIMsgDBHdr *message)
 {
   NS_ENSURE_TRUE(m_copyState, NS_ERROR_NULL_POINTER);
   nsresult rv;
   if (m_copyState->m_tmpFile) // leftover file spec nuke it
   {
-    rv = m_copyState->m_tmpFile->Remove(PR_FALSE);
+    rv = m_copyState->m_tmpFile->Remove(false);
     if (NS_FAILED(rv))
     {
       nsCString nativePath;
       m_copyState->m_tmpFile->GetNativePath(nativePath);
       PR_LOG(IMAP, PR_LOG_ALWAYS, ("couldn't remove prev temp file %s: %lx\n", nativePath.get(), rv));
     }
     m_copyState->m_tmpFile = nsnull;
   }
@@ -3326,17 +3326,17 @@ NS_IMETHODIMP nsImapMailFolder::CopyData
   m_copyState->m_leftOver += readCount;
   m_copyState->m_dataBuffer[m_copyState->m_leftOver] = '\0';
 
   start = m_copyState->m_dataBuffer;
   if (m_copyState->m_eatLF)
   {
     if (*start == '\n')
       start++;
-    m_copyState->m_eatLF = PR_FALSE;
+    m_copyState->m_eatLF = false;
   }
   end = PL_strpbrk(start, "\r\n");
   if (end && *end == '\r' && *(end+1) == '\n')
     linebreak_len = 2;
 
   while (start && end)
   {
     if (PL_strncasecmp(start, "X-Mozilla-Status:", 17) &&
@@ -3358,17 +3358,17 @@ NS_IMETHODIMP nsImapMailFolder::CopyData
     linebreak_len = 1;
 
     end = PL_strpbrk(start, "\r\n");
     if (end && *end == '\r')
     {
       if (*(end+1) == '\n')
         linebreak_len = 2;
       else if (! *(end+1)) // block might have split CRLF so remember if
-        m_copyState->m_eatLF = PR_TRUE; // we should eat LF
+        m_copyState->m_eatLF = true; // we should eat LF
     }
 
     if (start && !end)
     {
       m_copyState->m_leftOver -= (start - m_copyState->m_dataBuffer);
       memcpy(m_copyState->m_dataBuffer, start, m_copyState->m_leftOver+1); // including null
     }
   }
@@ -3410,17 +3410,17 @@ NS_IMETHODIMP nsImapMailFolder::EndCopy(
     NS_ENSURE_SUCCESS(rv,rv);
 
     rv = QueryInterface(NS_GET_IID(nsIUrlListener), getter_AddRefs(urlListener));
     nsCOMPtr<nsISupports> copySupport;
     if (m_copyState)
       copySupport = do_QueryInterface(m_copyState);
     rv = imapService->AppendMessageFromFile(m_thread,
                                             m_copyState->m_tmpFile,
-                                            this, EmptyCString(), PR_TRUE,
+                                            this, EmptyCString(), true,
                                             m_copyState->m_selectedState,
                                             urlListener, nsnull,
                                             copySupport,
                                             m_copyState->m_msgWindow);
   }
   if (NS_FAILED(rv) || !copySucceeded)
     PR_LOG(IMAP, PR_LOG_ALWAYS, ("EndCopy failed:%lx\n", rv));
   return rv;
@@ -3503,17 +3503,17 @@ NS_IMETHODIMP nsImapMailFolder::ApplyFil
     if (NS_SUCCEEDED(filterAction->GetType(&actionType)))
     {
       if (actionType == nsMsgFilterAction::MoveToFolder ||
           actionType == nsMsgFilterAction::CopyToFolder)
       {
         filterAction->GetTargetFolderUri(actionTargetFolderUri);
         if (actionTargetFolderUri.IsEmpty())
         {
-          NS_ASSERTION(PR_FALSE, "actionTargetFolderUri is empty");
+          NS_ASSERTION(false, "actionTargetFolderUri is empty");
           continue;
         }
       }
 
       PRUint32 msgFlags;
       nsMsgKey    msgKey;
       nsCAutoString trashNameVal;
 
@@ -3530,78 +3530,78 @@ NS_IMETHODIMP nsImapMailFolder::ApplyFil
             nsCOMPtr <nsIMsgFolder> mailTrash;
             rv = GetTrashFolder(getter_AddRefs(mailTrash));
             if (NS_SUCCEEDED(rv) && mailTrash)
               rv = mailTrash->GetURI(actionTargetFolderUri);
             // msgHdr->OrFlags(nsMsgMessageFlags::Read, &newFlags);  // mark read in trash.
           }
           else  // (!deleteToTrash)
           {
-            mDatabase->MarkHdrRead(msgHdr, PR_TRUE, nsnull);
-            mDatabase->MarkImapDeleted(msgKey, PR_TRUE, nsnull);
-            StoreImapFlags(kImapMsgSeenFlag | kImapMsgDeletedFlag, PR_TRUE,
+            mDatabase->MarkHdrRead(msgHdr, true, nsnull);
+            mDatabase->MarkImapDeleted(msgKey, true, nsnull);
+            StoreImapFlags(kImapMsgSeenFlag | kImapMsgDeletedFlag, true,
                            &msgKey, 1, nsnull);
-            m_msgMovedByFilter = PR_TRUE; // this will prevent us from adding the header to the db.
+            m_msgMovedByFilter = true; // this will prevent us from adding the header to the db.
           }
-          msgIsNew = PR_FALSE;
+          msgIsNew = false;
         }
         // note that delete falls through to move.
         case nsMsgFilterAction::MoveToFolder:
         {
           // if moving to a different file, do it.
           nsCString uri;
           rv = GetURI(uri);
 
           if (!actionTargetFolderUri.Equals(uri))
           {
             msgHdr->GetFlags(&msgFlags);
 
             if (msgFlags & nsMsgMessageFlags::MDNReportNeeded && !isRead)
             {
-               mDatabase->MarkMDNNeeded(msgKey, PR_FALSE, nsnull);
-               mDatabase->MarkMDNSent(msgKey, PR_TRUE, nsnull);
+               mDatabase->MarkMDNNeeded(msgKey, false, nsnull);
+               mDatabase->MarkMDNSent(msgKey, true, nsnull);
             }
             nsresult err = MoveIncorporatedMessage(msgHdr, mDatabase, actionTargetFolderUri, filter, msgWindow);
             if (NS_SUCCEEDED(err))
-              m_msgMovedByFilter = PR_TRUE;
+              m_msgMovedByFilter = true;
           }
           // don't apply any more filters, even if it was a move to the same folder
-          *applyMore = PR_FALSE; 
+          *applyMore = false; 
         }
         break;
         case nsMsgFilterAction::CopyToFolder:
         {
           nsCString uri;
           rv = GetURI(uri);
 
           if (!actionTargetFolderUri.Equals(uri))
           {
             // XXXshaver I'm not actually 100% what the right semantics are for
             // MDNs and copied messages, but I suspect deep down inside that
             // we probably want to suppress them only on the copies.
             msgHdr->GetFlags(&msgFlags);
             if (msgFlags & nsMsgMessageFlags::MDNReportNeeded && !isRead)
             {
-               mDatabase->MarkMDNNeeded(msgKey, PR_FALSE, nsnull);
-               mDatabase->MarkMDNSent(msgKey, PR_TRUE, nsnull);
+               mDatabase->MarkMDNNeeded(msgKey, false, nsnull);
+               mDatabase->MarkMDNSent(msgKey, true, nsnull);
             }
 
             nsCOMPtr<nsIMutableArray> messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv));
             NS_ENSURE_TRUE(messageArray, rv);
-            messageArray->AppendElement(msgHdr, PR_FALSE);
+            messageArray->AppendElement(msgHdr, false);
 
             nsCOMPtr<nsIMsgFolder> dstFolder;
             rv = GetExistingFolder(actionTargetFolderUri, getter_AddRefs(dstFolder));
             NS_ENSURE_SUCCESS(rv, rv);
 
             nsCOMPtr<nsIMsgCopyService> copyService =
               do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv);
             NS_ENSURE_SUCCESS(rv, rv);
             rv = copyService->CopyMessages(this, messageArray, dstFolder,
-                                           PR_FALSE, nsnull, msgWindow, PR_FALSE);
+                                           false, nsnull, msgWindow, false);
             NS_ENSURE_SUCCESS(rv, rv);
           }
         }
         break;
         case nsMsgFilterAction::MarkRead:
         {
           mDatabase->MarkHdrRead(msgHdr, true, nsnull);
           StoreImapFlags(kImapMsgSeenFlag, true, &msgKey, 1, nsnull);
@@ -3612,81 +3612,81 @@ NS_IMETHODIMP nsImapMailFolder::ApplyFil
         {
           mDatabase->MarkHdrRead(msgHdr, false, nsnull);
           StoreImapFlags(kImapMsgSeenFlag, false, &msgKey, 1, nsnull);
           msgIsNew = true;
         }
         break;
         case nsMsgFilterAction::MarkFlagged:
         {
-          mDatabase->MarkHdrMarked(msgHdr, PR_TRUE, nsnull);
-          StoreImapFlags(kImapMsgFlaggedFlag, PR_TRUE, &msgKey, 1, nsnull);
+          mDatabase->MarkHdrMarked(msgHdr, true, nsnull);
+          StoreImapFlags(kImapMsgFlaggedFlag, true, &msgKey, 1, nsnull);
         }
         break;
         case nsMsgFilterAction::KillThread:
         case nsMsgFilterAction::WatchThread:
         {
           nsCOMPtr <nsIMsgThread> msgThread;
           nsMsgKey threadKey;
           mDatabase->GetThreadContainingMsgHdr(msgHdr, getter_AddRefs(msgThread));
           if (msgThread)
           {
             msgThread->GetThreadKey(&threadKey);
             if (actionType == nsMsgFilterAction::KillThread)
-              mDatabase->MarkThreadIgnored(msgThread, threadKey, PR_TRUE, nsnull);
+              mDatabase->MarkThreadIgnored(msgThread, threadKey, true, nsnull);
             else
-              mDatabase->MarkThreadWatched(msgThread, threadKey, PR_TRUE, nsnull);
+              mDatabase->MarkThreadWatched(msgThread, threadKey, true, nsnull);
           }
           else
           {
             if (actionType == nsMsgFilterAction::KillThread)
               msgHdr->SetUint32Property("ProtoThreadFlags", nsMsgMessageFlags::Ignored);
             else
               msgHdr->SetUint32Property("ProtoThreadFlags", nsMsgMessageFlags::Watched);
           }
           if (actionType == nsMsgFilterAction::KillThread)
           {
-            mDatabase->MarkHdrRead(msgHdr, PR_TRUE, nsnull);
-            StoreImapFlags(kImapMsgSeenFlag, PR_TRUE, &msgKey, 1, nsnull);
-            msgIsNew = PR_FALSE;
+            mDatabase->MarkHdrRead(msgHdr, true, nsnull);
+            StoreImapFlags(kImapMsgSeenFlag, true, &msgKey, 1, nsnull);
+            msgIsNew = false;
           }
         }
         break;
         case nsMsgFilterAction::KillSubthread:
         {
-          mDatabase->MarkHeaderKilled(msgHdr, PR_TRUE, nsnull);
-          mDatabase->MarkHdrRead(msgHdr, PR_TRUE, nsnull);
-          StoreImapFlags(kImapMsgSeenFlag, PR_TRUE, &msgKey, 1, nsnull);
-          msgIsNew = PR_FALSE;
+          mDatabase->MarkHeaderKilled(msgHdr, true, nsnull);
+          mDatabase->MarkHdrRead(msgHdr, true, nsnull);
+          StoreImapFlags(kImapMsgSeenFlag, true, &msgKey, 1, nsnull);
+          msgIsNew = false;
         }
         break;
         case nsMsgFilterAction::ChangePriority:
         {
           nsMsgPriorityValue filterPriority; // a PRInt32
           filterAction->GetPriority(&filterPriority);
           mDatabase->SetUint32PropertyByHdr(msgHdr, "priority",
                                             static_cast<PRUint32>(filterPriority));
         }
         break;
         case nsMsgFilterAction::Label:
         {
           nsMsgLabelValue filterLabel;
           filterAction->GetLabel(&filterLabel);
           mDatabase->SetUint32PropertyByHdr(msgHdr, "label",
                                             static_cast<PRUint32>(filterLabel));
-          StoreImapFlags((filterLabel << 9), PR_TRUE, &msgKey, 1, nsnull);
+          StoreImapFlags((filterLabel << 9), true, &msgKey, 1, nsnull);
         }
         break;
         case nsMsgFilterAction::AddTag:
         {
           nsCString keyword;
           filterAction->GetStrValue(keyword);
           nsCOMPtr<nsIMutableArray> messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv));
           NS_ENSURE_TRUE(messageArray, rv);
-          messageArray->AppendElement(msgHdr, PR_FALSE);
+          messageArray->AppendElement(msgHdr, false);
           AddKeywordsToMessages(messageArray, keyword);
           break;
         }
         case nsMsgFilterAction::JunkScore:
         {
           nsCAutoString junkScoreStr;
           PRInt32 junkScore;
           filterAction->GetJunkScore(&junkScore);
@@ -3700,31 +3700,31 @@ NS_IMETHODIMP nsImapMailFolder::ApplyFil
           {
             nsTArray<nsMsgKey> *keysToClassify = m_moveCoalescer->GetKeyBucket(
                        (junkScore == nsIJunkMailPlugin::IS_SPAM_SCORE) ? 0 : 1);
             NS_ASSERTION(keysToClassify, "error getting key bucket");
             if (keysToClassify)
               keysToClassify->AppendElement(msgKey);
             if (msgIsNew && junkScore == nsIJunkMailPlugin::IS_SPAM_SCORE)
             {              
-              msgIsNew = PR_FALSE;
+              msgIsNew = false;
               mDatabase->MarkHdrNotNew(msgHdr, nsnull);
               // nsMsgDBFolder::SendFlagNotifications by the call to
               // SetBiffState(nsMsgBiffState_NoMail) will reset numNewMessages
               // only if the message is also read and database notifications
               // are active, but we are not going to mark it read in this
               // action, preferring to leave the choice to the user.
               // So correct numNewMessages.
               if (m_filterListRequiresBody)
               {
                 msgHdr->GetFlags(&msgFlags);
                 if (!(msgFlags & nsMsgMessageFlags::Read))
                 {
                   PRInt32 numNewMessages;
-                  GetNumNewMessages(PR_FALSE, &numNewMessages);
+                  GetNumNewMessages(false, &numNewMessages);
                   SetNumNewMessages(--numNewMessages);
                   SetHasNewMessages(numNewMessages != 0);
                 }
               }
             }
           }
         }
         break;
@@ -3761,40 +3761,40 @@ NS_IMETHODIMP nsImapMailFolder::ApplyFil
               rv = compService->ReplyWithTemplate(msgHdr, replyTemplateUri.get(), msgWindow, server);
           }
         }
         break;
 
         case nsMsgFilterAction::StopExecution:
         {
           // don't apply any more filters
-          *applyMore = PR_FALSE;
+          *applyMore = false;
         }
         break;
 
         case nsMsgFilterAction::Custom:
         {
           nsCOMPtr<nsIMsgFilterCustomAction> customAction;
           rv = filterAction->GetCustomAction(getter_AddRefs(customAction));
           NS_ENSURE_SUCCESS(rv, rv);
 
           nsCAutoString value;
           filterAction->GetStrValue(value);
 
           nsCOMPtr<nsIMutableArray> messageArray(
               do_CreateInstance(NS_ARRAY_CONTRACTID, &rv));
           NS_ENSURE_TRUE(messageArray, rv);
-          messageArray->AppendElement(msgHdr, PR_FALSE);
+          messageArray->AppendElement(msgHdr, false);
 
           customAction->Apply(messageArray, value, nsnull,
                               nsMsgFilterType::InboxRule, msgWindow);
           // allow custom action to affect new
           msgHdr->GetFlags(&msgFlags);
           if (!(msgFlags & nsMsgMessageFlags::New))
-            msgIsNew = PR_FALSE;
+            msgIsNew = false;
         }
         break;
 
         default:
           break;
       }
       if (loggingEnabled)
       {
@@ -3803,17 +3803,17 @@ NS_IMETHODIMP nsImapMailFolder::ApplyFil
              (actionType != nsMsgFilterAction::Delete || !deleteToTrash)))
           (void) filter->LogRuleHit(filterAction, msgHdr);
       }
     }
   }
   if (!msgIsNew)
   {
     PRInt32 numNewMessages;
-    GetNumNewMessages(PR_FALSE, &numNewMessages);
+    GetNumNewMessages(false, &numNewMessages);
     // When database notifications are active, new counts will be reset
     // to zero in nsMsgDBFolder::SendFlagNotifications by the call to
     // SetBiffState(nsMsgBiffState_NoMail), so don't repeat them here.
     if (!m_filterListRequiresBody)
       SetNumNewMessages(--numNewMessages);
     if (mDatabase)
       mDatabase->MarkHdrNotNew(msgHdr, nsnull);
   }
@@ -3821,17 +3821,17 @@ NS_IMETHODIMP nsImapMailFolder::ApplyFil
 }
 
 NS_IMETHODIMP nsImapMailFolder::SetImapFlags(const char *uids, PRInt32 flags, nsIURI **url)
 {
   nsresult rv;
   nsCOMPtr<nsIImapService> imapService = do_GetService(NS_IMAPSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
 
-  return imapService->SetMessageFlags(m_thread, this, this, url, nsCAutoString(uids), flags, PR_TRUE);
+  return imapService->SetMessageFlags(m_thread, this, this, url, nsCAutoString(uids), flags, true);
 }
 
 // "this" is the parent folder
 NS_IMETHODIMP nsImapMailFolder::PlaybackOfflineFolderCreate(const nsAString& aFolderName, nsIMsgWindow *aWindow, nsIURI **url)
 {
   nsresult rv;
   nsCOMPtr<nsIImapService> imapService = do_GetService(NS_IMAPSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
@@ -3866,33 +3866,33 @@ nsImapMailFolder::ReplayOfflineMoveCopy(
       {
         nsCString srcFolderUri;
         GetURI(srcFolderUri);
         for (PRUint32 msgIndex = 0; msgIndex < aNumKeys; msgIndex++)
         {
           nsCOMPtr<nsIMsgOfflineImapOperation> currentOp;
           for (PRUint32 opIndex = 0; opIndex < offlineOps.Length(); opIndex++)
           {
-            dstFolderDB->GetOfflineOpForKey(offlineOps[opIndex], PR_FALSE,
+            dstFolderDB->GetOfflineOpForKey(offlineOps[opIndex], false,
                                             getter_AddRefs(currentOp));
             if (currentOp)
             {
               nsMsgKey srcMessageKey;
               currentOp->GetSrcMessageKey(&srcMessageKey);
               if (srcMessageKey == aMsgKeys[msgIndex])
               {
                 nsCString opSrcUri;
                 currentOp->GetSourceFolderURI(getter_Copies(opSrcUri));
                 if (opSrcUri.Equals(srcFolderUri))
                 {
                   nsCOMPtr<nsIMsgDBHdr> fakeDestHdr;
                   dstFolderDB->GetMsgHdrForKey(offlineOps[opIndex],
                     getter_AddRefs(fakeDestHdr));
                   if (fakeDestHdr)
-                    messages->AppendElement(fakeDestHdr, PR_FALSE);
+                    messages->AppendElement(fakeDestHdr, false);
                   break;
                 }
               }
             }
           }
         }
         destImapFolder->SetPendingAttributes(messages, isMove);
       }
@@ -3902,17 +3902,17 @@ nsImapMailFolder::ReplayOfflineMoveCopy(
   }
 
   nsCOMPtr<nsIImapService> imapService = do_GetService(NS_IMAPSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr <nsIURI> resultUrl;
   nsCAutoString uids;
   AllocateUidStringFromKeys(aMsgKeys, aNumKeys, uids);
   rv = imapService->OnlineMessageCopy(m_thread, this, uids, aDstFolder,
-                                      PR_TRUE, isMove, aUrlListener,
+                                      true, isMove, aUrlListener,
                                       getter_AddRefs(resultUrl), nsnull, aWindow);
   if (resultUrl)
   {
     nsCOMPtr <nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(resultUrl, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     nsCOMPtr <nsIUrlListener> folderListener = do_QueryInterface(aDstFolder);
     if (folderListener)
       mailnewsUrl->RegisterListener(folderListener);
@@ -3944,31 +3944,31 @@ NS_IMETHODIMP nsImapMailFolder::StoreIma
   if (!WeAreOffline())
   {
     nsCOMPtr<nsIImapService> imapService = do_GetService(NS_IMAPSERVICE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     nsCAutoString msgIds;
     AllocateUidStringFromKeys(keys, numKeys, msgIds);
     if (addFlags)
       imapService->AddMessageFlags(m_thread, this, aUrlListener ? aUrlListener : this,
-                                   nsnull, msgIds, flags, PR_TRUE);
+                                   nsnull, msgIds, flags, true);
     else
       imapService->SubtractMessageFlags(m_thread, this, aUrlListener ? aUrlListener : this,
-                                        nsnull, msgIds, flags, PR_TRUE);
+                                        nsnull, msgIds, flags, true);
   }
   else
   {
     GetDatabase();
     if (mDatabase)
     {
       PRUint32 total = numKeys;
       for (PRUint32 keyIndex = 0; keyIndex < total; keyIndex++)
       {
         nsCOMPtr <nsIMsgOfflineImapOperation> op;
-        rv = mDatabase->GetOfflineOpForKey(keys[keyIndex], PR_TRUE, getter_AddRefs(op));
+        rv = mDatabase->GetOfflineOpForKey(keys[keyIndex], true, getter_AddRefs(op));
         SetFlag(nsMsgFolderFlags::OfflineEvents);
         if (NS_SUCCEEDED(rv) && op)
         {
           imapMessageFlagsType newFlags;
           op->GetNewFlags(&newFlags);
           op->SetFlagOperation(addFlags ? newFlags | flags : newFlags & ~flags);
         }
       }
@@ -4080,17 +4080,17 @@ NS_IMETHODIMP nsImapMailFolder::FolderPr
     }
   }
   else
   {
     nsCOMPtr<nsIImapService> imapService = do_GetService(NS_IMAPSERVICE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv,rv);
     rv = imapService->GetFolderAdminUrl(m_thread, this, window, this, nsnull);
     if (NS_SUCCEEDED(rv))
-      m_urlRunning = PR_TRUE;
+      m_urlRunning = true;
   }
   return rv;
 }
 
 NS_IMETHODIMP nsImapMailFolder::GetHasAdminUrl(bool *aBool)
 {
   NS_ENSURE_ARG_POINTER(aBool);
   nsCOMPtr<nsIImapIncomingServer> imapServer;
@@ -4167,17 +4167,17 @@ nsresult nsImapMailFolder::MoveIncorpora
       // Or read only imap folders...
       bool canFileMessages = true;
       nsCOMPtr<nsIMsgFolder> parentFolder;
       destIFolder->GetParent(getter_AddRefs(parentFolder));
       if (parentFolder)
         destIFolder->GetCanFileMessages(&canFileMessages);
       if (filter && (!parentFolder || !canFileMessages))
       {
-        filter->SetEnabled(PR_FALSE);
+        filter->SetEnabled(false);
         m_filterList->SaveToDefaultFile();
         destIFolder->ThrowAlertMsg("filterDisabled",msgWindow);
         return NS_MSG_NOT_A_MAIL_FOLDER;
       }
       // put the header into the source db, since it needs to be there when we copy it
       // and we need a valid header to pass to StartAsyncCopyMessagesInto
       nsMsgKey keyToFilter;
       mailHdr->GetMessageKey(&keyToFilter);
@@ -4364,17 +4364,17 @@ NS_IMETHODIMP nsImapMailFolder::GetMsgHd
                                                      PRUint32 *aLength,
                                                      nsMsgKey **aKeys)
 {
   NS_ENSURE_ARG_POINTER(aMoreToDownload);
   NS_ENSURE_ARG_POINTER(aTotalCount);
   NS_ENSURE_ARG_POINTER(aLength);
   NS_ENSURE_ARG_POINTER(aKeys);
 
-  *aMoreToDownload = PR_FALSE;
+  *aMoreToDownload = false;
   *aTotalCount = m_totalKeysToFetch;
   if (m_keysToFetch.IsEmpty())
   {
     *aLength = 0;
     return NS_OK;
   }
 
   // if folder isn't open in a window, no reason to limit the number of headers
@@ -4393,17 +4393,17 @@ NS_IMETHODIMP nsImapMailFolder::GetMsgHd
     if (prefBranch)
       prefBranch->GetIntPref("mail.imap.hdr_chunk_size", &hdrChunkSize);
   }
   PRInt32 numKeysToFetch = m_keysToFetch.Length();
   PRInt32 startIndex = 0;
   if (folderOpen && hdrChunkSize > 0 && m_keysToFetch.Length() > hdrChunkSize)
   {
     numKeysToFetch = hdrChunkSize;
-    *aMoreToDownload = PR_TRUE;
+    *aMoreToDownload = true;
     startIndex = m_keysToFetch.Length() - hdrChunkSize;
   }
   *aKeys = (nsMsgKey *) nsMemory::Clone(&m_keysToFetch[startIndex],
                                        numKeysToFetch * sizeof(nsMsgKey));
   NS_ENSURE_TRUE(*aKeys, NS_ERROR_OUT_OF_MEMORY);
   // Remove these for the incremental header download case, so that
   // we know we don't have to download them again.
   m_keysToFetch.RemoveElementsAt(startIndex, numKeysToFetch);
@@ -4494,17 +4494,17 @@ void nsImapMailFolder::TweakHeaderFlags(
     }
   }
 }
 
 NS_IMETHODIMP
 nsImapMailFolder::SetupMsgWriteStream(nsIFile * aFile, bool addDummyEnvelope)
 {
   nsresult rv;
-  aFile->Remove(PR_FALSE);
+  aFile->Remove(false);
   nsCOMPtr<nsILocalFile>  localFile = do_QueryInterface(aFile, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   rv = MsgNewBufferedFileOutputStream(getter_AddRefs(m_tempMessageStream), localFile, PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE, 00700);
   if (m_tempMessageStream && addDummyEnvelope)
   {
     nsCAutoString result;
     char *ct;
     PRUint32 writeCount;
@@ -4553,39 +4553,39 @@ NS_IMETHODIMP nsImapMailFolder::Download
   GetFlag(nsMsgFolderFlags::ImapNoselect, &noSelect);
 
   if (!noSelect)
   {
     nsCAutoString messageIdsToDownload;
     nsTArray<nsMsgKey> msgsToDownload;
 
     GetDatabase();
-    m_downloadingFolderForOfflineUse = PR_TRUE;
+    m_downloadingFolderForOfflineUse = true;
 
     rv = AcquireSemaphore(static_cast<nsIMsgFolder*>(this));
     if (NS_FAILED(rv))
     {
-      m_downloadingFolderForOfflineUse = PR_FALSE;
+      m_downloadingFolderForOfflineUse = false;
       ThrowAlertMsg("operationFailedFolderBusy", msgWindow);
       return rv;
     }
     nsCOMPtr<nsIImapService> imapService = do_GetService(NS_IMAPSERVICE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // Selecting the folder with nsIImapUrl::shouldStoreMsgOffline true will
     // cause us to fetch any message bodies we don't have.
     m_urlListener = listener;
     rv = imapService->SelectFolder(m_thread, this, this, msgWindow,
                                    getter_AddRefs(runningURI));
     if (NS_SUCCEEDED(rv))
     {
       nsCOMPtr<nsIImapUrl> imapUrl(do_QueryInterface(runningURI));
       if (imapUrl)
-        imapUrl->SetStoreResultsOffline(PR_TRUE);
-      m_urlRunning = PR_TRUE;
+        imapUrl->SetStoreResultsOffline(true);
+      m_urlRunning = true;
     }
   }
   else
     rv = NS_MSG_FOLDER_UNREADABLE;
   return rv;
 }
 
 NS_IMETHODIMP
@@ -4681,33 +4681,33 @@ nsImapMailFolder::NormalEndMsgWriteStrea
     // HeaderFetchCompleted.
     bool pendingMoves = m_moveCoalescer && m_moveCoalescer->HasPendingMoves();
     PlaybackCoalescedOperations();
 
     bool filtersRun;
     CallFilterPlugins(nsnull, &filtersRun);
     PRInt32 numNewBiffMsgs = 0;
     if (m_performingBiff)
-      GetNumNewMessages(PR_FALSE, &numNewBiffMsgs);
+      GetNumNewMessages(false, &numNewBiffMsgs);
 
     if (!filtersRun && m_performingBiff && mDatabase && numNewBiffMsgs > 0 &&
         (!pendingMoves || !ShowPreviewText()))
     {
       // If we are performing biff for this folder, tell the
       // stand-alone biff about the new high water mark
       // We must ensure that the server knows that we are performing biff.
       // Otherwise the stand-alone biff won't fire.
       nsCOMPtr<nsIMsgIncomingServer> server;
       if (NS_SUCCEEDED(GetServer(getter_AddRefs(server))) && server)
-        server->SetPerformingBiff(PR_TRUE);
+        server->SetPerformingBiff(true);
 
       SetBiffState(nsIMsgFolder::nsMsgBiffState_NewMail);
       if (server)
-        server->SetPerformingBiff(PR_FALSE);
-      m_performingBiff = PR_FALSE;
+        server->SetPerformingBiff(false);
+      m_performingBiff = false;
     }
 
     if (m_filterList)
       (void)m_filterList->FlushLogIfNecessary();
   }
 
   return NS_OK;
 }
@@ -4739,17 +4739,17 @@ nsImapMailFolder::OnlineCopyCompleted(ns
     nsCString messageIds;
     rv = imapUrl->GetListOfMessageIds(messageIds);
     if (NS_FAILED(rv)) return rv;
     nsCOMPtr<nsIImapService> imapService =  do_GetService(NS_IMAPSERVICE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv,rv);
     return imapService->AddMessageFlags(m_thread, this, nsnull, nsnull,
                                       messageIds,
                                       kImapMsgDeletedFlag,
-                                      PR_TRUE);
+                                      true);
   }
   /* unhandled copystate */
   else if (m_copyState) // whoops, this is the wrong folder - should use the source folder
   {
     nsCOMPtr<nsIMsgFolder> srcFolder;
     srcFolder = do_QueryInterface(m_copyState->m_srcSupport, &rv);
     if (srcFolder)
       srcFolder->NotifyFolderEvent(mDeleteOrMoveMsgCompletedAtom);
@@ -4800,17 +4800,17 @@ nsresult nsImapMailFolder::HandleCustomF
   {
     PRUint32 newFlags;
     dbHdr->AndFlags(~nsMsgMessageFlags::New, &newFlags);
     nsCAutoString msgJunkScore;
     msgJunkScore.AppendInt(nsIJunkMailPlugin::IS_SPAM_SCORE);
     mDatabase->SetStringProperty(uidOfMessage, "junkscore", msgJunkScore.get());
   }
   else
-    messageClassified = PR_FALSE;
+    messageClassified = false;
   if (messageClassified)
   {
     // only set the junkscore origin if it wasn't set before. 
     nsCString existingProperty;
     dbHdr->GetStringProperty("junkscoreorigin", getter_Copies(existingProperty));
     if (existingProperty.IsEmpty())
       dbHdr->SetStringProperty("junkscoreorigin", "imapflag");
   }
@@ -4969,31 +4969,31 @@ nsImapMailFolder::NotifyMessageDeleted(c
   }
   return NS_OK;
 }
 
 bool nsImapMailFolder::ShowDeletedMessages()
 {
   nsresult rv;
   nsCOMPtr<nsIImapHostSessionList> hostSession = do_GetService(kCImapHostSessionList, &rv);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   bool showDeleted = false;
   nsCString serverKey;
   GetServerKey(serverKey);
   hostSession->GetShowDeletedMessagesForHost(serverKey.get(), showDeleted);
 
   return showDeleted;
 }
 
 bool nsImapMailFolder::DeleteIsMoveToTrash()
 {
   nsresult err;
   nsCOMPtr<nsIImapHostSessionList> hostSession = do_GetService(kCImapHostSessionList, &err);
-  NS_ENSURE_SUCCESS(err, PR_TRUE);
+  NS_ENSURE_SUCCESS(err, true);
   bool rv = true;
 
   nsCString serverKey;
   GetServerKey(serverKey);
   hostSession->GetDeleteIsMoveToTrashForHost(serverKey.get(), rv);
   return rv;
 }
 
@@ -5091,19 +5091,19 @@ nsImapMailFolder::GetCurMoveCopyMessageI
         // plus any junk status
         nsCString junkscore;
         mailCopyState->m_message->GetStringProperty("junkscore",
                                                     getter_Copies(junkscore));
         bool isJunk = false, isNotJunk = false;
         if (!junkscore.IsEmpty())
         {
           if (junkscore.EqualsLiteral("0"))
-            isNotJunk = PR_TRUE;
+            isNotJunk = true;
           else
-            isJunk = PR_TRUE;
+            isJunk = true;
         }
 
         nsCString keywords; // MsgFindKeyword can't use nsACString
         mailCopyState->m_message->GetStringProperty("keywords",
                                                     getter_Copies(keywords));
         PRInt32 start;
         PRInt32 length;
         bool hasJunk = MsgFindKeyword(NS_LITERAL_CSTRING("junk"),
@@ -5162,45 +5162,45 @@ nsImapMailFolder::OnStartRunningUrl(nsIU
   NS_PRECONDITION(aUrl, "sanity check - need to be be running non-null url");
   nsCOMPtr<nsIMsgMailNewsUrl> mailUrl = do_QueryInterface(aUrl);
   if (mailUrl)
   {
     bool updatingFolder;
     mailUrl->GetUpdatingFolder(&updatingFolder);
     m_updatingFolder = updatingFolder;
   }
-  m_urlRunning = PR_TRUE;
+  m_urlRunning = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapMailFolder::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode)
 {
   nsresult rv;
   bool endedOfflineDownload = false;
   nsImapAction imapAction = nsIImapUrl::nsImapTest;
-  m_urlRunning = PR_FALSE;
-  m_updatingFolder = PR_FALSE;
+  m_urlRunning = false;
+  m_updatingFolder = false;
   nsCOMPtr<nsIMsgMailSession> session =
     do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   if (aUrl)
   {
   nsCOMPtr <nsIImapUrl> imapUrl = do_QueryInterface(aUrl, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   bool downloadingForOfflineUse;
   imapUrl->GetStoreResultsOffline(&downloadingForOfflineUse);
     bool hasSemaphore = false;
     // if we have the folder locked, clear it.
     TestSemaphore(static_cast<nsIMsgFolder*>(this), &hasSemaphore);
     if (hasSemaphore)
       ReleaseSemaphore(static_cast<nsIMsgFolder*>(this));
   if (downloadingForOfflineUse)
   {
-    endedOfflineDownload = PR_TRUE;
+    endedOfflineDownload = true;
     EndOfflineDownload();
   }
     nsCOMPtr<nsIMsgWindow> msgWindow;
     nsCOMPtr<nsIMsgMailNewsUrl> mailUrl = do_QueryInterface(aUrl);
     bool folderOpen = false;
     if (mailUrl)
       mailUrl->GetMsgWindow(getter_AddRefs(msgWindow));
     if (session)
@@ -5223,19 +5223,19 @@ nsImapMailFolder::OnStopRunningUrl(nsIUR
       }
 
       // Notify move, copy or delete (online operations)
       // Not sure whether nsImapDeleteMsg is even used, deletes in all three models use nsImapAddMsgFlags.
       nsCOMPtr<nsIMsgFolderNotificationService> notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
       if (notifier && m_copyState)
       {
         if (imapAction == nsIImapUrl::nsImapOnlineMove)
-          notifier->NotifyMsgsMoveCopyCompleted(PR_TRUE, m_copyState->m_messages, this, nsnull);
+          notifier->NotifyMsgsMoveCopyCompleted(true, m_copyState->m_messages, this, nsnull);
         else if (imapAction == nsIImapUrl::nsImapOnlineCopy)
-          notifier->NotifyMsgsMoveCopyCompleted(PR_FALSE, m_copyState->m_messages, this, nsnull);
+          notifier->NotifyMsgsMoveCopyCompleted(false, m_copyState->m_messages, this, nsnull);
         else if (imapAction == nsIImapUrl::nsImapDeleteMsg)
           notifier->NotifyMsgsDeleted(m_copyState->m_messages);
       }
 
       switch(imapAction)
       {
       case nsIImapUrl::nsImapDeleteMsg:
       case nsIImapUrl::nsImapOnlineMove:
@@ -5273,19 +5273,19 @@ nsImapMailFolder::OnStopRunningUrl(nsIUR
                   nsCAutoString messageIds;
                   rv = BuildIdsAndKeyArray(m_copyState->m_messages, messageIds, srcKeyArray);
                   NS_ENSURE_SUCCESS(rv,rv);
                 }
 
                 if (!ShowDeletedMessages())
                   srcDB->DeleteMessages(srcKeyArray.Length(), srcKeyArray.Elements(), nsnull);
                 else
-                  MarkMessagesImapDeleted(&srcKeyArray, PR_TRUE, srcDB);
+                  MarkMessagesImapDeleted(&srcKeyArray, true, srcDB);
               }
-              srcFolder->EnableNotifications(allMessageCountNotifications, PR_TRUE, PR_TRUE/* dbBatching*/);
+              srcFolder->EnableNotifications(allMessageCountNotifications, true, true/* dbBatching*/);
               // even if we're showing deleted messages,
               // we still need to notify FE so it will show the imap deleted flag
               srcFolder->NotifyFolderEvent(mDeleteOrMoveMsgCompletedAtom);
               // is there a way to see that we think we have new msgs?
               nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
               if (NS_SUCCEEDED(rv))
               {
                 bool showPreviewText;
@@ -5295,17 +5295,17 @@ nsImapMailFolder::OnStopRunningUrl(nsIUR
                 // to preview the msg bodies.
                 if (!folderOpen && showPreviewText && m_copyState->m_unreadCount > 0
                     && ! (mFlags & (nsMsgFolderFlags::Trash | nsMsgFolderFlags::Junk)))
                   UpdateFolder(msgWindow);
               }
             }
             else
             {
-              srcFolder->EnableNotifications(allMessageCountNotifications, PR_TRUE, PR_TRUE/* dbBatching*/);
+              srcFolder->EnableNotifications(allMessageCountNotifications, true, true/* dbBatching*/);
               srcFolder->NotifyFolderEvent(mDeleteOrMoveMsgFailedAtom);
             }
 
           }
           if (m_copyState->m_msgWindow && NS_SUCCEEDED(aExitCode)) //we should do this only if move/copy succeeds
           {
             nsCOMPtr<nsITransactionManager> txnMgr;
             m_copyState->m_msgWindow->GetTransactionManager(getter_AddRefs(txnMgr));
@@ -5338,17 +5338,17 @@ nsImapMailFolder::OnStopRunningUrl(nsIUR
             nsCOMPtr<nsIMsgDatabase> db;
             rv = GetMsgDatabase(getter_AddRefs(db));
             if (NS_SUCCEEDED(rv) && db)
             {
               nsTArray<nsMsgKey> keyArray;
               nsCString keyString;
               imapUrl->GetListOfMessageIds(keyString);
               ParseUidString(keyString.get(), keyArray);
-              MarkMessagesImapDeleted(&keyArray, PR_FALSE, db);
+              MarkMessagesImapDeleted(&keyArray, false, db);
               db->Commit(nsMsgDBCommitType::kLargeCommit);
             }
           }
         }
         break;
       case nsIImapUrl::nsImapAddMsgFlags:
         {
           imapMessageFlagsType flags = 0;
@@ -5378,17 +5378,17 @@ nsImapMailFolder::OnStopRunningUrl(nsIUR
                   // to delete. This is why we're also checking whether the array is empty.
                   PRUint32 numHdrs;
                   msgHdrs->GetLength(&numHdrs);
                   if (numHdrs)
                     notifier->NotifyMsgsDeleted(msgHdrs);
                 }
 
                 db->DeleteMessages(keyArray.Length(), keyArray.Elements(), nsnull);
-                db->SetSummaryValid(PR_TRUE);
+                db->SetSummaryValid(true);
                 db->Commit(nsMsgDBCommitType::kLargeCommit);
               }
             }
           }
         }
         break;
       case nsIImapUrl::nsImapAppendMsgFromFile:
       case nsIImapUrl::nsImapAppendDraftFromFile:
@@ -5529,31 +5529,31 @@ nsImapMailFolder::OnStopRunningUrl(nsIUR
                     windowCommands->SelectFolder(uri);
                 }
               }
             }
           }
         }
         break;
       case nsIImapUrl::nsImapExpungeFolder:
-        m_expunging = PR_FALSE;
+        m_expunging = false;
         break;
       default:
           break;
       }
     }
     // give base class a chance to send folder loaded notification...
     rv = nsMsgDBFolder::OnStopRunningUrl(aUrl, aExitCode);
     // query it for a mailnews interface for now....
     if (mailUrl)
       rv = mailUrl->UnRegisterListener(this);
 
   }
   // if we're not running a url, we must not be getting new mail.
-  SetGettingNewMessages(PR_FALSE);
+  SetGettingNewMessages(false);
   // don't send OnStopRunning notification if still compacting offline store.
   if (m_urlListener && (imapAction != nsIImapUrl::nsImapExpungeFolder ||
                         !m_compactingOfflineStore))
   {
     nsCOMPtr<nsIUrlListener> saveListener = m_urlListener;
     m_urlListener = nsnull;
     saveListener->OnStopRunningUrl(aUrl, aExitCode);
   }
@@ -5575,26 +5575,26 @@ void nsImapMailFolder::UpdatePendingCoun
     }
     SummaryChanged();
   }
 }
 
 NS_IMETHODIMP
 nsImapMailFolder::ClearFolderRights()
 {
-  SetFolderNeedsACLListed(PR_FALSE);
+  SetFolderNeedsACLListed(false);
   delete m_folderACL;
   m_folderACL = new nsMsgIMAPFolderACL(this);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapMailFolder::AddFolderRights(const nsACString& userName, const nsACString& rights)
 {
-  SetFolderNeedsACLListed(PR_FALSE);
+  SetFolderNeedsACLListed(false);
   GetFolderACL()->SetFolderRightsForUser(userName, rights);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapMailFolder::RefreshFolderRights()
 {
   if (GetFolderACL()->GetIsFolderShared())
@@ -5785,17 +5785,17 @@ nsImapMailFolder::HeaderFetchCompleted(n
 {
   nsCOMPtr <nsIMsgWindow> msgWindow; // we might need this for the filter plugins.
   if (mBackupDatabase)
     RemoveBackupMsgDatabase();
 
   SetSizeOnDisk(mFolderSize);
   PRInt32 numNewBiffMsgs = 0;
   if (m_performingBiff)
-    GetNumNewMessages(PR_FALSE, &numNewBiffMsgs);
+    GetNumNewMessages(false, &numNewBiffMsgs);
 
   bool pendingMoves = m_moveCoalescer && m_moveCoalescer->HasPendingMoves();
   PlaybackCoalescedOperations();
   if (aProtocol)
   {
     // check if we should download message bodies because it's the inbox and
     // the server is specified as one where where we download msg bodies automatically.
     // Or if we autosyncing all offline folders.
@@ -5805,29 +5805,29 @@ nsImapMailFolder::HeaderFetchCompleted(n
     bool autoDownloadNewHeaders = false;
     bool autoSyncOfflineStores = false;
 
     if (imapServer)
     {
       imapServer->GetAutoSyncOfflineStores(&autoSyncOfflineStores);
       imapServer->GetDownloadBodiesOnGetNewMail(&autoDownloadNewHeaders);
       if (m_filterListRequiresBody)
-        autoDownloadNewHeaders = PR_TRUE;
+        autoDownloadNewHeaders = true;
     }
     bool notifiedBodies = false;
     if (m_downloadingFolderForOfflineUse || autoSyncOfflineStores ||
         autoDownloadNewHeaders)
     {
       nsTArray<nsMsgKey> keysToDownload;
       GetBodysToDownload(&keysToDownload);
       // this is the case when DownloadAllForOffline is called.
       if (!keysToDownload.IsEmpty() && (m_downloadingFolderForOfflineUse ||
                                         autoDownloadNewHeaders))
       {
-        notifiedBodies = PR_TRUE;
+        notifiedBodies = true;
         aProtocol->NotifyBodysToDownload(keysToDownload.Elements(), keysToDownload.Length());
       }
       else
       {
         // create auto-sync state object lazily
         InitAutoSyncState();
 
         // make enough room for new downloads
@@ -5861,22 +5861,22 @@ nsImapMailFolder::HeaderFetchCompleted(n
         (!pendingMoves || !ShowPreviewText()))
     {
       // If we are performing biff for this folder, tell the
       // stand-alone biff about the new high water mark
       // We must ensure that the server knows that we are performing biff.
       // Otherwise the stand-alone biff won't fire.
       nsCOMPtr<nsIMsgIncomingServer> server;
       if (NS_SUCCEEDED(GetServer(getter_AddRefs(server))) && server)
-        server->SetPerformingBiff(PR_TRUE);
+        server->SetPerformingBiff(true);
 
       SetBiffState(nsIMsgFolder::nsMsgBiffState_NewMail);
       if (server)
-        server->SetPerformingBiff(PR_FALSE);
-      m_performingBiff = PR_FALSE;
+        server->SetPerformingBiff(false);
+      m_performingBiff = false;
     }
 
     if (m_filterList)
       (void)m_filterList->FlushLogIfNecessary();
   }
 
   return NS_OK;
 }
@@ -5972,22 +5972,22 @@ nsImapMailFolder::FillInFolderProps(nsIM
       // to saying that no information is available because the folder is not open.
       folderQuotaStatusStringID = (capability == kCapabilityUndefined) ?
         IMAP_QUOTA_STATUS_FOLDERNOTOPEN : IMAP_QUOTA_STATUS_NOTSUPPORTED;
     }
 
     if(folderQuotaStatusStringID == 0)
     {
       // Display quota data
-      aFolderProps->ShowQuotaData(PR_TRUE);
+      aFolderProps->ShowQuotaData(true);
     }
     else
     {
       // Hide quota data and show reason why it is not available
-      aFolderProps->ShowQuotaData(PR_FALSE);
+      aFolderProps->ShowQuotaData(false);
 
       rv = IMAPGetStringByID(folderQuotaStatusStringID, getter_Copies(folderQuotaStatusDesc));
       if (NS_SUCCEEDED(rv))
         aFolderProps->SetQuotaStatus(folderQuotaStatusDesc);
     }
 
     // See if the server supports ACL.
     // If not, just set the folder description to a string that says
@@ -6011,17 +6011,17 @@ nsImapMailFolder::FillInFolderProps(nsIM
     folderTypeStringID = IMAP_OTHER_USERS_FOLDER_TYPE_NAME;
     nsCString owner;
     nsString uniOwner;
     GetFolderOwnerUserName(owner);
     if (owner.IsEmpty())
     {
       rv = IMAPGetStringByID(folderTypeStringID, getter_Copies(uniOwner));
       // Another user's folder, for which we couldn't find an owner name
-      NS_ASSERTION(PR_FALSE, "couldn't get owner name for other user's folder");
+      NS_ASSERTION(false, "couldn't get owner name for other user's folder");
     }
     else
     {
       // is this right? It doesn't leak, does it?
       CopyASCIItoUTF16(owner, uniOwner);
     }
     const PRUnichar *params[] = { uniOwner.get() };
     rv = bundle->FormatStringFromID(IMAP_OTHER_USERS_FOLDER_TYPE_DESCRIPTION, params, 1, getter_Copies(folderTypeDesc));
@@ -6068,29 +6068,29 @@ NS_IMETHODIMP nsImapMailFolder::SetAclFl
       rv = mDatabase->GetDBFolderInfo(getter_AddRefs(dbFolderInfo));
       if (NS_SUCCEEDED(rv) && dbFolderInfo)
         dbFolderInfo->SetUint32Property("aclFlags", aclFlags);
       // if setting the acl flags caused us to open the db, release the ref
       // because on startup, we might get acl on all folders,which will
       // leave a lot of db's open.
       if (!dbWasOpen)
       {
-        mDatabase->Close(PR_TRUE /* commit changes */);
+        mDatabase->Close(true /* commit changes */);
         mDatabase = nsnull;
       }
     }
   }
   return rv;
 }
 
 NS_IMETHODIMP nsImapMailFolder::GetAclFlags(PRUint32 *aclFlags)
 {
   NS_ENSURE_ARG_POINTER(aclFlags);
   nsresult rv;
-  ReadDBFolderInfo(PR_FALSE); // update cache first.
+  ReadDBFolderInfo(false); // update cache first.
   if (m_aclFlags == -1) // -1 means invalid value, so get it from db.
   {
     nsCOMPtr<nsIDBFolderInfo> dbFolderInfo;
     bool dbWasOpen = (mDatabase != nsnull);
     rv = GetDatabase();
 
     if (mDatabase)
     {
@@ -6100,17 +6100,17 @@ NS_IMETHODIMP nsImapMailFolder::GetAclFl
         rv = dbFolderInfo->GetUint32Property("aclFlags", 0, aclFlags);
         m_aclFlags = *aclFlags;
       }
       // if getting the acl flags caused us to open the db, release the ref
       // because on startup, we might get acl on all folders,which will
       // leave a lot of db's open.
       if (!dbWasOpen)
       {
-        mDatabase->Close(PR_TRUE /* commit changes */);
+        mDatabase->Close(true /* commit changes */);
         mDatabase = nsnull;
       }
     }
   }
   else
     *aclFlags = m_aclFlags;
   return NS_OK;
 }
@@ -6131,17 +6131,17 @@ nsresult nsImapMailFolder::SetSupportedU
 }
 
 nsresult nsImapMailFolder::GetSupportedUserFlags(PRUint32 *userFlags)
 {
   NS_ENSURE_ARG_POINTER(userFlags);
 
   nsresult rv = NS_OK;
 
-  ReadDBFolderInfo(PR_FALSE); // update cache first.
+  ReadDBFolderInfo(false); // update cache first.
   if (m_supportedUserFlags == 0) // 0 means invalid value, so get it from db.
   {
     nsCOMPtr<nsIDBFolderInfo> dbFolderInfo;
     rv = GetDatabase();
 
     if (mDatabase)
     {
       rv = mDatabase->GetDBFolderInfo(getter_AddRefs(dbFolderInfo));
@@ -6157,17 +6157,17 @@ nsresult nsImapMailFolder::GetSupportedU
   return rv;
 }
 
 NS_IMETHODIMP nsImapMailFolder::GetCanOpenFolder(bool *aBool)
 {
   NS_ENSURE_ARG_POINTER(aBool);
   bool noSelect;
   GetFlag(nsMsgFolderFlags::ImapNoselect, &noSelect);
-  *aBool = (noSelect) ? PR_FALSE : GetFolderACL()->GetCanIReadFolder();
+  *aBool = (noSelect) ? false : GetFolderACL()->GetCanIReadFolder();
   return NS_OK;
 }
 
 ///////// nsMsgIMAPFolderACL class ///////////////////////////////
 
 // This string is defined in the ACL RFC to be "anyone"
 #define IMAP_ACL_ANYONE_STRING "anyone"
 
@@ -6417,122 +6417,122 @@ bool nsMsgIMAPFolderACL::GetFlagSetInRig
       return (anyoneFlags.FindChar(flag) != kNotFound);
   }
   else
     return (flags.FindChar(flag) != kNotFound);
 }
 
 bool nsMsgIMAPFolderACL::GetCanUserLookupFolder(const nsACString& userName)
 {
-  return GetFlagSetInRightsForUser(userName, 'l', PR_FALSE);
+  return GetFlagSetInRightsForUser(userName, 'l', false);
 }
 
 bool nsMsgIMAPFolderACL::GetCanUserReadFolder(const nsACString& userName)
 {
-  return GetFlagSetInRightsForUser(userName, 'r', PR_FALSE);
+  return GetFlagSetInRightsForUser(userName, 'r', false);
 }
 
 bool nsMsgIMAPFolderACL::GetCanUserStoreSeenInFolder(const nsACString& userName)
 {
-  return GetFlagSetInRightsForUser(userName, 's', PR_FALSE);
+  return GetFlagSetInRightsForUser(userName, 's', false);
 }
 
 bool nsMsgIMAPFolderACL::GetCanUserWriteFolder(const nsACString& userName)
 {
-  return GetFlagSetInRightsForUser(userName, 'w', PR_FALSE);
+  return GetFlagSetInRightsForUser(userName, 'w', false);
 }
 
 bool nsMsgIMAPFolderACL::GetCanUserInsertInFolder(const nsACString& userName)
 {
-  return GetFlagSetInRightsForUser(userName, 'i', PR_FALSE);
+  return GetFlagSetInRightsForUser(userName, 'i', false);
 }
 
 bool nsMsgIMAPFolderACL::GetCanUserPostToFolder(const nsACString& userName)
 {
-  return GetFlagSetInRightsForUser(userName, 'p', PR_FALSE);
+  return GetFlagSetInRightsForUser(userName, 'p', false);
 }
 
 bool nsMsgIMAPFolderACL::GetCanUserCreateSubfolder(const nsACString& userName)
 {
-  return GetFlagSetInRightsForUser(userName, 'c', PR_FALSE);
+  return GetFlagSetInRightsForUser(userName, 'c', false);
 }
 
 bool nsMsgIMAPFolderACL::GetCanUserDeleteInFolder(const nsACString& userName)
 {
-  return GetFlagSetInRightsForUser(userName, 'd', PR_FALSE)
-    || GetFlagSetInRightsForUser(userName, 't', PR_FALSE);
+  return GetFlagSetInRightsForUser(userName, 'd', false)
+    || GetFlagSetInRightsForUser(userName, 't', false);
 }
 
 bool nsMsgIMAPFolderACL::GetCanUserAdministerFolder(const nsACString& userName)
 {
-  return GetFlagSetInRightsForUser(userName, 'a', PR_FALSE);
+  return GetFlagSetInRightsForUser(userName, 'a', false);
 }
 
 bool nsMsgIMAPFolderACL::GetCanILookupFolder()
 {
-  return GetFlagSetInRightsForUser(EmptyCString(), 'l', PR_TRUE);
+  return GetFlagSetInRightsForUser(EmptyCString(), 'l', true);
 }
 
 bool nsMsgIMAPFolderACL::GetCanIReadFolder()
 {
-  return GetFlagSetInRightsForUser(EmptyCString(), 'r', PR_TRUE);
+  return GetFlagSetInRightsForUser(EmptyCString(), 'r', true);
 }
 
 bool nsMsgIMAPFolderACL::GetCanIStoreSeenInFolder()
 {
-  return GetFlagSetInRightsForUser(EmptyCString(), 's', PR_TRUE);
+  return GetFlagSetInRightsForUser(EmptyCString(), 's', true);
 }
 
 bool nsMsgIMAPFolderACL::GetCanIWriteFolder()
 {
-  return GetFlagSetInRightsForUser(EmptyCString(), 'w', PR_TRUE);
+  return GetFlagSetInRightsForUser(EmptyCString(), 'w', true);
 }
 
 bool nsMsgIMAPFolderACL::GetCanIInsertInFolder()
 {
-  return GetFlagSetInRightsForUser(EmptyCString(), 'i', PR_TRUE);
+  return GetFlagSetInRightsForUser(EmptyCString(), 'i', true);
 }
 
 bool nsMsgIMAPFolderACL::GetCanIPostToFolder()
 {
-  return GetFlagSetInRightsForUser(EmptyCString(), 'p', PR_TRUE);
+  return GetFlagSetInRightsForUser(EmptyCString(), 'p', true);
 }
 
 bool nsMsgIMAPFolderACL::GetCanICreateSubfolder()
 {
-  return GetFlagSetInRightsForUser(EmptyCString(), 'c', PR_TRUE);
+  return GetFlagSetInRightsForUser(EmptyCString(), 'c', true);
 }
 
 bool nsMsgIMAPFolderACL::GetCanIDeleteInFolder()
 {
-  return GetFlagSetInRightsForUser(EmptyCString(), 'd', PR_TRUE) ||
-    GetFlagSetInRightsForUser(EmptyCString(), 't', PR_TRUE);
+  return GetFlagSetInRightsForUser(EmptyCString(), 'd', true) ||
+    GetFlagSetInRightsForUser(EmptyCString(), 't', true);
 }
 
 bool nsMsgIMAPFolderACL::GetCanIAdministerFolder()
 {
-  return GetFlagSetInRightsForUser(EmptyCString(), 'a', PR_TRUE);
+  return GetFlagSetInRightsForUser(EmptyCString(), 'a', true);
 }
 
 bool nsMsgIMAPFolderACL::GetCanIExpungeFolder()
 {
-  return GetFlagSetInRightsForUser(EmptyCString(), 'e', PR_TRUE) ||
-    GetFlagSetInRightsForUser(EmptyCString(), 'd', PR_TRUE);
+  return GetFlagSetInRightsForUser(EmptyCString(), 'e', true) ||
+    GetFlagSetInRightsForUser(EmptyCString(), 'd', true);
 }
 
 // We use this to see if the ACLs think a folder is shared or not.
 // We will define "Shared" in 5.0 to mean:
 // At least one user other than the currently authenticated user has at least one
 // explicitly-listed ACL right on that folder.
 bool nsMsgIMAPFolderACL::GetIsFolderShared()
 {
   // If we have more than one ACL count for this folder, which means that someone
   // other than ourself has rights on it, then it is "shared."
   if (m_aclCount > 1)
-    return PR_TRUE;
+    return true;
 
   // Or, if "anyone" has rights to it, it is shared.
   nsCString anyonesRights;
   m_rightsHash.Get(NS_LITERAL_CSTRING(IMAP_ACL_ANYONE_STRING), &anyonesRights);
   return (!anyonesRights.IsEmpty());
 }
 
 bool nsMsgIMAPFolderACL::GetDoIHaveFullRightsForFolder()
@@ -6776,17 +6776,17 @@ nsImapMailFolder::CopyNextStreamMessage(
         notifier->NotifyMsgsMoveCopyCompleted(mailCopyState->m_isMove, mailCopyState->m_messages, this, nsnull);
     }
     if (mailCopyState->m_isMove)
     {
       nsCOMPtr<nsIMsgFolder> srcFolder(do_QueryInterface(mailCopyState->m_srcSupport, &rv));
       if (NS_SUCCEEDED(rv) && srcFolder)
       {
         srcFolder->DeleteMessages(mailCopyState->m_messages, nsnull,
-          PR_TRUE, PR_TRUE, nsnull, PR_FALSE);
+          true, true, nsnull, false);
         // we want to send this notification after the source messages have
         // been deleted.
         nsCOMPtr<nsIMsgLocalMailFolder> popFolder(do_QueryInterface(srcFolder));
         if (popFolder)   //needed if move pop->imap to notify FE
           srcFolder->NotifyFolderEvent(mDeleteOrMoveMsgCompletedAtom);
       }
     }
   }
@@ -6805,23 +6805,23 @@ nsImapMailFolder::SetUrlState(nsIImapPro
 {
   // If we have no path, then the folder has been shutdown, and there's
   // no point in doing anything...
   if (!mPath)
     return NS_OK;
   if (!isRunning)
   {
     ProgressStatus(aProtocol, IMAP_DONE, nsnull);
-    m_urlRunning = PR_FALSE;
+    m_urlRunning = false;
     // if no protocol, then we're reading from the mem or disk cache
     // and we don't want to end the offline download just yet.
     if (aProtocol)
     {
       EndOfflineDownload();
-        m_downloadingFolderForOfflineUse = PR_FALSE;
+        m_downloadingFolderForOfflineUse = false;
       }
     nsCOMPtr<nsIImapUrl> imapUrl(do_QueryInterface(aUrl));
     if (imapUrl)
     {
       nsImapAction imapAction;
       imapUrl->GetImapAction(&imapAction);
       // if the server doesn't support copyUID, then SetCopyResponseUid won't
       // get called, so we need to clear m_pendingOfflineMoves when the online
@@ -6845,34 +6845,34 @@ nsImapMailFolder::CopyMessagesWithStream
                                 nsIMsgCopyServiceListener* listener,
                                 bool allowUndo)
 {
   NS_ENSURE_ARG_POINTER(srcFolder);
   NS_ENSURE_ARG_POINTER(messages);
   nsresult rv;
   nsCOMPtr<nsISupports> aSupport(do_QueryInterface(srcFolder, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
-  rv = InitCopyState(aSupport, messages, isMove, PR_FALSE, isCrossServerOp,
+  rv = InitCopyState(aSupport, messages, isMove, false, isCrossServerOp,
                     0, EmptyCString(), listener, msgWindow, allowUndo);
   if(NS_FAILED(rv))
     return rv;
 
-  m_copyState->m_streamCopy = PR_TRUE;
+  m_copyState->m_streamCopy = true;
 
   // ** jt - needs to create server to server move/copy undo msg txn
   if (m_copyState->m_allowUndo)
   {
     nsCAutoString messageIds;
     nsTArray<nsMsgKey> srcKeyArray;
     rv = BuildIdsAndKeyArray(messages, messageIds, srcKeyArray);
 
     nsRefPtr<nsImapMoveCopyMsgTxn> undoMsgTxn = new nsImapMoveCopyMsgTxn;
 
     if (!undoMsgTxn || NS_FAILED(undoMsgTxn->Init(srcFolder, &srcKeyArray, messageIds.get(), this,
-                                PR_TRUE, isMove, m_thread)))
+                                true, isMove, m_thread)))
       return NS_ERROR_OUT_OF_MEMORY;
 
     if (isMove)
     {
       if (mFlags & nsMsgFolderFlags::Trash)
         undoMsgTxn->SetTransactionType(nsIMessenger::eDeleteMsg);
       else
         undoMsgTxn->SetTransactionType(nsIMessenger::eMoveMsg);
@@ -6911,17 +6911,17 @@ nsresult nsImapMailFolder::GetClearedOri
       if (sourceFolder)
       {
         nsCOMPtr <nsIDBFolderInfo> folderInfo;
         sourceFolder->GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), originalDB);
         if (*originalDB)
         {
           nsMsgKey originalKey;
           op->GetMessageKey(&originalKey);
-          rv = (*originalDB)->GetOfflineOpForKey(originalKey, PR_FALSE, getter_AddRefs(returnOp));
+          rv = (*originalDB)->GetOfflineOpForKey(originalKey, false, getter_AddRefs(returnOp));
           if (NS_SUCCEEDED(rv) && returnOp)
           {
             nsCString moveDestination;
             nsCString thisFolderURI;
             GetURI(thisFolderURI);
             returnOp->GetDestinationFolderURI(getter_Copies(moveDestination));
             if (moveDestination.Equals(thisFolderURI))
               returnOp->ClearOperation(nsIMsgOfflineImapOperation::kMoveResult);
@@ -6951,17 +6951,17 @@ nsresult nsImapMailFolder::GetOriginalOp
     nsCOMPtr<nsIMsgFolder> sourceFolder(do_QueryInterface(res, &rv));
     NS_ENSURE_SUCCESS(rv, rv);
     nsCOMPtr <nsIDBFolderInfo> folderInfo;
     sourceFolder->GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), originalDB);
     if (*originalDB)
     {
       nsMsgKey originalKey;
       op->GetMessageKey(&originalKey);
-      rv = (*originalDB)->GetOfflineOpForKey(originalKey, PR_FALSE, getter_AddRefs(returnOp));
+      rv = (*originalDB)->GetOfflineOpForKey(originalKey, false, getter_AddRefs(returnOp));
     }
   }
   returnOp.swap(*originalOp);
   return rv;
 }
 
 nsresult nsImapMailFolder::CopyOfflineMsgBody(nsIMsgFolder *srcFolder,
                                               nsIMsgDBHdr *destHdr,
@@ -7137,17 +7137,17 @@ nsresult nsImapMailFolder::CopyMessagesO
         {
           NS_ERROR("bad msg in src array");
           continue;
         }
         nsMsgKey msgKey;
         message->GetMessageKey(&msgKey);
         messageId.AppendInt(msgKey);
         nsCOMPtr <nsIMsgOfflineImapOperation> sourceOp;
-        rv = sourceMailDB->GetOfflineOpForKey(originalKey, PR_TRUE, getter_AddRefs(sourceOp));
+        rv = sourceMailDB->GetOfflineOpForKey(originalKey, true, getter_AddRefs(sourceOp));
         if (NS_SUCCEEDED(rv) && sourceOp)
         {
           srcFolder->SetFlag(nsMsgFolderFlags::OfflineEvents);
           nsCOMPtr <nsIMsgDatabase> originalDB;
           nsOfflineImapOperationType opType;
           sourceOp->GetOperation(&opType);
           // if we already have an offline op for this key, then we need to see if it was
           // moved into the source folder while offline
@@ -7163,17 +7163,17 @@ nsresult nsImapMailFolder::CopyMessagesO
               srcFolder->GetURI(srcFolderURI);
               sourceOp->GetSourceFolderURI(getter_Copies(originalSrcFolderURI));
               sourceOp->GetMessageKey(&originalKey);
               if (isMove)
                 sourceMailDB->RemoveOfflineOp(sourceOp);
               sourceOp = originalOp;
               if (originalSrcFolderURI.Equals(srcFolderURI))
               {
-                messageReturningHome = PR_TRUE;
+                messageReturningHome = true;
                 originalDB->RemoveOfflineOp(originalOp);
               }
             }
           }
           if (!messageReturningHome)
           {
             nsCString folderURI;
             GetURI(folderURI);
@@ -7235,28 +7235,28 @@ nsresult nsImapMailFolder::CopyMessagesO
         if (NS_SUCCEEDED(rv) && mailHdr)
         {
           bool successfulCopy = false;
           nsMsgKey srcDBhighWaterMark;
           srcDbFolderInfo->GetHighWater(&srcDBhighWaterMark);
 
           nsCOMPtr <nsIMsgDBHdr> newMailHdr;
           rv = mDatabase->CopyHdrFromExistingHdr(fakeBase + sourceKeyIndex, mailHdr,
-            PR_TRUE, getter_AddRefs(newMailHdr));
+            true, getter_AddRefs(newMailHdr));
           if (!newMailHdr || NS_FAILED(rv))
           {
-            NS_ASSERTION(PR_FALSE, "failed to copy hdr");
+            NS_ASSERTION(false, "failed to copy hdr");
             stopit = rv;
           }
 
           if (NS_SUCCEEDED(stopit))
           {
             bool hasMsgOffline = false;
 
-            destMsgHdrs->AppendElement(newMailHdr, PR_FALSE);
+            destMsgHdrs->AppendElement(newMailHdr, false);
             srcFolder->HasMsgOffline(originalKey, &hasMsgOffline);
             newMailHdr->SetUint32Property("pseudoHdr", 1);
 
             if (inputStream && hasMsgOffline && !isLocked)
             {
               rv = GetOfflineStoreOutputStream(newMailHdr,
                                                getter_AddRefs(outputStream));
               NS_ENSURE_SUCCESS(rv, rv);
@@ -7264,20 +7264,20 @@ nsresult nsImapMailFolder::CopyMessagesO
               CopyOfflineMsgBody(srcFolder, newMailHdr, mailHdr, inputStream,
                                  outputStream);
               nsCOMPtr<nsIMsgPluggableStore> offlineStore;
               (void) GetMsgStore(getter_AddRefs(offlineStore));
               if (offlineStore)
                 offlineStore->FinishNewMessage(outputStream, newMailHdr);
             }
             else
-              mDatabase->MarkOffline(fakeBase + sourceKeyIndex, PR_FALSE, nsnull);
+              mDatabase->MarkOffline(fakeBase + sourceKeyIndex, false, nsnull);
 
             nsCOMPtr <nsIMsgOfflineImapOperation> destOp;
-            mDatabase->GetOfflineOpForKey(fakeBase + sourceKeyIndex, PR_TRUE, getter_AddRefs(destOp));
+            mDatabase->GetOfflineOpForKey(fakeBase + sourceKeyIndex, true, getter_AddRefs(destOp));
             if (destOp)
             {
               // check if this is a move back to the original mailbox, in which case
               // we just delete the offline operation.
               if (messageReturningHome)
                 mDatabase->RemoveOfflineOp(destOp);
               else
               {
@@ -7324,21 +7324,21 @@ nsresult nsImapMailFolder::CopyMessagesO
               else
                 undoMsgTxn->SetTransactionType(nsIMessenger::eCopyMsg);
               if (txnMgr)
                  txnMgr->DoTransaction(undoMsgTxn);
             }
             if (deleteToTrash || deleteImmediately)
               keysToDelete.AppendElement(msgKey);
             else
-              sourceMailDB->MarkImapDeleted(msgKey, PR_TRUE, nsnull); // offline delete
+              sourceMailDB->MarkImapDeleted(msgKey, true, nsnull); // offline delete
           }
           if (successfulCopy)
             // This is for both moves and copies
-            msgHdrsCopied->AppendElement(mailHdr, PR_FALSE);
+            msgHdrsCopied->AppendElement(mailHdr, false);
         }
       }
       if (outputStream)
         outputStream->Close();
 
       if (isMove)
         sourceMailDB->Commit(nsMsgDBCommitType::kLargeCommit);
       mDatabase->Commit(nsMsgDBCommitType::kLargeCommit);
@@ -7577,45 +7577,45 @@ nsImapMailFolder::CopyMessages(nsIMsgFol
     
     nsCOMPtr<nsIImapService> imapService = do_GetService(NS_IMAPSERVICE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv,rv);
     
     SetPendingAttributes(messages, isMove);
     // if the folders aren't on the same server, do a stream base copy
     if (!sameServer)
     {
-      rv = CopyMessagesWithStream(srcFolder, messages, isMove, PR_TRUE, msgWindow, listener, allowUndo);
+      rv = CopyMessagesWithStream(srcFolder, messages, isMove, true, msgWindow, listener, allowUndo);
       goto done;
     }
 
     rv = BuildIdsAndKeyArray(messages, messageIds, srcKeyArray);
     if(NS_FAILED(rv)) goto done;
 
     rv = QueryInterface(NS_GET_IID(nsIUrlListener), getter_AddRefs(urlListener));
-    rv = InitCopyState(srcSupport, messages, isMove, PR_TRUE, PR_FALSE,
+    rv = InitCopyState(srcSupport, messages, isMove, true, false,
                        0, EmptyCString(), listener, msgWindow, allowUndo);
     if (NS_FAILED(rv)) goto done;
 
     m_copyState->m_curIndex = m_copyState->m_totalCount;
 
     if (isMove)
-      srcFolder->EnableNotifications(allMessageCountNotifications, PR_FALSE, PR_TRUE/* dbBatching*/);  //disable message count notification
+      srcFolder->EnableNotifications(allMessageCountNotifications, false, true/* dbBatching*/);  //disable message count notification
 
     copySupport = do_QueryInterface(m_copyState);
     rv = imapService->OnlineMessageCopy(m_thread,
                                         srcFolder, messageIds,
-                                        this, PR_TRUE, isMove,
+                                        this, true, isMove,
                                         urlListener, nsnull,
                                         copySupport, msgWindow);
     if (NS_SUCCEEDED(rv) && m_copyState->m_allowUndo)
     {
       nsRefPtr<nsImapMoveCopyMsgTxn> undoMsgTxn = new nsImapMoveCopyMsgTxn;
       if (!undoMsgTxn || NS_FAILED(undoMsgTxn->Init(srcFolder, &srcKeyArray,
                                    messageIds.get(), this,
-                                   PR_TRUE, isMove, m_thread)))
+                                   true, isMove, m_thread)))
         return NS_ERROR_OUT_OF_MEMORY;
 
       if (isMove)
       {
         if (mFlags & nsMsgFolderFlags::Trash)
           undoMsgTxn->SetTransactionType(nsIMessenger::eDeleteMsg);
         else
           undoMsgTxn->SetTransactionType(nsIMessenger::eMoveMsg);
@@ -7625,20 +7625,20 @@ nsImapMailFolder::CopyMessages(nsIMsgFol
       m_copyState->m_undoMsgTxn = undoMsgTxn;
     }
 
   }//endif
   
 done:
   if (NS_FAILED(rv))
   {
-    (void) OnCopyCompleted(srcSupport, PR_FALSE);
+    (void) OnCopyCompleted(srcSupport, false);
     if (isMove)
     {
-      srcFolder->EnableNotifications(allMessageCountNotifications, PR_TRUE, PR_TRUE/* dbBatching*/);  //enable message count notification
+      srcFolder->EnableNotifications(allMessageCountNotifications, true, true/* dbBatching*/);  //enable message count notification
       NotifyFolderEvent(mDeleteOrMoveMsgFailedAtom);
     }
   }
   return rv;
 }
 
 class nsImapFolderCopyState : public nsIUrlListener, public nsIMsgCopyServiceListener
 {
@@ -7800,28 +7800,28 @@ nsImapFolderCopyState::OnStopRunningUrl(
             messages->HasMoreElements(&hasMoreElements);
 
           if (!hasMoreElements)
             return AdvanceToNextFolder(NS_OK);
 
           while (hasMoreElements && NS_SUCCEEDED(rv))
           {
             rv = messages->GetNext(getter_AddRefs(aSupport));
-            rv = msgArray->AppendElement(aSupport, PR_FALSE);
+            rv = msgArray->AppendElement(aSupport, false);
             messages->HasMoreElements(&hasMoreElements);
           }
 
           nsCOMPtr<nsIMsgCopyService> copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv);
           NS_ENSURE_SUCCESS(rv, rv);
           rv = copyService->CopyMessages(m_curSrcFolder,
                              msgArray, newMsgFolder,
                              m_isMoveFolder,
                              this,
                              m_msgWindow,
-                             PR_FALSE /* allowUndo */);
+                             false /* allowUndo */);
         }
         break;
       }
     }
   }
   return rv;
 }
 
@@ -7931,56 +7931,56 @@ nsImapMailFolder::CopyFolder(nsIMsgFolde
       NotifyItemAdded(newMsgFolder);
 
       // now remove the old folder
       nsCOMPtr<nsIMsgFolder> msgParent;
       srcFolder->GetParent(getter_AddRefs(msgParent));
       srcFolder->SetParent(nsnull);
       if (msgParent)
       {
-        msgParent->PropagateDelete(srcFolder, PR_FALSE, msgWindow);  // The files have already been moved, so delete storage PR_FALSE
-        oldPathFile->Remove(PR_FALSE);  //berkeley mailbox
+        msgParent->PropagateDelete(srcFolder, false, msgWindow);  // The files have already been moved, so delete storage false
+        oldPathFile->Remove(false);  //berkeley mailbox
         nsCOMPtr <nsIMsgDatabase> srcDB; // we need to force closed the source db
         srcFolder->Delete();
 
         nsCOMPtr<nsILocalFile> parentPathFile;
         rv = msgParent->GetFilePath(getter_AddRefs(parentPathFile));
         NS_ENSURE_SUCCESS(rv,rv);
 
         AddDirectorySeparator(parentPathFile);
         nsCOMPtr <nsISimpleEnumerator> children;
         parentPathFile->GetDirectoryEntries(getter_AddRefs(children));
         bool more;
         // checks if the directory is empty or not
         if (children && NS_SUCCEEDED(children->HasMoreElements(&more)) && !more)
-          parentPathFile->Remove(PR_TRUE);
+          parentPathFile->Remove(true);
       }
     }
     else // non-virtual folder
     {
       nsCOMPtr <nsIImapService> imapService = do_GetService (NS_IMAPSERVICE_CONTRACTID, &rv);
       NS_ENSURE_SUCCESS(rv, rv);
       nsCOMPtr<nsISupports> srcSupport = do_QueryInterface(srcFolder);
       bool match = false;
       bool confirmed = false;
       if (mFlags & nsMsgFolderFlags::Trash)
       {
-        rv = srcFolder->MatchOrChangeFilterDestination(nsnull, PR_FALSE, &match);
+        rv = srcFolder->MatchOrChangeFilterDestination(nsnull, false, &match);
         if (match)
         {
           srcFolder->ConfirmFolderDeletionForFilter(msgWindow, &confirmed);
           // should we return an error to copy service?
           // or send a notification?
           if (!confirmed)
             return NS_OK;
         }
       }
-      rv = InitCopyState(srcSupport, nsnull, PR_FALSE, nsnull,
-                         PR_FALSE, 0, EmptyCString(), listener, 
-                         msgWindow, PR_FALSE);
+      rv = InitCopyState(srcSupport, nsnull, false, nsnull,
+                         false, 0, EmptyCString(), listener, 
+                         msgWindow, false);
       if (NS_FAILED(rv))
         return OnCopyCompleted(srcSupport, rv);
 
       rv = imapService->MoveFolder(m_thread,
                                    srcFolder,
                                    this,
                                    this,
                                    msgWindow,
@@ -8028,42 +8028,42 @@ nsImapMailFolder::CopyFileMessage(nsIFil
         {
           messageId.AppendInt((PRInt32) key);
           // Perhaps we have the message offline, but even if we do it is
           // not valid, since the only time we do a file copy for an
           // existing message is when we are changing the message.
           // So set the offline size to 0 to force SetPendingAttributes to
           // clear the offline message flag.
           msgToReplace->SetOfflineMessageSize(0);
-          messages->AppendElement(msgToReplace, PR_FALSE);
-          SetPendingAttributes(messages, PR_FALSE);
+          messages->AppendElement(msgToReplace, false);
+          SetPendingAttributes(messages, false);
         }
     }
 
     bool isMove = (msgToReplace ? true : false);
     rv = InitCopyState(srcSupport, messages, isMove, isDraftOrTemplate,
-                       PR_FALSE, aNewMsgFlags, aNewMsgKeywords, listener, 
-                       msgWindow, PR_FALSE);
+                       false, aNewMsgFlags, aNewMsgKeywords, listener, 
+                       msgWindow, false);
     if (NS_FAILED(rv))
       return OnCopyCompleted(srcSupport, rv);
 
-    m_copyState->m_streamCopy = PR_TRUE;
+    m_copyState->m_streamCopy = true;
     nsCOMPtr<nsISupports> copySupport;
     if( m_copyState )
       copySupport = do_QueryInterface(m_copyState);
     if (!isDraftOrTemplate)
     {
       m_copyState->m_totalCount = 1;
       // This makes the IMAP APPEND set the INTERNALDATE for the msg copy
       // we make when detaching/deleting attachments to the original msg date.
       m_copyState->m_message = msgToReplace;
     }
     rv = imapService->AppendMessageFromFile(m_thread, file, this,
                                             messageId,
-                                            PR_TRUE, isDraftOrTemplate,
+                                            true, isDraftOrTemplate,
                                             urlListener, nsnull,
                                             copySupport,
                                             msgWindow);
     if (NS_FAILED(rv))
       return OnCopyCompleted(srcSupport, rv);
 
     return rv;
 }
@@ -8143,38 +8143,38 @@ nsImapMailFolder::CopyStreamMessage(nsIM
                                                 isMove && !m_copyState->m_isCrossServerOp, nsnull, aMsgWindow, nsnull);
     if (NS_FAILED(rv))
       PR_LOG(IMAP, PR_LOG_ALWAYS, ("CopyMessage failed: uri %s\n", uri.get()));
   } 
   return rv;
 }
 
 nsImapMailCopyState::nsImapMailCopyState() :
-    m_isMove(PR_FALSE), m_selectedState(PR_FALSE),
-    m_isCrossServerOp(PR_FALSE), m_curIndex(0),
-    m_totalCount(0), m_streamCopy(PR_FALSE), m_dataBuffer(nsnull),
-    m_dataBufferSize(0), m_leftOver(0), m_allowUndo(PR_FALSE),
-    m_eatLF(PR_FALSE), m_newMsgFlags(0), m_appendUID(nsMsgKey_None)
+    m_isMove(false), m_selectedState(false),
+    m_isCrossServerOp(false), m_curIndex(0),
+    m_totalCount(0), m_streamCopy(false), m_dataBuffer(nsnull),
+    m_dataBufferSize(0), m_leftOver(0), m_allowUndo(false),
+    m_eatLF(false), m_newMsgFlags(0), m_appendUID(nsMsgKey_None)
 {
 }
 
 nsImapMailCopyState::~nsImapMailCopyState()
 {
   PR_Free(m_dataBuffer);
   if (m_msgService && m_message)
   {
     nsCOMPtr <nsIMsgFolder> srcFolder = do_QueryInterface(m_srcSupport);
     if (srcFolder)
     {
       nsCString uri;
       srcFolder->GetUriForMsg(m_message, uri);
     }
   }
   if (m_tmpFile)
-    m_tmpFile->Remove(PR_FALSE);
+    m_tmpFile->Remove(false);
 }
 
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsImapMailCopyState, nsImapMailCopyState)
 
 nsresult
 nsImapMailFolder::InitCopyState(nsISupports* srcSupport,
                                 nsIArray* messages,
@@ -8258,17 +8258,17 @@ nsImapMailFolder::CopyFileToOfflineStore
 
   if (mDatabase)
   {
     if (msgKey == nsMsgKey_None)
       mDatabase->GetNextFakeOfflineMsgKey(&msgKey);
     nsCOMPtr<nsIMutableArray> messages(do_CreateInstance(NS_ARRAY_CONTRACTID));
 
     nsCOMPtr<nsIMsgOfflineImapOperation> op;
-    rv = mDatabase->GetOfflineOpForKey(msgKey, PR_TRUE, getter_AddRefs(op));
+    rv = mDatabase->GetOfflineOpForKey(msgKey, true, getter_AddRefs(op));
     if (NS_SUCCEEDED(rv) && op)
     {
       nsCString destFolderUri;
       GetURI(destFolderUri);
       op->SetOperation(nsIMsgOfflineImapOperation::kMoveResult);
       op->SetDestinationFolderURI(destFolderUri.get());
       nsCOMPtr<nsIMsgDBHdr> fakeHdr;
       nsCOMPtr<nsIOutputStream> offlineStore;
@@ -8295,17 +8295,17 @@ nsImapMailFolder::CopyFileToOfflineStore
         msgParser->SetMailDB(mDatabase);
 
         rv = NS_NewLocalFileInputStream(getter_AddRefs(inputStream), srcFile);
         if (NS_SUCCEEDED(rv) && inputStream)
         {
           // now, copy the temp file to the offline store for the cur folder.
           PRInt32 inputBufferSize = 10240;
           nsMsgLineStreamBuffer *inputStreamBuffer =
-            new nsMsgLineStreamBuffer(inputBufferSize, PR_TRUE, PR_FALSE);
+            new nsMsgLineStreamBuffer(inputBufferSize, true, false);
           PRInt64 fileSize;
           srcFile->GetFileSize(&fileSize);
           PRUint32 bytesWritten;
           rv = NS_OK;
           msgParser->SetState(nsIMsgParseMailMsgState::ParseHeadersState);
           msgParser->SetNewMsgHdr(fakeHdr);
           bool needMoreData = false;
           char * newLine = nsnull;
@@ -8501,17 +8501,17 @@ NS_IMETHODIMP nsImapMailFolder::ResetNam
   GetOnlineName(onlineName);
   char hierarchyDelimiter;
   GetHierarchyDelimiter(&hierarchyDelimiter);
   m_namespace = nsIMAPNamespaceList::GetNamespaceForFolder(serverKey.get(),
                                                            onlineName.get(),
                                                            hierarchyDelimiter);
   m_folderIsNamespace = m_namespace ? nsIMAPNamespaceList::GetFolderIsNamespace(
                                         serverKey.get(), onlineName.get(),
-                                        hierarchyDelimiter, m_namespace) : PR_FALSE;
+                                        hierarchyDelimiter, m_namespace) : false;
 
   nsCOMPtr<nsISimpleEnumerator> enumerator;
   GetSubFolders(getter_AddRefs(enumerator));
   if (!enumerator)
     return NS_OK;
 
   nsresult rv;
   bool hasMore;
@@ -8590,17 +8590,17 @@ NS_IMETHODIMP nsImapMailFolder::SetFolde
   m_folderQuotaCommandIssued = aCmdIssued;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapMailFolder::SetFolderQuotaData(const nsACString &aFolderQuotaRoot,
                                                    PRUint32 aFolderQuotaUsedKB,
                                                     PRUint32 aFolderQuotaMaxKB)
 {
-  m_folderQuotaDataIsValid = PR_TRUE;
+  m_folderQuotaDataIsValid = true;
   m_folderQuotaRoot = aFolderQuotaRoot;
   m_folderQuotaUsedKB = aFolderQuotaUsedKB;
   m_folderQuotaMaxKB = aFolderQuotaMaxKB;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapMailFolder::GetQuota(bool* aValid,
                                          PRUint32* aUsed, PRUint32* aMax)
@@ -8676,17 +8676,17 @@ NS_IMETHODIMP nsImapMailFolder::RenameCl
   nsCOMPtr<nsIMsgDatabase> unusedDB;
   nsCOMPtr <nsILocalFile> dbFile;
 
   // warning, path will be changed
   rv = CreateFileForDB(newLeafName, pathFile, getter_AddRefs(dbFile));
   NS_ENSURE_SUCCESS(rv,rv);
 
   // Use openMailDBFromFile() and not OpenFolderDB() here, since we don't use the DB.
-  rv = msgDBService->OpenMailDBFromFile(dbFile, nsnull, PR_TRUE, PR_TRUE,
+  rv = msgDBService->OpenMailDBFromFile(dbFile, nsnull, true, true,
                                         getter_AddRefs(unusedDB));
   if (NS_SUCCEEDED(rv) && unusedDB)
   {
     //need to set the folder name
     nsCOMPtr <nsIDBFolderInfo> folderInfo;
     rv = unusedDB->GetDBFolderInfo(getter_AddRefs(folderInfo));
 
     //Now let's create the actual new folder
@@ -8699,59 +8699,59 @@ NS_IMETHODIMP nsImapMailFolder::RenameCl
     {
       nsCAutoString onlineName(m_onlineFolderName);
       nsCAutoString utf7LeafName;
 
       if (!onlineName.IsEmpty())
         onlineName.Append(hierarchyDelimiter);
       CopyUTF16toMUTF7(folderNameStr, utf7LeafName);
       onlineName.Append(utf7LeafName);
-      imapFolder->SetVerifiedAsOnlineFolder(PR_TRUE);
+      imapFolder->SetVerifiedAsOnlineFolder(true);
       imapFolder->SetOnlineName(onlineName);
       imapFolder->SetHierarchyDelimiter(hierarchyDelimiter);
       imapFolder->SetBoxFlags(boxflags);
       // store the online name as the mailbox name in the db folder info
       // I don't think anyone uses the mailbox name, so we'll use it
       // to restore the online name when blowing away an imap db.
       if (folderInfo)
       {
         nsAutoString unicodeOnlineName;
         CopyASCIItoUTF16(onlineName, unicodeOnlineName);
         folderInfo->SetMailboxName(unicodeOnlineName);
       }
       bool changed = false;
-      msgFolder->MatchOrChangeFilterDestination(child, PR_FALSE /*caseInsensitive*/, &changed);
+      msgFolder->MatchOrChangeFilterDestination(child, false /*caseInsensitive*/, &changed);
       if (changed)
         msgFolder->AlertFilterChanged(msgWindow);
     }
-    unusedDB->SetSummaryValid(PR_TRUE);
+    unusedDB->SetSummaryValid(true);
     unusedDB->Commit(nsMsgDBCommitType::kLargeCommit);
-    unusedDB->Close(PR_TRUE);
+    unusedDB->Close(true);
     child->RenameSubFolders(msgWindow, msgFolder);
     nsCOMPtr<nsIMsgFolder> msgParent;
     msgFolder->GetParent(getter_AddRefs(msgParent));
     msgFolder->SetParent(nsnull);
     if (msgParent)
-      msgParent->PropagateDelete(msgFolder, PR_TRUE, nsnull);
+      msgParent->PropagateDelete(msgFolder, true, nsnull);
 
     // Reset online status now that the folder is renamed.
     nsCOMPtr <nsIMsgImapMailFolder> oldImapFolder = do_QueryInterface(msgFolder);
     if (oldImapFolder)
-      oldImapFolder->SetVerifiedAsOnlineFolder(PR_FALSE);
+      oldImapFolder->SetVerifiedAsOnlineFolder(false);
     nsCOMPtr<nsIMsgFolderNotificationService> notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
     if (notifier)
       notifier->NotifyFolderRenamed(msgFolder, child);   
     NotifyItemAdded(child);
   }
   return rv;
 }
 
 NS_IMETHODIMP nsImapMailFolder::RenameSubFolders(nsIMsgWindow *msgWindow, nsIMsgFolder *oldFolder)
 {
-  m_initialized = PR_TRUE;
+  m_initialized = true;
   nsCOMPtr<nsISimpleEnumerator> enumerator;
   nsresult rv = oldFolder->GetSubFolders(getter_AddRefs(enumerator));
   NS_ENSURE_SUCCESS(rv, rv);
 
   bool hasMore;
   while (NS_SUCCEEDED(enumerator->HasMoreElements(&hasMore)) && hasMore)
   {
     nsCOMPtr<nsISupports> item;
@@ -8824,17 +8824,17 @@ NS_IMETHODIMP nsImapMailFolder::RenameSu
     if (imapFolder)
     {
      imapFolder->SetVerifiedAsOnlineFolder(verified);
      imapFolder->SetOnlineName(onlineCName);
      imapFolder->SetHierarchyDelimiter(hierarchyDelimiter);
      imapFolder->SetBoxFlags(boxflags);
 
      bool changed = false;
-     msgFolder->MatchOrChangeFilterDestination(child, PR_FALSE /*caseInsensitive*/, &changed);
+     msgFolder->MatchOrChangeFilterDestination(child, false /*caseInsensitive*/, &changed);
      if (changed)
        msgFolder->AlertFilterChanged(msgWindow);
      child->RenameSubFolders(msgWindow, msgFolder);
     }
   }
   return rv;
 }
 
@@ -8848,31 +8848,31 @@ NS_IMETHODIMP nsImapMailFolder::IsComman
                                  command.EqualsLiteral("button_delete")));
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapMailFolder::GetCanFileMessages(bool *aCanFileMessages)
 {
   nsresult rv;
-  *aCanFileMessages = PR_TRUE;
+  *aCanFileMessages = true;
 
   nsCOMPtr<nsIMsgIncomingServer> server;
   rv = GetServer(getter_AddRefs(server));
   if (NS_SUCCEEDED(rv) && server)
     rv = server->GetCanFileMessagesOnServer(aCanFileMessages);
 
   if (*aCanFileMessages)
     rv = nsMsgDBFolder::GetCanFileMessages(aCanFileMessages);
 
   if (*aCanFileMessages)
   {
     bool noSelect;
     GetFlag(nsMsgFolderFlags::ImapNoselect, &noSelect);
-    *aCanFileMessages = (noSelect) ? PR_FALSE : GetFolderACL()->GetCanIInsertInFolder();
+    *aCanFileMessages = (noSelect) ? false : GetFolderACL()->GetCanIInsertInFolder();
     return NS_OK;
   }
   return rv;
 }
 
 NS_IMETHODIMP
 nsImapMailFolder::GetCanDeleteMessages(bool *aCanDeleteMessages)
 {
@@ -8922,17 +8922,17 @@ nsImapMailFolder::StoreCustomKeywords(ns
   if (WeAreOffline())
   {
     GetDatabase();
     if (mDatabase)
     {
       for (PRUint32 keyIndex = 0; keyIndex < aNumKeys; keyIndex++)
       {
         nsCOMPtr <nsIMsgOfflineImapOperation> op;
-        rv = mDatabase->GetOfflineOpForKey(aKeysToStore[keyIndex], PR_TRUE, getter_AddRefs(op));
+        rv = mDatabase->GetOfflineOpForKey(aKeysToStore[keyIndex], true, getter_AddRefs(op));
         SetFlag(nsMsgFolderFlags::OfflineEvents);
         if (NS_SUCCEEDED(rv) && op)
         {
           if (!aFlagsToAdd.IsEmpty())
             op->AddKeywordToAdd(PromiseFlatCString(aFlagsToAdd).get());
           if (!aFlagsToSubtract.IsEmpty())
             op->AddKeywordToRemove(PromiseFlatCString(aFlagsToSubtract).get());
         }
@@ -9047,17 +9047,17 @@ nsImapMailFolder::OnMessageClassified(co
         (void)spamSettings->GetMarkAsReadOnSpam(&markAsReadOnSpam);
         if (markAsReadOnSpam)
         {
           if (!m_junkMessagesToMarkAsRead)
           {
             m_junkMessagesToMarkAsRead = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
             NS_ENSURE_SUCCESS(rv, rv);
           }
-          m_junkMessagesToMarkAsRead->AppendElement(msgHdr, PR_FALSE);
+          m_junkMessagesToMarkAsRead->AppendElement(msgHdr, false);
         }
 
         bool willMoveMessage = false;
 
         // don't do the move when we are opening up
         // the junk mail folder or the trash folder
         // or when manually classifying messages in those folders
         if (!(mFlags & nsMsgFolderFlags::Junk || mFlags & nsMsgFolderFlags::Trash))
@@ -9073,28 +9073,28 @@ nsImapMailFolder::OnMessageClassified(co
             if (!spamFolderURI.IsEmpty())
             {
               rv = GetExistingFolder(spamFolderURI, getter_AddRefs(mSpamFolder));
               if (NS_SUCCEEDED(rv) && mSpamFolder)
               {
                 rv = mSpamFolder->SetFlag(nsMsgFolderFlags::Junk);
                 NS_ENSURE_SUCCESS(rv,rv);
                 mSpamKeysToMove.AppendElement(msgKey);
-                willMoveMessage = PR_TRUE;
+                willMoveMessage = true;
               }
               else
               {
                 // XXX TODO
                 // JUNK MAIL RELATED
                 // the listener should do
                 // rv = folder->SetFlag(nsMsgFolderFlags::Junk);
                 // NS_ENSURE_SUCCESS(rv,rv);
                 // if (NS_SUCCEEDED(GetMoveCoalescer())) {
                 //   m_moveCoalescer->AddMove(folder, msgKey);
-                //   willMoveMessage = PR_TRUE;
+                //   willMoveMessage = true;
                 // }
                 rv = GetOrCreateFolder(spamFolderURI, nsnull /* aListener */);
                 NS_ASSERTION(NS_SUCCEEDED(rv), "GetOrCreateFolder failed");
               }
             }
           }
         }
         rv = spamSettings->LogJunkHit(msgHdr, willMoveMessage);
@@ -9148,28 +9148,28 @@ nsImapMailFolder::OnMessageClassified(co
     bool pendingMoves = m_moveCoalescer && m_moveCoalescer->HasPendingMoves();
     PlaybackCoalescedOperations();
     // If we are performing biff for this folder, tell the server object
     if ((!pendingMoves || !ShowPreviewText()) && m_performingBiff)
     {
       // we don't need to adjust the num new messages in this folder because
       // the playback moves code already did that.
       (void) PerformBiffNotifications();
-      server->SetPerformingBiff(PR_FALSE);
-      m_performingBiff = PR_FALSE;
+      server->SetPerformingBiff(false);
+      m_performingBiff = false;
     }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapMailFolder::GetShouldDownloadAllHeaders(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = PR_FALSE;
+  *aResult = false;
   //for just the inbox, we check if the filter list has arbitary headers.
   //for all folders, check if we have a spam plugin that requires all headers
   if (mFlags & nsMsgFolderFlags::Inbox)
   {
     nsCOMPtr <nsIMsgFilterList> filterList;
     nsresult rv = GetFilterList(nsnull, getter_AddRefs(filterList));
     NS_ENSURE_SUCCESS(rv,rv);
 
@@ -9203,17 +9203,17 @@ NS_IMETHODIMP nsImapMailFolder::FetchMsg
                                                  bool aLocalOnly, nsIUrlListener *aUrlListener,
                                                  bool *aAsyncResults)
 {
   NS_ENSURE_ARG_POINTER(aKeysToFetch);
   NS_ENSURE_ARG_POINTER(aAsyncResults);
 
   nsTArray<nsMsgKey> keysToFetchFromServer;
 
-  *aAsyncResults = PR_FALSE;
+  *aAsyncResults = false;
   nsresult rv = NS_OK;
 
   nsCOMPtr<nsIImapService> imapService = do_GetService(NS_IMAPSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr <nsIMsgMessageService> msgService = do_QueryInterface(imapService, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   for (PRUint32 i = 0; i < aNumKeys; i++)
@@ -9274,17 +9274,17 @@ NS_IMETHODIMP nsImapMailFolder::FetchMsg
   if (!keysToFetchFromServer.IsEmpty())
   {
     PRUint32 msgCount = keysToFetchFromServer.Length();
     nsCAutoString messageIds;
     AllocateImapUidString(keysToFetchFromServer.Elements(), msgCount,
                          nsnull, messageIds);
     rv = imapService->GetBodyStart(m_thread, this, aUrlListener,
                                    messageIds, 2048, nsnull);
-    *aAsyncResults = PR_TRUE; // the preview text will be available async...
+    *aAsyncResults = true; // the preview text will be available async...
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapMailFolder::AddKeywordsToMessages(nsIArray *aMessages, const nsACString& aKeywords)
 {
   nsresult rv = nsMsgDBFolder::AddKeywordsToMessages(aMessages, aKeywords);
   if (NS_SUCCEEDED(rv))
@@ -9475,17 +9475,17 @@ NS_IMETHODIMP nsImapMailFolder::Initiate
     PR_LOG(gAutoSyncLog, PR_LOG_DEBUG, ("Cannot update folder: %s\n", folderName.get()));
     return NS_ERROR_FAILURE;
   }
 
   // create auto-sync state object lazily
   InitAutoSyncState();
 
   // make sure we get the counts from the folder cache.
-  ReadDBFolderInfo(PR_FALSE);
+  ReadDBFolderInfo(false);
 
   nsresult rv = m_autoSyncStateObj->ManageStorageSpace();
   NS_ENSURE_SUCCESS(rv, rv);
 
   PRInt32 syncState;
   m_autoSyncStateObj->GetState(&syncState);
   if (syncState == nsAutoSyncState::stUpdateNeeded)
     return m_autoSyncStateObj->UpdateFolder();
@@ -9527,17 +9527,17 @@ nsresult nsImapMailFolder::CreatePlaybac
 }
 
 void nsImapMailFolder::PlaybackTimerCallback(nsITimer *aTimer, void *aClosure)
 {
   nsPlaybackRequest *request = static_cast<nsPlaybackRequest*>(aClosure);
   
   NS_ASSERTION(request->SrcFolder->m_pendingPlaybackReq == request, "wrong playback request pointer");
   
-  nsRefPtr<nsImapOfflineSync> offlineSync = new nsImapOfflineSync(request->MsgWindow, nsnull, request->SrcFolder, PR_TRUE);
+  nsRefPtr<nsImapOfflineSync> offlineSync = new nsImapOfflineSync(request->MsgWindow, nsnull, request->SrcFolder, true);
   if (offlineSync)
   {
     nsresult rv = offlineSync->ProcessNextOperation();
     NS_ASSERTION(NS_SUCCEEDED(rv), "pseudo-offline playback is not successful");
   }
   
   // release request struct
   request->SrcFolder->m_pendingPlaybackReq = nsnull;
--- a/mailnews/imap/src/nsImapOfflineSync.cpp
+++ b/mailnews/imap/src/nsImapOfflineSync.cpp
@@ -62,22 +62,22 @@ static NS_DEFINE_CID(kRDFServiceCID, NS_
 NS_IMPL_ISUPPORTS3(nsImapOfflineSync, nsIUrlListener, nsIMsgCopyServiceListener, nsIDBChangeListener)
 
 nsImapOfflineSync::nsImapOfflineSync(nsIMsgWindow *window, nsIUrlListener *listener, nsIMsgFolder *singleFolderOnly, bool isPseudoOffline)
 {
   m_singleFolderToUpdate = singleFolderOnly;
   m_window = window;
   // not the perfect place for this, but I think it will work.
   if (m_window)
-    m_window->SetStopped(PR_FALSE);
+    m_window->SetStopped(false);
 
   mCurrentPlaybackOpType = nsIMsgOfflineImapOperation::kFlagsChanged;
-  m_mailboxupdatesStarted = PR_FALSE;
-  m_mailboxupdatesFinished = PR_FALSE;
-  m_createdOfflineFolders = PR_FALSE;
+  m_mailboxupdatesStarted = false;
+  m_mailboxupdatesFinished = false;
+  m_createdOfflineFolders = false;
   m_pseudoOffline = isPseudoOffline;
   m_KeyIndex = 0;
   mCurrentUIDValidity = nsMsgKey_None;
   m_listener = listener;
 }
 
 nsImapOfflineSync::~nsImapOfflineSync()
 {
@@ -100,17 +100,17 @@ nsImapOfflineSync::OnStopRunningUrl(nsIU
 
   // where do we make sure this gets cleared when we start running urls?
   bool stopped = false;
   if (m_window)
     m_window->GetStopped(&stopped);
 
   if (m_curTempFile)
   {
-    m_curTempFile->Remove(PR_FALSE);
+    m_curTempFile->Remove(false);
     m_curTempFile = nsnull;
   }
   // NS_BINDING_ABORTED is used for the user pressing stop, which
   // should cause us to abort the offline process. Other errors
   // should allow us to continue.
   if (stopped)
   {
     if (m_listener)
@@ -262,22 +262,22 @@ void nsImapOfflineSync::ProcessFlagOpera
   bool flagsMatch = true;
   do
   { // loop for all messsages with the same flags
     if (flagsMatch)
     {
       nsMsgKey curKey;
       currentOp->GetMessageKey(&curKey);
       matchingFlagKeys.AppendElement(curKey);
-      currentOp->SetPlayingBack(PR_TRUE);
+      currentOp->SetPlayingBack(true);
       m_currentOpsToClear.AppendObject(currentOp);
     }
     currentOp = nsnull;
     if (++currentKeyIndex < m_CurrentKeys.Length())
-      m_currentDB->GetOfflineOpForKey(m_CurrentKeys[currentKeyIndex], PR_FALSE,
+      m_currentDB->GetOfflineOpForKey(m_CurrentKeys[currentKeyIndex], false,
         getter_AddRefs(currentOp));
     if (currentOp)
     {
       currentOp->GetFlagOperation(&flagOperation);
       currentOp->GetNewFlags(&newFlags);
     }
     flagsMatch = (flagOperation & nsIMsgOfflineImapOperation::kFlagsChanged)
                   && (newFlags == matchingFlags);
@@ -325,22 +325,22 @@ void nsImapOfflineSync::ProcessKeywordOp
   bool keywordsMatch = true;	
   do
   { // loop for all messsages with the same keywords
     if (keywordsMatch)
     {
       nsMsgKey curKey;
       currentOp->GetMessageKey(&curKey);
       matchingKeywordKeys.AppendElement(curKey);
-      currentOp->SetPlayingBack(PR_TRUE);
+      currentOp->SetPlayingBack(true);
       m_currentOpsToClear.AppendObject(currentOp);
     }
     currentOp = nsnull;
     if (++currentKeyIndex < m_CurrentKeys.Length())
-      m_currentDB->GetOfflineOpForKey(m_CurrentKeys[currentKeyIndex], PR_FALSE,
+      m_currentDB->GetOfflineOpForKey(m_CurrentKeys[currentKeyIndex], false,
         getter_AddRefs(currentOp));
     if (currentOp)
     {
       nsCAutoString curOpKeywords;
       nsOfflineImapOperationType operation;
       currentOp->GetOperation(&operation);
       if (mCurrentPlaybackOpType == nsIMsgOfflineImapOperation::kAddKeywords)
         currentOp->GetKeywordsToAdd(getter_Copies(curOpKeywords));
@@ -464,44 +464,44 @@ nsImapOfflineSync::ProcessAppendMsgOpera
                   nsCOMPtr<nsIFile> cloneTmpFile;
                   // clone the tmp file to defeat nsIFile's stat/size caching.
                   tmpFile->Clone(getter_AddRefs(cloneTmpFile));
                   m_curTempFile = do_QueryInterface(cloneTmpFile);
                   nsCOMPtr<nsIMsgCopyService> copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID);
                   if (copyService)
                     rv = copyService->CopyFileMessage(cloneTmpFile, destFolder,
                     /* nsIMsgDBHdr* msgToReplace */ nsnull,
-                    PR_TRUE /* isDraftOrTemplate */,
+                    true /* isDraftOrTemplate */,
                     0, // new msg flags - are there interesting flags here?
                     EmptyCString(), /* are there keywords we should get? */
                       this,
                       m_window);
                 }
                 else
-                  tmpFile->Remove(PR_FALSE);
+                  tmpFile->Remove(false);
               }
-              currentOp->SetPlayingBack(PR_TRUE);
+              currentOp->SetPlayingBack(true);
               m_currentOpsToClear.AppendObject(currentOp);
-              m_currentDB->DeleteHeader(mailHdr, nsnull, PR_TRUE, PR_TRUE);
+              m_currentDB->DeleteHeader(mailHdr, nsnull, true, true);
             }
           }
           // want to close in failure case too
           outputStream->Close();
         }
       }
     }
   }
 }
 
 void nsImapOfflineSync::ClearCurrentOps()
 {
   PRInt32 opCount = m_currentOpsToClear.Count();
   for (PRInt32 i = opCount - 1; i >= 0; i--)
   {
-    m_currentOpsToClear[i]->SetPlayingBack(PR_FALSE);
+    m_currentOpsToClear[i]->SetPlayingBack(false);
     m_currentOpsToClear[i]->ClearOperation(mCurrentPlaybackOpType);
     m_currentOpsToClear.RemoveObjectAt(i);
   }
 }
 
 void nsImapOfflineSync::ProcessMoveOperation(nsIMsgOfflineImapOperation *op)
 {
   nsTArray<nsMsgKey> matchingFlagKeys;
@@ -512,26 +512,26 @@ void nsImapOfflineSync::ProcessMoveOpera
   nsCOMPtr <nsIMsgOfflineImapOperation> currentOp = op;
   do 
   {	// loop for all messsages with the same destination
     if (moveMatches)
     {
       nsMsgKey curKey;
       currentOp->GetMessageKey(&curKey);
       matchingFlagKeys.AppendElement(curKey);
-      currentOp->SetPlayingBack(PR_TRUE);
+      currentOp->SetPlayingBack(true);
       m_currentOpsToClear.AppendObject(currentOp);
     }
     currentOp = nsnull;
     
     if (++currentKeyIndex < m_CurrentKeys.Length())
     {
       nsCString nextDestination;
-      nsresult rv = m_currentDB->GetOfflineOpForKey(m_CurrentKeys[currentKeyIndex], PR_FALSE, getter_AddRefs(currentOp));
-      moveMatches = PR_FALSE;
+      nsresult rv = m_currentDB->GetOfflineOpForKey(m_CurrentKeys[currentKeyIndex], false, getter_AddRefs(currentOp));
+      moveMatches = false;
       if (NS_SUCCEEDED(rv) && currentOp)
       {
         nsOfflineImapOperationType opType; 
         currentOp->GetOperation(&opType);
         if (opType & nsIMsgOfflineImapOperation::kMsgMoved)
         {
           currentOp->GetDestinationFolderURI(getter_Copies(nextDestination));
           moveMatches = moveDestination.Equals(nextDestination);
@@ -550,17 +550,17 @@ void nsImapOfflineSync::ProcessMoveOpera
     NS_ERROR("trying to playing back move to non-existent folder");
     ClearCurrentOps();
     ProcessNextOperation();
     return;
   }
   nsCOMPtr<nsIMsgImapMailFolder> imapFolder = do_QueryInterface(m_currentFolder);
   if (imapFolder && DestFolderOnSameServer(destFolder))
   {
-    imapFolder->ReplayOfflineMoveCopy(matchingFlagKeys.Elements(), matchingFlagKeys.Length(), PR_TRUE, destFolder,
+    imapFolder->ReplayOfflineMoveCopy(matchingFlagKeys.Elements(), matchingFlagKeys.Length(), true, destFolder,
       this, m_window);
   }
   else
   {
     nsresult rv;
     nsCOMPtr<nsIMutableArray> messages(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv));
     if (NS_SUCCEEDED(rv))
     {
@@ -583,22 +583,22 @@ void nsImapOfflineSync::ProcessMoveOpera
             op->GetNewFlags(&newImapFlags);
             // first three bits are the same
             msgFlags |= (newImapFlags & 0x07);
             if (newImapFlags & kImapMsgForwardedFlag)
               msgFlags |= nsMsgMessageFlags::Forwarded;
             mailHdr->SetFlags(msgFlags);
             mailHdr->SetMessageSize(msgSize);
           }
-          messages->AppendElement(mailHdr, PR_FALSE);
+          messages->AppendElement(mailHdr, false);
         }
       }
       nsCOMPtr<nsIMsgCopyService> copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv);
       if (copyService)
-        copyService->CopyMessages(m_currentFolder, messages, destFolder, PR_TRUE, this, m_window, PR_FALSE);
+        copyService->CopyMessages(m_currentFolder, messages, destFolder, true, this, m_window, false);
     }
   }
 }
 
 // I'm tempted to make this a method on nsIMsgFolder, but that interface
 // is already so huge, and there are only a few places in the code that do this.
 // If there end up to be more places that need this, then we can reconsider.
 bool nsImapOfflineSync::DestFolderOnSameServer(nsIMsgFolder *destFolder)
@@ -625,27 +625,27 @@ void nsImapOfflineSync::ProcessCopyOpera
   nsresult rv;
 
   do { // loop for all messsages with the same destination
     if (copyMatches)
     {
       nsMsgKey curKey;
       currentOp->GetMessageKey(&curKey);
       matchingFlagKeys.AppendElement(curKey);
-      currentOp->SetPlayingBack(PR_TRUE);
+      currentOp->SetPlayingBack(true);
       m_currentOpsToClear.AppendObject(currentOp);
     }
     currentOp = nsnull;
 
     if (++currentKeyIndex < m_CurrentKeys.Length())
     {
       nsCString nextDestination;
       rv = m_currentDB->GetOfflineOpForKey(m_CurrentKeys[currentKeyIndex],
-                                           PR_FALSE, getter_AddRefs(currentOp));
-      copyMatches = PR_FALSE;
+                                           false, getter_AddRefs(currentOp));
+      copyMatches = false;
       if (NS_SUCCEEDED(rv) && currentOp)
       {
         nsOfflineImapOperationType opType; 
         currentOp->GetOperation(&opType);
         if (opType & nsIMsgOfflineImapOperation::kMsgCopy)
         {
           currentOp->GetCopyDestination(0, getter_Copies(nextDestination));
           copyMatches = copyDestination.Equals(nextDestination);
@@ -665,60 +665,60 @@ void nsImapOfflineSync::ProcessCopyOpera
     NS_ERROR("trying to playing back copy to non-existent folder");
     ClearCurrentOps();
     ProcessNextOperation();
     return;
   }
   nsCOMPtr<nsIMsgImapMailFolder> imapFolder = do_QueryInterface(m_currentFolder);
   if (imapFolder && DestFolderOnSameServer(destFolder))
   {
-    rv = imapFolder->ReplayOfflineMoveCopy(matchingFlagKeys.Elements(), matchingFlagKeys.Length(), PR_FALSE, destFolder,
+    rv = imapFolder->ReplayOfflineMoveCopy(matchingFlagKeys.Elements(), matchingFlagKeys.Length(), false, destFolder,
                    this, m_window);
   }
   else
   {
     nsCOMPtr<nsIMutableArray> messages(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv));
     if (messages && NS_SUCCEEDED(rv))
     {
       for (PRUint32 keyIndex = 0; keyIndex < matchingFlagKeys.Length(); keyIndex++)
       {
         nsCOMPtr<nsIMsgDBHdr> mailHdr = nsnull;
         rv = m_currentFolder->GetMessageHeader(matchingFlagKeys.ElementAt(keyIndex), getter_AddRefs(mailHdr));
         if (NS_SUCCEEDED(rv) && mailHdr)
-          messages->AppendElement(mailHdr, PR_FALSE);
+          messages->AppendElement(mailHdr, false);
       }
       nsCOMPtr<nsIMsgCopyService> copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv);
       if (copyService)
-        copyService->CopyMessages(m_currentFolder, messages, destFolder, PR_FALSE, this, m_window, PR_FALSE);
+        copyService->CopyMessages(m_currentFolder, messages, destFolder, false, this, m_window, false);
     }
   }
 }
 
 void nsImapOfflineSync::ProcessEmptyTrash()
 {
   m_currentFolder->EmptyTrash(m_window, this);
   ClearDB(); // EmptyTrash closes and deletes the trash db.
 }
 
-// returns PR_TRUE if we found a folder to create, PR_FALSE if we're done creating folders.
+// returns true if we found a folder to create, false if we're done creating folders.
 bool nsImapOfflineSync::CreateOfflineFolders()
 {
   while (m_currentFolder)
   {
     PRUint32 flags;
     m_currentFolder->GetFlags(&flags);
     bool offlineCreate = (flags & nsMsgFolderFlags::CreatedOffline) != 0;
     if (offlineCreate)
     {
       if (CreateOfflineFolder(m_currentFolder))
-        return PR_TRUE;
+        return true;
     }
     AdvanceToNextFolder();
   }
-  return PR_FALSE;
+  return false;
 }
 
 bool nsImapOfflineSync::CreateOfflineFolder(nsIMsgFolder *folder)
 {
   nsCOMPtr<nsIMsgFolder> parent;
   folder->GetParent(getter_AddRefs(parent));
 
   nsCOMPtr <nsIMsgImapMailFolder> imapFolder = do_QueryInterface(parent);
@@ -729,17 +729,17 @@ bool nsImapOfflineSync::CreateOfflineFol
   NS_ConvertASCIItoUTF16 folderName(onlineName);
   nsresult rv = imapFolder->PlaybackOfflineFolderCreate(folderName, nsnull,  getter_AddRefs(createFolderURI));
   if (createFolderURI && NS_SUCCEEDED(rv))
   {
     nsCOMPtr <nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(createFolderURI);
     if (mailnewsUrl)
       mailnewsUrl->RegisterListener(this);
   }
-  return NS_SUCCEEDED(rv) ? PR_TRUE : PR_FALSE;	// this is asynch, we have to return and be called again by the OfflineOpExitFunction
+  return NS_SUCCEEDED(rv) ? true : false;	// this is asynch, we have to return and be called again by the OfflineOpExitFunction
 }
 
 PRInt32 nsImapOfflineSync::GetCurrentUIDValidity()
 {
   if (m_currentFolder)
   {
     nsCOMPtr <nsIImapMailFolderSink> imapFolderSink = do_QueryInterface(m_currentFolder);
     if (imapFolderSink)
@@ -773,17 +773,17 @@ nsresult nsImapOfflineSync::ProcessNextO
     }
     else
     {
       if (CreateOfflineFolders())
         return NS_OK;
       m_currentServer = nsnull;
       AdvanceToNextFolder();
     }
-    m_createdOfflineFolders = PR_TRUE;
+    m_createdOfflineFolders = true;
   }
   // if updating one folder only, restore m_currentFolder to that folder
   if (m_singleFolderToUpdate)
     m_currentFolder = m_singleFolderToUpdate;
   
   PRUint32 folderFlags;
   nsCOMPtr <nsIDBFolderInfo> folderInfo;
   while (m_currentFolder && !m_currentDB)
@@ -811,28 +811,28 @@ nsresult nsImapOfflineSync::ProcessNextO
       }
       else
       {
         // trash any ghost msgs
         bool deletedGhostMsgs = false;
         for (PRUint32 fakeIndex=0; fakeIndex < m_CurrentKeys.Length(); fakeIndex++)
         {
           nsCOMPtr <nsIMsgOfflineImapOperation> currentOp; 
-          m_currentDB->GetOfflineOpForKey(m_CurrentKeys[fakeIndex], PR_FALSE, getter_AddRefs(currentOp));
+          m_currentDB->GetOfflineOpForKey(m_CurrentKeys[fakeIndex], false, getter_AddRefs(currentOp));
           if (currentOp)
           {
             nsOfflineImapOperationType opType; 
             currentOp->GetOperation(&opType);
             
             if (opType == nsIMsgOfflineImapOperation::kMoveResult)
             {
               nsMsgKey curKey;
               currentOp->GetMessageKey(&curKey);
               m_currentDB->RemoveOfflineOp(currentOp);
-              deletedGhostMsgs = PR_TRUE;
+              deletedGhostMsgs = true;
 
               // Remember the pseudo headers before we delete them,
               // and when we download new headers, tell listeners about the
               // message key change between the pseudo headers and the real
               // downloaded headers. Note that we're not currently sending
               // a msgsDeleted notifcation for these headers, but the
               // db listeners are notified about the deletion.
               // for imap folders, we should adjust the pending counts, because we
@@ -842,17 +842,17 @@ nsresult nsImapOfflineSync::ProcessNextO
               {
                 bool hdrIsRead;
                 m_currentDB->IsRead(curKey, &hdrIsRead);
                 imapFolder->ChangePendingTotal(1);
                 if (!hdrIsRead)
                   imapFolder->ChangePendingUnread(1);
                 imapFolder->AddMoveResultPseudoKey(curKey);
               }
-              m_currentDB->DeleteMessage(curKey, nsnull, PR_FALSE);
+              m_currentDB->DeleteMessage(curKey, nsnull, false);
             }
           }
         }
         
         if (deletedGhostMsgs)
           m_currentFolder->SummaryChanged();
         
         m_CurrentKeys.Clear();
@@ -906,30 +906,30 @@ nsresult nsImapOfflineSync::ProcessNextO
     {
       PRInt32 curFolderUidValidity;
       folderInfo->GetImapUidValidity(&curFolderUidValidity);
       bool uidvalidityChanged = (!m_pseudoOffline && folderFlags & nsMsgFolderFlags::ImapBox) && (GetCurrentUIDValidity() != curFolderUidValidity);
       nsCOMPtr <nsIMsgOfflineImapOperation> currentOp;
       if (uidvalidityChanged)
         DeleteAllOfflineOpsForCurrentDB();
       else
-        m_currentDB->GetOfflineOpForKey(m_CurrentKeys[m_KeyIndex], PR_FALSE, getter_AddRefs(currentOp));
+        m_currentDB->GetOfflineOpForKey(m_CurrentKeys[m_KeyIndex], false, getter_AddRefs(currentOp));
 
       if (currentOp)
       {
         nsOfflineImapOperationType opType; 
         currentOp->GetOperation(&opType);
         // loop until we find the next db record that matches the current playback operation
         while (currentOp && !(opType & mCurrentPlaybackOpType))
         {
           currentOp = nsnull;
           ++m_KeyIndex;
           if (m_KeyIndex < m_CurrentKeys.Length())
             m_currentDB->GetOfflineOpForKey(m_CurrentKeys[m_KeyIndex],
-                                            PR_FALSE, getter_AddRefs(currentOp));
+                                            false, getter_AddRefs(currentOp));
           if (currentOp)
             currentOp->GetOperation(&opType);
         }
         // if we did not find a db record that matches the current playback operation,
         // then move to the next playback operation and recurse.  
         if (!currentOp)
         {
           // we are done with the current type
@@ -979,17 +979,17 @@ nsresult nsImapOfflineSync::ProcessNextO
           {
             mCurrentPlaybackOpType = nsIMsgOfflineImapOperation::kDeleteAllMsgs;
             m_KeyIndex = 0;
             ProcessNextOperation();
           }
           else
           {
             DeleteAllOfflineOpsForCurrentDB();
-            currentFolderFinished = PR_TRUE;
+            currentFolderFinished = true;
           }
           
         }
         else
         {
           if (mCurrentPlaybackOpType == nsIMsgOfflineImapOperation::kFlagsChanged)
             ProcessFlagOperation(currentOp);
           else if (mCurrentPlaybackOpType == nsIMsgOfflineImapOperation::kAddKeywords
@@ -1010,20 +1010,20 @@ nsresult nsImapOfflineSync::ProcessNextO
             currentOp = nsnull;
             ProcessEmptyTrash();
           }
           else
             NS_ERROR("invalid playback op type");
         }
       }
       else
-        currentFolderFinished = PR_TRUE;
+        currentFolderFinished = true;
     }
     else
-      currentFolderFinished = PR_TRUE;
+      currentFolderFinished = true;
     
     if (currentFolderFinished)
     {
       ClearDB();
       if (!m_singleFolderToUpdate)
       {
         AdvanceToNextFolder();
         ProcessNextOperation();
@@ -1031,17 +1031,17 @@ nsresult nsImapOfflineSync::ProcessNextO
       }
       else
         m_currentFolder = nsnull;
     }
   }
   
   if (!m_currentFolder && !m_mailboxupdatesStarted)
   {
-    m_mailboxupdatesStarted = PR_TRUE;
+    m_mailboxupdatesStarted = true;
     
     // if we are updating more than one folder then we need the iterator
     if (!m_singleFolderToUpdate)
     {
       m_currentServer = nsnull;
       AdvanceToNextFolder();
     }
     if (m_singleFolderToUpdate)
@@ -1066,17 +1066,17 @@ nsresult nsImapOfflineSync::ProcessNextO
     //				if ((folder->GetType() == FOLDER_IMAPMAIL) && (deletedAllOfflineEventsInFolder == folder || (folder->GetFolderPrefFlags() & nsMsgFolderFlags::Offline)
     //					|| loadingFolder) 
     //					&& !(folder->GetFolderPrefFlags() & MSG_FOLDER_PREF_IMAPNOSELECT) )
     //				{
     //					bool lastChance = ((deletedAllOfflineEventsInFolder == folder) && m_singleFolderToUpdate) || loadingFolder;
     // if deletedAllOfflineEventsInFolder == folder and we're only updating one folder, then we need to update newly selected folder
     // I think this also means that we're really opening the folder...so we tell StartUpdate that we're loading a folder.
     //					if (!updateFolderIterator || !(imapMail->GetFlags() & nsMsgFolderFlags::Inbox))		// avoid queueing the inbox twice
-    //						imapMail->StartUpdateOfNewlySelectedFolder(m_workerPane, lastChance, queue, nsnsnull, PR_FALSE, PR_FALSE);
+    //						imapMail->StartUpdateOfNewlySelectedFolder(m_workerPane, lastChance, queue, nsnsnull, false, false);
     //				}
     //				folder= m_singleFolderToUpdate ? (MSG_FolderInfo *)nsnull : updateFolderIterator->Next();
     //       }
   }
   // if we get here, then I *think* we're done. Not sure, though.
 #ifdef DEBUG_bienvenu
   printf("done with offline imap sync\n");
 #endif
@@ -1088,27 +1088,27 @@ nsresult nsImapOfflineSync::ProcessNextO
   return rv;
 }
 
 
 void nsImapOfflineSync::DeleteAllOfflineOpsForCurrentDB()
 {
   m_KeyIndex = 0;
   nsCOMPtr <nsIMsgOfflineImapOperation> currentOp;
-  m_currentDB->GetOfflineOpForKey(m_CurrentKeys[m_KeyIndex], PR_FALSE, getter_AddRefs(currentOp));
+  m_currentDB->GetOfflineOpForKey(m_CurrentKeys[m_KeyIndex], false, getter_AddRefs(currentOp));
   while (currentOp)
   {
     // NS_ASSERTION(currentOp->GetOperationFlags() == 0);
     // delete any ops that have already played back
     m_currentDB->RemoveOfflineOp(currentOp);
     m_currentDB->Commit(nsMsgDBCommitType::kLargeCommit);
     currentOp = nsnull;
     
     if (++m_KeyIndex < m_CurrentKeys.Length())
-      m_currentDB->GetOfflineOpForKey(m_CurrentKeys[m_KeyIndex], PR_FALSE, getter_AddRefs(currentOp));
+      m_currentDB->GetOfflineOpForKey(m_CurrentKeys[m_KeyIndex], false, getter_AddRefs(currentOp));
   }
   // turn off nsMsgFolderFlags::OfflineEvents
   if (m_currentFolder)
     m_currentFolder->ClearFlag(nsMsgFolderFlags::OfflineEvents);
 }
 
 nsImapOfflineDownloader::nsImapOfflineDownloader(nsIMsgWindow *aMsgWindow, nsIUrlListener *aListener) : nsImapOfflineSync(aMsgWindow, aListener)
 {
@@ -1123,17 +1123,17 @@ nsImapOfflineDownloader::~nsImapOfflineD
 {
 }
 
 nsresult nsImapOfflineDownloader::ProcessNextOperation()
 {
   nsresult rv = NS_OK;
   if (!m_mailboxupdatesStarted)
   {
-    m_mailboxupdatesStarted = PR_TRUE;
+    m_mailboxupdatesStarted = true;
     // Update the INBOX first so the updates on the remaining
     // folders pickup the results of any filter moves.
     nsCOMPtr<nsIMsgAccountManager> accountManager = 
              do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
     if (NS_FAILED(rv)) return rv;
     nsCOMPtr<nsISupportsArray> servers;
   
     rv = accountManager->GetAllServers(getter_AddRefs(servers));
@@ -1189,17 +1189,17 @@ nsresult nsImapOfflineDownloader::Proces
             }
           }
       }
       return ProcessNextOperation(); // recurse and do next server.
     }
     else
     {
       m_allServers = nsnull;
-      m_mailboxupdatesFinished = PR_TRUE;
+      m_mailboxupdatesFinished = true;
     }
   }
   AdvanceToNextFolder();
 
   while (m_currentFolder)
   {
     PRUint32 folderFlags;
 
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -338,17 +338,17 @@ static PRInt32 gExpungeThreshold = 20;
 
 const PRInt32 kAppBufSize = 100;
 // can't use static nsCString because it shows up as a leak.
 static char gAppName[kAppBufSize];
 static char gAppVersion[kAppBufSize];
 
 nsresult nsImapProtocol::GlobalInitialization(nsIPrefBranch *aPrefBranch)
 {
-    gInitialized = PR_TRUE;
+    gInitialized = true;
 
     aPrefBranch->GetIntPref("mail.imap.chunk_fast", &gTooFastTime);   // secs we read too little too fast
     aPrefBranch->GetIntPref("mail.imap.chunk_ideal", &gIdealTime);    // secs we read enough in good time
     aPrefBranch->GetIntPref("mail.imap.chunk_add", &gChunkAddSize);   // buffer size to add when wasting time
     aPrefBranch->GetIntPref("mail.imap.chunk_size", &gChunkSize);
     aPrefBranch->GetIntPref("mail.imap.min_chunk_size_threshold",
                             &gChunkThreshold);
     aPrefBranch->GetBoolPref("mail.imap.hide_other_users",
@@ -388,29 +388,29 @@ nsImapProtocol::nsImapProtocol() : nsMsg
     m_pseudoInterruptMonitor("imapPseudoInterrupt"),
     m_dataMemberMonitor("imapDataMember"),
     m_threadDeathMonitor("imapThreadDeath"),
     m_waitForBodyIdsMonitor("imapWaitForBodyIds"),
     m_fetchBodyListMonitor("imapFetchBodyList"),
     m_passwordReadyMonitor("imapPasswordReady"),
     m_parser(*this)
 {
-  m_urlInProgress = PR_FALSE;
-  m_idle = PR_FALSE;
-  m_retryUrlOnError = PR_FALSE;
-  m_useIdle = PR_TRUE; // by default, use it
-  m_useCondStore = PR_TRUE;
-  m_useCompressDeflate = PR_TRUE;
-  m_ignoreExpunges = PR_FALSE;
+  m_urlInProgress = false;
+  m_idle = false;
+  m_retryUrlOnError = false;
+  m_useIdle = true; // by default, use it
+  m_useCondStore = true;
+  m_useCompressDeflate = true;
+  m_ignoreExpunges = false;
   m_prefAuthMethods = kCapabilityUndefined;
   m_failedAuthMethods = 0;
   m_currentAuthMethod = kCapabilityUndefined;
   m_socketType = nsMsgSocketType::trySTARTTLS;
   m_connectionStatus = NS_OK;
-  m_safeToCloseConnection = PR_FALSE;
+  m_safeToCloseConnection = false;
   m_hostSessionList = nsnull;
   m_flagState = nsnull;
   m_fetchBodyIdList = nsnull;
 
   nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
   NS_ASSERTION(prefBranch, "FAILED to create the preference service");
 
   // read in the accept languages preference
@@ -431,73 +431,73 @@ nsImapProtocol::nsImapProtocol() : nsMsg
                             getter_Copies(customDBHeaders));
 
     ParseString(customDBHeaders, ' ', mCustomDBHeaders);
     prefBranch->GetBoolPref("mailnews.display.prefer_plaintext", &m_preferPlainText);
   }
 
     // ***** Thread support *****
   m_thread = nsnull;
-  m_imapThreadIsRunning = PR_FALSE;
+  m_imapThreadIsRunning = false;
   m_currentServerCommandTagNumber = 0;
-  m_active = PR_FALSE;
-  m_folderNeedsSubscribing = PR_FALSE;
-  m_folderNeedsACLRefreshed = PR_FALSE;
-  m_threadShouldDie = PR_FALSE;
-  m_inThreadShouldDie = PR_FALSE;
-  m_pseudoInterrupted = PR_FALSE;
-  m_nextUrlReadyToRun = PR_FALSE;
-  m_trackingTime = PR_FALSE;
+  m_active = false;
+  m_folderNeedsSubscribing = false;
+  m_folderNeedsACLRefreshed = false;
+  m_threadShouldDie = false;
+  m_inThreadShouldDie = false;
+  m_pseudoInterrupted = false;
+  m_nextUrlReadyToRun = false;
+  m_trackingTime = false;
   m_curFetchSize = 0;
   LL_I2L(m_startTime, 0);
   LL_I2L(m_endTime, 0);
   LL_I2L(m_lastActiveTime, 0);
   LL_I2L(m_lastProgressTime, 0);
   ResetProgressInfo();
 
   m_tooFastTime = 0;
   m_idealTime = 0;
   m_chunkAddSize = 0;
   m_chunkStartSize = 0;
-  m_fetchByChunks = PR_TRUE;
-  m_sendID = PR_TRUE;
+  m_fetchByChunks = true;
+  m_sendID = true;
   m_chunkSize = 0;
   m_chunkThreshold = 0;
-  m_fromHeaderSeen = PR_FALSE;
-  m_closeNeededBeforeSelect = PR_FALSE;
-  m_needNoop = PR_FALSE;
+  m_fromHeaderSeen = false;
+  m_closeNeededBeforeSelect = false;
+  m_needNoop = false;
   m_noopCount = 0;
-  m_fetchBodyListIsNew = PR_FALSE;
+  m_fetchBodyListIsNew = false;
   m_flagChangeCount = 0;
   m_lastCheckTime = PR_Now();
 
-  m_checkForNewMailDownloadsHeaders = PR_TRUE;  // this should be on by default
+  m_checkForNewMailDownloadsHeaders = true;  // this should be on by default
   m_hierarchyNameState = kNoOperationInProgress;
   m_discoveryStatus = eContinue;
 
-  m_overRideUrlConnectionInfo = PR_FALSE;
+  m_overRideUrlConnectionInfo = false;
   // m_dataOutputBuf is used by Send Data
   m_dataOutputBuf = (char *) PR_CALLOC(sizeof(char) * OUTPUT_BUFFER_SIZE);
   m_allocatedSize = OUTPUT_BUFFER_SIZE;
 
   // used to buffer incoming data by ReadNextLine
-  m_inputStreamBuffer = new nsMsgLineStreamBuffer(OUTPUT_BUFFER_SIZE, PR_TRUE /* allocate new lines */, PR_FALSE /* leave CRLFs on the returned string */);
+  m_inputStreamBuffer = new nsMsgLineStreamBuffer(OUTPUT_BUFFER_SIZE, true /* allocate new lines */, false /* leave CRLFs on the returned string */);
   m_currentBiffState = nsIMsgFolder::nsMsgBiffState_Unknown;
   m_progressStringId = 0;
 
   // since these are embedded in the nsImapProtocol object, but passed
   // through proxied xpcom methods, just AddRef them here.
   m_hdrDownloadCache = new nsMsgImapHdrXferInfo();
   m_downloadLineCache = new nsMsgImapLineDownloadCache();
   m_specialXListMailboxes.Init(0);
 
   // subscription
-  m_autoSubscribe = PR_TRUE;
-  m_autoUnsubscribe = PR_TRUE;
-  m_autoSubscribeOnOpen = PR_TRUE;
+  m_autoSubscribe = true;
+  m_autoUnsubscribe = true;
+  m_autoSubscribeOnOpen = true;
   m_deletableChildren = nsnull;
 
   mFolderLastModSeq = 0;
   
   Configure(gTooFastTime, gIdealTime, gChunkAddSize, gChunkSize,
                     gChunkThreshold, gFetchByChunks);
 
   // where should we do this? Perhaps in the factory object?
@@ -761,17 +761,17 @@ nsresult nsImapProtocol::SetupWithUrl(ns
     (void) server->GetAuthMethod(&authMethod);
     InitPrefAuthMethods(authMethod);
     (void) server->GetSocketType(&m_socketType);
     bool shuttingDown;
     (void) imapServer->GetShuttingDown(&shuttingDown);
     if (!shuttingDown)
       (void) imapServer->GetUseIdle(&m_useIdle);
     else
-      m_useIdle = PR_FALSE;
+      m_useIdle = false;
     imapServer->GetFetchByChunks(&m_fetchByChunks);
     imapServer->GetSendID(&m_sendID);
 
     nsAutoString trashFolderName;
     if (NS_SUCCEEDED(imapServer->GetTrashFolderName(trashFolderName)))
       CopyUTF16toMUTF7(trashFolderName, m_trashFolderName);
 
     nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
@@ -992,17 +992,17 @@ void nsImapProtocol::ReleaseUrlState(boo
   {
     MutexAutoLock mon(mLock);
     if (m_runningUrl)
     {
       mailnewsurl = do_QueryInterface(m_runningUrl);
       saveFolderSink = m_imapMailFolderSink;
 
       m_runningUrl = nsnull; // force us to release our last reference on the url
-      m_urlInProgress = PR_FALSE;
+      m_urlInProgress = false;
     }
   }
   // Need to null this out whether we have an m_runningUrl or not
   m_imapMailFolderSink = nsnull;
 
   // we want to make sure the imap protocol's last reference to the url gets released
   // back on the UI thread. This ensures that the objects the imap url hangs on to
   // properly get released back on the UI thread. 
@@ -1036,17 +1036,17 @@ NS_IMETHODIMP nsImapProtocol::Run()
   NS_ASSERTION(!m_imapThreadIsRunning,
                  "Oh. oh. thread is already running. What's wrong here?");
     if (m_imapThreadIsRunning)
     {
         PR_CExitMonitor(this);
         return NS_OK;
     }
 
-  m_imapThreadIsRunning = PR_TRUE;
+  m_imapThreadIsRunning = true;
   PR_CExitMonitor(this);
 
   // call the platform specific main loop ....
   ImapThreadMainLoop();
 
   if (m_runningUrl)
   {
     nsCOMPtr<nsIThread> thread = do_GetMainThread();
@@ -1119,17 +1119,17 @@ NS_IMETHODIMP nsImapProtocol::CloseStrea
   // persist chunk prefs if they've changed
   if (gChunkSizeDirty)
   {
     nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
     if (prefBranch)
     {
       prefBranch->SetIntPref("mail.imap.chunk_size", gChunkSize);
       prefBranch->SetIntPref("mail.imap.min_chunk_size_threshold", gChunkThreshold);
-      gChunkSizeDirty = PR_FALSE;
+      gChunkSizeDirty = false;
     }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapProtocol::GetUrlWindow(nsIMsgMailNewsUrl *aUrl,
                                            nsIMsgWindow **aMsgWindow)
 {
@@ -1145,17 +1145,17 @@ NS_IMETHODIMP nsImapProtocol::OnInputStr
   {
     PRUint32 bytesAvailable = 0;
     (void) inStr->Available(&bytesAvailable);
     // check if data available - might be a close
     if (bytesAvailable != 0)
     {
       ReentrantMonitorAutoEnter mon(m_urlReadyToRunMonitor);
       m_lastActiveTime = PR_Now();
-      m_nextUrlReadyToRun = PR_TRUE;
+      m_nextUrlReadyToRun = true;
       mon.Notify();
     }
   }
   return NS_OK;
 }
 
 // this is to be called from the UI thread. It sets m_threadShouldDie,
 // and then signals the imap thread, which, when it wakes up, should exit.
@@ -1176,46 +1176,46 @@ nsImapProtocol::TellThreadToDie(bool aIs
     if (NS_SUCCEEDED(rv))
       aImapServer->RemoveConnection(this);
     m_server = nsnull;
     me_server = nsnull;
   }
   {
     ReentrantMonitorAutoEnter deathMon(m_threadDeathMonitor);
     m_safeToCloseConnection = aIsSafeToClose;
-    m_threadShouldDie = PR_TRUE;
+    m_threadShouldDie = true;
   }
   ReentrantMonitorAutoEnter readyMon(m_urlReadyToRunMonitor);
-  m_nextUrlReadyToRun = PR_TRUE;
+  m_nextUrlReadyToRun = true;
   readyMon.Notify();
   return NS_OK;
 }
 
 void
 nsImapProtocol::TellThreadToDie()
 {
   nsresult rv = NS_OK;
   NS_WARN_IF_FALSE(!NS_IsMainThread(),
                    "TellThreadToDie() should not be called from UI thread");
 
   // prevent re-entering this method because it may lock the UI.
   if (m_inThreadShouldDie)
     return;
-  m_inThreadShouldDie = PR_TRUE;
+  m_inThreadShouldDie = true;
 
   // This routine is called only from the imap protocol thread.
   // The UI thread causes this to be called by calling TellThreadToDie.
   // In that case, m_safeToCloseConnection will be FALSE if it's dropping a
   // timed out connection, true when closing a cached connection.
   // We're using PR_CEnter/ExitMonitor because Monitors don't like having
   // us to hold one monitor and call code that gets a different monitor. And
   // some of the methods we call here use Monitors.
   PR_CEnterMonitor(this);
 
-  m_urlInProgress = PR_TRUE;  // let's say it's busy so no one tries to use
+  m_urlInProgress = true;  // let's say it's busy so no one tries to use
                                 // this about to die connection.
   bool urlWritingData = false;
   bool connectionIdle = !m_runningUrl;
 
   if (!connectionIdle)
     urlWritingData = m_imapAction == nsIImapUrl::nsImapAppendMsgFromFile
       || m_imapAction == nsIImapUrl::nsImapAppendDraftFromFile;
 
@@ -1226,38 +1226,38 @@ nsImapProtocol::TellThreadToDie()
   // going to close the connection as if the user pressed stop.
   if (m_currentServerCommandTagNumber > 0 && !urlWritingData)
   {
     bool isAlive = false;
     if (m_transport)
       rv = m_transport->IsAlive(&isAlive);
 
     if (TestFlag(IMAP_CONNECTION_IS_OPEN) && m_idle && isAlive)
-      EndIdle(PR_FALSE);
+      EndIdle(false);
 
     if (NS_SUCCEEDED(rv) && isAlive && closeNeeded && GetDeleteIsMoveToTrash() &&
         TestFlag(IMAP_CONNECTION_IS_OPEN) && m_outputStream)
-      Close(PR_TRUE, connectionIdle);
+      Close(true, connectionIdle);
 
     if (NS_SUCCEEDED(rv) && isAlive && TestFlag(IMAP_CONNECTION_IS_OPEN) && 
         NS_SUCCEEDED(GetConnectionStatus()) && m_outputStream)
-      Logout(PR_TRUE, connectionIdle);
+      Logout(true, connectionIdle);
   }
   PR_CExitMonitor(this);
   // close streams via UI thread
   if (m_imapProtocolSink) 
   {
     m_imapProtocolSink->CloseStreams();
     m_imapProtocolSink = nsnull;
   }
   Log("TellThreadToDie", nsnull, "close socket connection");
 
   {
     ReentrantMonitorAutoEnter mon(m_threadDeathMonitor);
-    m_threadShouldDie = PR_TRUE;
+    m_threadShouldDie = true;
   }
   {
     ReentrantMonitorAutoEnter dataMon(m_dataAvailableMonitor);
     dataMon.Notify();
   }
   ReentrantMonitorAutoEnter urlReadyMon(m_urlReadyToRunMonitor);
   urlReadyMon.NotifyAll();
 }
@@ -1270,17 +1270,17 @@ nsImapProtocol::GetLastActiveTimeStamp(P
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapProtocol::PseudoInterruptMsgLoad(nsIMsgFolder *aImapFolder, nsIMsgWindow *aMsgWindow, bool *interrupted)
 {
   NS_ENSURE_ARG (interrupted);
 
-  *interrupted = PR_FALSE;
+  *interrupted = false;
 
   PR_CEnterMonitor(this);
 
   if (m_runningUrl && !TestFlag(IMAP_CLEAN_UP_URL_STATE))
   {
     nsImapAction imapAction;
     m_runningUrl->GetImapAction(&imapAction);
 
@@ -1294,18 +1294,18 @@ nsImapProtocol::PseudoInterruptMsgLoad(n
       {
         nsCOMPtr <nsIMsgFolder> runningImapFolder;
         nsCOMPtr <nsIMsgWindow> msgWindow;
         nsCOMPtr <nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(runningImapURL);
         mailnewsUrl->GetMsgWindow(getter_AddRefs(msgWindow));
         mailnewsUrl->GetFolder(getter_AddRefs(runningImapFolder));
         if (aImapFolder == runningImapFolder && msgWindow == aMsgWindow)
         {
-          PseudoInterrupt(PR_TRUE);
-          *interrupted = PR_TRUE;
+          PseudoInterrupt(true);
+          *interrupted = true;
         }
       }
     }
   }
   PR_CExitMonitor(this);
 #ifdef DEBUG_bienvenu
   printf("interrupt msg load : %s\n", (*interrupted) ? "TRUE" : "FALSE");
 #endif
@@ -1327,17 +1327,17 @@ nsImapProtocol::ImapThreadMainLoop()
     {
       ReentrantMonitorAutoEnter mon(m_urlReadyToRunMonitor);
 
       while (NS_SUCCEEDED(rv) && !DeathSignalReceived() &&
              !m_nextUrlReadyToRun && !m_threadShouldDie)
         rv = mon.Wait(sleepTime);
 
       readyToRun = m_nextUrlReadyToRun;
-      m_nextUrlReadyToRun = PR_FALSE;
+      m_nextUrlReadyToRun = false;
     }
     // This will happen if the UI thread signals us to die
     if (m_threadShouldDie)
     {
       TellThreadToDie();
       break;
     }
 
@@ -1351,17 +1351,17 @@ nsImapProtocol::ImapThreadMainLoop()
     {
       //
       // NOTE: Though we cleared m_nextUrlReadyToRun above, it may have been
       //       set by LoadImapUrl, which runs on the main thread.  Because of this,
       //       we must not try to clear m_nextUrlReadyToRun here.
       //
       if (ProcessCurrentURL())
       {
-        m_nextUrlReadyToRun = PR_TRUE;
+        m_nextUrlReadyToRun = true;
         m_imapMailFolderSink = nsnull;
       }
       else
       {
         // see if we want to go into idle mode. Might want to check a pref here too.
         if (m_useIdle && !m_urlInProgress && GetServerStateParser().GetCapabilityFlag() & kHasIdleCapability
           && GetServerStateParser().GetIMAPstate()
                 == nsImapServerResponseParser::kFolderSelected)
@@ -1382,17 +1382,17 @@ nsImapProtocol::ImapThreadMainLoop()
     else
       printf("ready to run but no url and not idle\n");
 #endif
     // This can happen if the UI thread closes cached connections in the
     // OnStopRunningUrl notification.
     if (m_threadShouldDie)
       TellThreadToDie();
   }
-  m_imapThreadIsRunning = PR_FALSE;
+  m_imapThreadIsRunning = false;
 
   PR_LOG(IMAP, PR_LOG_DEBUG, ("ImapThreadMainLoop leaving [this=%x]\n", this));
 }
 
 void nsImapProtocol::HandleIdleResponses()
 {
   // PRInt32 oldRecent = GetServerStateParser().NumberOfRecentMessages();
   nsCAutoString commandBuffer(GetServerCommandTag());
@@ -1450,17 +1450,17 @@ void nsImapProtocol::EstablishServerConn
         char *fakeServerResponse = (char*)PR_Malloc(PL_strlen(serverResponse));
         // Munge the greeting into something that would pass for an IMAP
         // server's response to a "CAPABILITY" command.
         strcpy(fakeServerResponse, ESC_CAPABILITY_STAR);
         strcat(fakeServerResponse, serverResponse + ESC_CAPABILITY_OK_LEN);
         fakeServerResponse[endIndex - ESC_CAPABILITY_OK_LEN + ESC_CAPABILITY_STAR_LEN] = '\0';
         // Tell the response parser that we just issued a "CAPABILITY" and
         // got the following back.
-        GetServerStateParser().ParseIMAPServerResponse("1 CAPABILITY", PR_TRUE, fakeServerResponse);
+        GetServerStateParser().ParseIMAPServerResponse("1 CAPABILITY", true, fakeServerResponse);
       }
     }
   }
   else if (!PL_strncasecmp(serverResponse, ESC_PREAUTH, ESC_PREAUTH_LEN))
   {
     // we've been pre-authenticated.
     // we can skip the whole password step, right into the
     // kAuthenticated state
@@ -1473,17 +1473,17 @@ void nsImapProtocol::EstablishServerConn
           (kIMAP4Capability | kIMAP4rev1Capability | kIMAP4other) ) )
     {
       // AlertUserEvent_UsingId(MK_MSG_IMAP_SERVER_NOT_IMAP4);
       SetConnectionStatus(NS_ERROR_FAILURE);        // stop netlib
     }
     else
     {
       // let's record the user as authenticated.
-      m_imapServerSink->SetUserAuthenticated(PR_TRUE);
+      m_imapServerSink->SetUserAuthenticated(true);
 
       ProcessAfterAuthenticated();
       // the connection was a success
       SetConnectionStatus(NS_OK);
      }
   }
 
   PR_Free(serverResponse); // we don't care about the greeting yet...
@@ -1513,45 +1513,45 @@ static void DoomCacheEntry(nsIMsgMailNew
   {
     nsCOMPtr<nsICacheEntryDescriptor>  cacheEntry;
     url->GetMemCacheEntry(getter_AddRefs(cacheEntry));
     if (cacheEntry)
       cacheEntry->Doom();
   }
 }
 
-// returns PR_TRUE if another url was run, PR_FALSE otherwise.
+// returns true if another url was run, false otherwise.
 bool nsImapProtocol::ProcessCurrentURL()
 {
   nsresult rv = NS_OK;
   if (m_idle)
     EndIdle();
 
   if (m_retryUrlOnError)
   {
     // we clear this flag if we're re-running immediately, because that
     // means we never sent a start running url notification, and later we
     // don't send start running notification if we think we're rerunning
     // the url (see first call to SetUrlState below). This means we won't
     // send a start running notification, which means our stop running
     // notification will be ignored because we don't think we were running.
-    m_runningUrl->SetRerunningUrl(PR_FALSE);
+    m_runningUrl->SetRerunningUrl(false);
     return RetryUrl();
   }
   Log("ProcessCurrentURL", nsnull, "entering");
   (void) GetImapHostName(); // force m_hostName to get set.
 
 
   bool    logonFailed = false;
   bool anotherUrlRun = false;
   bool rerunningUrl = false;
   bool isExternalUrl;
   bool validUrl = true;
 
-  PseudoInterrupt(PR_FALSE);  // clear this if left over from previous url.
+  PseudoInterrupt(false);  // clear this if left over from previous url.
 
   m_runningUrl->GetRerunningUrl(&rerunningUrl);
   m_runningUrl->GetExternalLinkUrl(&isExternalUrl);
   m_runningUrl->GetValidUrl(&validUrl);
   m_runningUrl->GetImapAction(&m_imapAction);
 
   if (isExternalUrl)
   {
@@ -1561,37 +1561,37 @@ bool nsImapProtocol::ProcessCurrentURL()
       // will call HandleContent on the imap service so we
       // can abort this url, and run a new url in a new msg window
       // to run the folder load url and get off this crazy merry-go-round.
       if (m_channelListener)
       {
         nsCOMPtr<nsIRequest> request = do_QueryInterface(m_mockChannel);
         m_channelListener->OnStartRequest(request, m_channelContext);
       }
-      return PR_FALSE;
+      return false;
     }
   }
 
   if (!m_imapMailFolderSink)
     SetupSinkProxy(); // try this again. Evil, but I'm desperate.
 
   // Reinitialize the parser
   GetServerStateParser().InitializeState();
-  GetServerStateParser().SetConnected(PR_TRUE);
+  GetServerStateParser().SetConnected(true);
 
   // acknowledge that we are running the url now..
   nsCOMPtr<nsIMsgMailNewsUrl> mailnewsurl = do_QueryInterface(m_runningUrl, &rv);
   nsCAutoString urlSpec;
   mailnewsurl->GetSpec(urlSpec);
   Log("ProcessCurrentURL", urlSpec.get(), (validUrl) ? " = currentUrl\n" : " is not valid\n");
   if (!validUrl)
-    return PR_FALSE;
+    return false;
 
   if (NS_SUCCEEDED(rv) && mailnewsurl && m_imapMailFolderSink && !rerunningUrl)
-    m_imapMailFolderSink->SetUrlState(this, mailnewsurl, PR_TRUE, PR_FALSE,
+    m_imapMailFolderSink->SetUrlState(this, mailnewsurl, true, false,
                                       NS_OK);
 
   // if we are set up as a channel, we should notify our channel listener that we are starting...
   // so pass in ourself as the channel and not the underlying socket or file channel the protocol
   // happens to be using
   if (m_channelListener) // ### not sure we want to do this if rerunning url...
   {
     nsCOMPtr<nsIRequest> request = do_QueryInterface(m_mockChannel);
@@ -1628,17 +1628,17 @@ bool nsImapProtocol::ProcessCurrentURL()
           || m_socketType == nsMsgSocketType::alwaysSTARTTLS)
         {
           StartTLS();
           if (GetServerStateParser().LastCommandSuccessful())
           {
             nsCOMPtr<nsISupports> secInfo;
             nsCOMPtr<nsISocketTransport> strans = do_QueryInterface(m_transport, &rv);
             if (NS_FAILED(rv))
-              return PR_FALSE;
+              return false;
 
             rv = strans->GetSecurityInfo(getter_AddRefs(secInfo));
 
             if (NS_SUCCEEDED(rv) && secInfo)
             {
               nsCOMPtr<nsISSLSocketControl> sslControl = do_QueryInterface(secInfo, &rv);
 
               if (NS_SUCCEEDED(rv) && sslControl)
@@ -1750,17 +1750,17 @@ bool nsImapProtocol::ProcessCurrentURL()
   {
     if (logonFailed)
       rv = NS_ERROR_FAILURE;
     else if (GetServerStateParser().CommandFailed())
       rv = NS_MSG_ERROR_IMAP_COMMAND_FAILED;
     else
       rv = GetConnectionStatus();
     // we are done with this url.
-    m_imapMailFolderSink->SetUrlState(this, mailnewsurl, PR_FALSE, suspendUrl,
+    m_imapMailFolderSink->SetUrlState(this, mailnewsurl, false, suspendUrl,
                                       rv);
      // doom the cache entry
     if (NS_FAILED(rv) && DeathSignalReceived() && m_mockChannel)
       DoomCacheEntry(mailnewsurl);
   }
   else
     NS_ERROR("missing url or sink");
 
@@ -1777,17 +1777,17 @@ bool nsImapProtocol::ProcessCurrentURL()
   // BEFORE calling ReleaseUrlState
   mailnewsurl = nsnull;
 
   if (suspendUrl)
     m_imapServerSink->SuspendUrl(m_runningUrl);
   // save the imap folder sink since we need it to do the CopyNextStreamMessage
   nsRefPtr<ImapMailFolderSinkProxy> imapMailFolderSink = m_imapMailFolderSink;
   // release the url as we are done with it...
-  ReleaseUrlState(PR_FALSE);
+  ReleaseUrlState(false);
   ResetProgressInfo();
 
   ClearFlag(IMAP_CLEAN_UP_URL_STATE);
 
   if (imapMailFolderSink)
   {
     if (copyState)
     {
@@ -1841,33 +1841,33 @@ bool nsImapProtocol::ProcessCurrentURL()
   }
   else
   {
     if (imapServer)
     {
       bool shuttingDown;
       imapServer->GetShuttingDown(&shuttingDown);
       if (shuttingDown)
-        m_useIdle = PR_FALSE;
+        m_useIdle = false;
     }
   }
   return anotherUrlRun;
 }
 
 bool nsImapProtocol::RetryUrl()
 {
   PR_CEnterMonitor(this);
   nsCOMPtr <nsIImapUrl> kungFuGripImapUrl = m_runningUrl;
   nsCOMPtr <nsIImapMockChannel> saveMockChannel;
 
   // the mock channel might be null - that's OK.
   if (m_imapServerSink)
     (void) m_imapServerSink->PrepareToRetryUrl(kungFuGripImapUrl, getter_AddRefs(saveMockChannel));
 
-  ReleaseUrlState(PR_TRUE);
+  ReleaseUrlState(true);
   nsresult rv;
   nsCOMPtr<nsIImapIncomingServer> imapServer  = do_QueryReferent(m_server, &rv);
   if (NS_SUCCEEDED(rv))
     imapServer->RemoveConnection(this);
   if (m_imapServerSink)
     m_imapServerSink->RetryUrl(kungFuGripImapUrl, saveMockChannel);
   PR_CExitMonitor(this);
   return (m_imapServerSink != nsnull); // we're running a url (the same url)
@@ -1954,18 +1954,18 @@ nsresult nsImapProtocol::SendData(const 
       TellThreadToDie();
       SetConnectionStatus(rv);
       if (m_runningUrl && !m_retryUrlOnError)
       {
         bool alreadyRerunningUrl;
         m_runningUrl->GetRerunningUrl(&alreadyRerunningUrl);
         if (!alreadyRerunningUrl)
         {
-          m_runningUrl->SetRerunningUrl(PR_TRUE);
-          m_retryUrlOnError = PR_TRUE;
+          m_runningUrl->SetRerunningUrl(true);
+          m_retryUrlOnError = true;
         }
       }
     }
   }
 
   return rv;
 }
 
@@ -1992,87 +1992,87 @@ public:
   {
     if (mUrl)
     {
       nsCOMPtr<nsIMsgFolder> folder;
       mUrl->GetFolder(getter_AddRefs(folder));
       NS_ENSURE_TRUE(folder, NS_OK);
       nsCOMPtr<nsIImapMailFolderSink> folderSink(do_QueryInterface(folder));
       // This causes the url listener to get OnStart and Stop notifications.
-      folderSink->SetUrlState(mProtocol, mUrl, PR_TRUE, PR_FALSE, NS_OK);
-      folderSink->SetUrlState(mProtocol, mUrl, PR_FALSE, PR_FALSE, NS_OK);
+      folderSink->SetUrlState(mProtocol, mUrl, true, false, NS_OK);
+      folderSink->SetUrlState(mProtocol, mUrl, false, false, NS_OK);
     }
     return NS_OK;
   }
 
 private:
   nsCOMPtr<nsIMsgMailNewsUrl> mUrl;
   nsCOMPtr<nsIImapProtocol> mProtocol;
 };
 
 
 bool nsImapProtocol::TryToRunUrlLocally(nsIURI *aURL, nsISupports *aConsumer)
 {
   nsresult rv;
   nsCOMPtr<nsIImapUrl> imapUrl(do_QueryInterface(aURL, &rv));
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
   nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(aURL);
   nsCString messageIdString;
   imapUrl->GetListOfMessageIds(messageIdString);
   bool useLocalCache = false;
   if (!messageIdString.IsEmpty() && !HandlingMultipleMessages(messageIdString))
   {
     nsImapAction action;
     imapUrl->GetImapAction(&action);
     nsCOMPtr <nsIMsgFolder> folder;
     mailnewsUrl->GetFolder(getter_AddRefs(folder));
-    NS_ENSURE_TRUE(folder, PR_FALSE);
+    NS_ENSURE_TRUE(folder, false);
 
     folder->HasMsgOffline(atoi(messageIdString.get()), &useLocalCache);
     mailnewsUrl->SetMsgIsInLocalCache(useLocalCache);
     // We're downloading a single message for offline use, and it's
     // already offline. So we shouldn't do anything, but we do
     // need to notify the url listener.
     if (useLocalCache && action == nsIImapUrl::nsImapMsgDownloadForOffline)
     {
       nsCOMPtr<nsIRunnable> event = new UrlListenerNotifierEvent(mailnewsUrl,
                                                                  this);
       // Post this as an event because it can lead to re-entrant calls to
       // LoadNextQueuedUrl if the listener runs a new url.
       if (event)
         NS_DispatchToCurrentThread(event);
-      return PR_TRUE;
+      return true;
     }
   }
   if (!useLocalCache)
-    return PR_FALSE;
+    return false;
 
   nsCOMPtr<nsIImapMockChannel> mockChannel;
   imapUrl->GetMockChannel(getter_AddRefs(mockChannel));
   if (!mockChannel)
-    return PR_FALSE;
+    return false;
 
   nsImapMockChannel *imapChannel = static_cast<nsImapMockChannel *>(mockChannel.get());
   if (!imapChannel)
-    return PR_FALSE;
+    return false;
 
   nsCOMPtr <nsILoadGroup> loadGroup;
   imapChannel->GetLoadGroup(getter_AddRefs(loadGroup));
   if (!loadGroup) // if we don't have one, the url will snag one from the msg window...
     mailnewsUrl->GetLoadGroup(getter_AddRefs(loadGroup));
 
   if (loadGroup)
     loadGroup->RemoveRequest((nsIRequest *) mockChannel, nsnull /* context isupports */, NS_OK);
 
   if (imapChannel->ReadFromLocalCache())
   {
-    (void) imapChannel->NotifyStartEndReadFromCache(PR_TRUE);
-    return PR_TRUE;
-  }
-  return PR_FALSE;
+    (void) imapChannel->NotifyStartEndReadFromCache(true);
+    return true;
+  }
+  return false;
 }
 
 
 // LoadImapUrl takes a url, initializes all of our url specific data by calling SetupUrl.
 // If we don't have a connection yet, we open the connection. Finally, we signal the
 // url to run monitor to let the imap main thread loop process the current url (it is waiting
 // on this monitor). There is a contract that the imap thread has already been started b4 we
 // attempt to load a url....
@@ -2083,17 +2083,17 @@ NS_IMETHODIMP nsImapProtocol::LoadImapUr
   {
 #ifdef DEBUG_bienvenu
     nsCAutoString urlSpec;
     aURL->GetSpec(urlSpec);
     printf("loading url %s\n", urlSpec.get());
 #endif
     if (TryToRunUrlLocally(aURL, aConsumer))
       return NS_OK;
-    m_urlInProgress = PR_TRUE;
+    m_urlInProgress = true;
     m_imapMailFolderSink = nsnull;
     rv = SetupWithUrl(aURL, aConsumer);
     NS_ASSERTION(NS_SUCCEEDED(rv), "error setting up imap url");
     if (NS_FAILED(rv))
       return rv;
 
     SetupSinkProxy(); // generate proxies for all of the event sinks in the url
     m_lastActiveTime = PR_Now();
@@ -2116,51 +2116,51 @@ NS_IMETHODIMP nsImapProtocol::LoadImapUr
       // if we're running a select or delete all, do a noop first.
       // this should really be in the connection cache code when we know
       // we're pulling out a selected state connection, but maybe we
       // can get away with this.
       m_needNoop = (imapAction == nsIImapUrl::nsImapSelectFolder || imapAction == nsIImapUrl::nsImapDeleteAllMsgs);
 
       // We now have a url to run so signal the monitor for url ready to be processed...
       ReentrantMonitorAutoEnter urlReadyMon(m_urlReadyToRunMonitor);
-      m_nextUrlReadyToRun = PR_TRUE;
+      m_nextUrlReadyToRun = true;
       urlReadyMon.Notify();
 
     } // if we have an imap url and a transport
     else
-      NS_ASSERTION(PR_FALSE, "missing channel or running url");
+      NS_ASSERTION(false, "missing channel or running url");
 
   } // if we received a url!
 
   return rv;
 }
 
 NS_IMETHODIMP nsImapProtocol::IsBusy(bool *aIsConnectionBusy,
                                      bool *isInboxConnection)
 {
   if (!aIsConnectionBusy || !isInboxConnection)
     return NS_ERROR_NULL_POINTER;
   nsresult rv = NS_OK;
-  *aIsConnectionBusy = PR_FALSE;
-  *isInboxConnection = PR_FALSE;
+  *aIsConnectionBusy = false;
+  *isInboxConnection = false;
   if (!m_transport)
   {
     // this connection might not be fully set up yet.
     rv = NS_ERROR_FAILURE;
   }
   else
   {
     if (m_urlInProgress) // do we have a url? That means we're working on it...
-      *aIsConnectionBusy = PR_TRUE;
+      *aIsConnectionBusy = true;
 
     if (GetServerStateParser().GetIMAPstate() ==
         nsImapServerResponseParser::kFolderSelected && GetServerStateParser().GetSelectedMailboxName() &&
         PL_strcasecmp(GetServerStateParser().GetSelectedMailboxName(),
                       "Inbox") == 0)
-      *isInboxConnection = PR_TRUE;
+      *isInboxConnection = true;
 
   }
   return rv;
 }
 
 #define IS_SUBSCRIPTION_RELATED_ACTION(action) (action == nsIImapUrl::nsImapSubscribe\
 || action == nsIImapUrl::nsImapUnsubscribe || action == nsIImapUrl::nsImapDiscoverAllBoxesUrl || action == nsIImapUrl::nsImapListFolder)
 
@@ -2172,18 +2172,18 @@ NS_IMETHODIMP nsImapProtocol::CanHandleU
                                            bool * aCanRunUrl,
                                            bool * hasToWait)
 {
   if (!aCanRunUrl || !hasToWait || !aImapUrl)
     return NS_ERROR_NULL_POINTER;
   nsresult rv = NS_OK;
   MutexAutoLock mon(mLock);
 
-  *aCanRunUrl = PR_FALSE; // assume guilty until proven otherwise...
-  *hasToWait = PR_FALSE;
+  *aCanRunUrl = false; // assume guilty until proven otherwise...
+  *hasToWait = false;
 
   if (DeathSignalReceived())
     return NS_ERROR_FAILURE;
 
   bool isBusy = false;
   bool isInboxConnection = false;
 
   if (!m_transport)
@@ -2195,17 +2195,17 @@ NS_IMETHODIMP nsImapProtocol::CanHandleU
   {
     bool isAlive;
     rv = m_transport->IsAlive(&isAlive);
     // if the transport is not alive, and we've ever sent a command with this connection, kill it.
     // otherwise, we've probably just not finished setting it so don't kill it!
     if (NS_FAILED(rv) || !isAlive)
     {
       MutexAutoUnlock unlock(mLock); // TellThreadToDie gets the lock
-      TellThreadToDie(PR_FALSE);
+      TellThreadToDie(false);
       return NS_ERROR_FAILURE;
     }
   }
   IsBusy(&isBusy, &isInboxConnection);
   bool inSelectedState = GetServerStateParser().GetIMAPstate() ==
     nsImapServerResponseParser::kFolderSelected;
 
   nsCAutoString curSelectedUrlFolderName;
@@ -2220,17 +2220,17 @@ NS_IMETHODIMP nsImapProtocol::CanHandleU
     if (m_runningUrl)
     {
       m_runningUrl->GetRequiredImapState(&curUrlImapState);
       if (curUrlImapState == nsIImapUrl::nsImapSelectedState)
       {
         char *folderName = GetFolderPathString();
         if (!curSelectedUrlFolderName.Equals(folderName))
           pendingUrlFolderName.Assign(folderName);
-        inSelectedState = PR_TRUE;
+        inSelectedState = true;
         PR_Free(folderName);
       }
     }
   }
 
   nsImapState imapState;
   nsImapAction actionForProposedUrl;
   aImapUrl->GetImapAction(&actionForProposedUrl);
@@ -2296,19 +2296,19 @@ NS_IMETHODIMP nsImapProtocol::CanHandleU
                   PL_strcasecmp(pendingUrlFolderName.get(),
                   folderNameForProposedUrl) == 0 :
                 PL_strcmp(pendingUrlFolderName.get(),
                   folderNameForProposedUrl) == 0;
               }
               if (matched)
               {
                 if (isBusy)
-                  *hasToWait = PR_TRUE;
+                  *hasToWait = true;
                 else
-                  *aCanRunUrl = PR_TRUE;
+                  *aCanRunUrl = true;
               }
             }
           }
 #ifdef DEBUG_bienvenu1
           printf("proposed url = %s folder for connection %s has To Wait = %s can run = %s\n",
             folderNameForProposedUrl, curUrlFolderName.get(),
             (*hasToWait) ? "TRUE" : "FALSE", (*aCanRunUrl) ? "TRUE" : "FALSE");
 #endif
@@ -2327,25 +2327,25 @@ NS_IMETHODIMP nsImapProtocol::CanHandleU
         // just use whatever free connection it can find, which is what we want.
         if (IS_SUBSCRIPTION_RELATED_ACTION(actionForProposedUrl))
         {
           if (isBusy && m_runningUrl)
           {
             m_runningUrl->GetImapAction(&actionForRunningUrl);
             if (IS_SUBSCRIPTION_RELATED_ACTION(actionForRunningUrl))
             {
-              *aCanRunUrl = PR_FALSE;
-              *hasToWait = PR_TRUE;
+              *aCanRunUrl = false;
+              *hasToWait = true;
             }
           }
         }
         else
         {
           if (!isBusy)
-            *aCanRunUrl = PR_TRUE;
+            *aCanRunUrl = true;
         }
       }
     }
   }
   return rv;
 }
 
 
@@ -2387,56 +2387,56 @@ void nsImapProtocol::ProcessSelectedStat
       if (GetServerStateParser().GetSelectedMailboxName() &&
         PL_strcmp(GetServerStateParser().GetSelectedMailboxName(),
         mailboxName.get()))
       {       // we are selected in another folder
         if (m_closeNeededBeforeSelect)
           Close();
         if (GetServerStateParser().LastCommandSuccessful())
         {
-          selectIssued = PR_TRUE;
+          selectIssued = true;
           AutoSubscribeToMailboxIfNecessary(mailboxName.get());
           SelectMailbox(mailboxName.get());
         }
       }
       else if (!GetServerStateParser().GetSelectedMailboxName())
       {       // why are we in the selected state with no box name?
         SelectMailbox(mailboxName.get());
-        selectIssued = PR_TRUE;
+        selectIssued = true;
       }
       else if (moreHeadersToDownload && m_imapMailFolderSink) // we need to fetch older headers
       {
         nsMsgKey *msgIdList = nsnull;
         PRUint32 msgCount = 0;
         bool more;
         m_imapMailFolderSink->GetMsgHdrsToDownload(&more, &m_progressCount,
                                                    &msgCount, &msgIdList);
         if (msgIdList)
         {
           FolderHeaderDump(msgIdList, msgCount);
           NS_Free(msgIdList);
           m_runningUrl->SetMoreHeadersToDownload(more);
           // We're going to be re-running this url.
           if (more)
-            m_runningUrl->SetRerunningUrl(PR_TRUE);
+            m_runningUrl->SetRerunningUrl(true);
         }
         HeaderFetchCompleted();
       }
       else
       {
         // get new message counts, if any, from server
         if (m_needNoop)
         {
           m_noopCount++;
           if ((gPromoteNoopToCheckCount > 0 && (m_noopCount % gPromoteNoopToCheckCount) == 0) ||
             CheckNeeded())
             Check();
           else
             Noop(); // I think this is needed when we're using a cached connection
-          m_needNoop = PR_FALSE;
+          m_needNoop = false;
         }
       }
     }
     else
     {
       // go to selected state
       AutoSubscribeToMailboxIfNecessary(mailboxName.get());
       SelectMailbox(mailboxName.get());
@@ -2488,17 +2488,17 @@ void nsImapProtocol::ProcessSelectedStat
       }
       switch (m_imapAction)
       {
       case nsIImapUrl::nsImapLiteSelectFolder:
         if (GetServerStateParser().LastCommandSuccessful() &&
             m_imapMailFolderSink && !moreHeadersToDownload)
         {
           m_imapMailFolderSink->SetUidValidity(GetServerStateParser().FolderUID());
-          ProcessMailboxUpdate(PR_FALSE); // handle uidvalidity change
+          ProcessMailboxUpdate(false); // handle uidvalidity change
         }
         break;
       case nsIImapUrl::nsImapSaveMessageToDisk:
       case nsIImapUrl::nsImapMsgFetch:
       case nsIImapUrl::nsImapMsgFetchPeek:
       case nsIImapUrl::nsImapMsgDownloadForOffline:
       case nsIImapUrl::nsImapMsgPreview:
         {
@@ -2570,17 +2570,17 @@ void nsImapProtocol::ProcessSelectedStat
                   GetServerStateParser().SetCurrentResponseUID((PRUint32)atoi(messageIdString.get()));
                   foundShell->Generate(imappart);
                   GetServerStateParser().UseCachedShell(NULL);
                 }
               }
               else
               {
                 // Message IDs are not UIDs.
-                NS_ASSERTION(PR_FALSE, "message ids aren't uids");
+                NS_ASSERTION(false, "message ids aren't uids");
               }
               PR_Free(imappart);
             }
             else
             {
               // downloading a single message: try to do it by bodystructure, and/or do it by chunks
               PRUint32 messageSize = GetMessageSize(messageIdString.get(), bMessageIdsAreUids);
               // We need to check the format_out bits to see if we are allowed to leave out parts,
@@ -2607,21 +2607,21 @@ void nsImapProtocol::ProcessSelectedStat
                 nsRefPtr<nsIMAPBodyShell> foundShell;
                 IMAP_ContentModifiedType modType = GetShowAttachmentsInline() ?
                   IMAP_CONTENT_MODIFIED_VIEW_INLINE :
                   IMAP_CONTENT_MODIFIED_VIEW_AS_LINKS ;
 
                 bool wasStoringMsgOffline;
                 m_runningUrl->GetStoreResultsOffline(&wasStoringMsgOffline);
                 m_runningUrl->SetStoreOfflineOnFallback(wasStoringMsgOffline);
-                m_runningUrl->SetStoreResultsOffline(PR_FALSE);
+                m_runningUrl->SetStoreResultsOffline(false);
                 nsCOMPtr<nsIMsgMailNewsUrl> mailurl = do_QueryInterface(m_runningUrl);
                 if (mailurl)
                 {
-                  mailurl->SetAddToMemoryCache(PR_FALSE);
+                  mailurl->SetAddToMemoryCache(false);
                   // need to proxy this over to the ui thread
                   if (m_imapMessageSink)
                     m_imapMessageSink->SetImageCacheSessionForUrl(mailurl);
 
                 }
                 SetContentModified(modType);  // This will be looked at by the cache
                 if (bMessageIdsAreUids)
                 {
@@ -2645,17 +2645,17 @@ void nsImapProtocol::ProcessSelectedStat
                   Bodystructure(messageIdString, bMessageIdsAreUids);
               }
               else
               {
                 // Not doing bodystructure.  Fetch the whole thing, and try to do
                 // it in chunks.
                 SetContentModified(IMAP_CONTENT_NOT_MODIFIED);
                 FetchTryChunking(messageIdString, whatToFetch,
-                  bMessageIdsAreUids, NULL, messageSize, PR_TRUE);
+                  bMessageIdsAreUids, NULL, messageSize, true);
               }
             }
             if (GetServerStateParser().LastCommandSuccessful()
                 && m_imapAction != nsIImapUrl::nsImapMsgPreview
                 && m_imapAction != nsIImapUrl::nsImapMsgFetchPeek)
             {
               PRUint32 uid = atoi(messageIdString.get()); 
               PRInt32 index;
@@ -2671,17 +2671,17 @@ void nsImapProtocol::ProcessSelectedStat
         }
         break;
       case nsIImapUrl::nsImapExpungeFolder:
         Expunge();
         // note fall through to next cases.
       case nsIImapUrl::nsImapSelectFolder:
       case nsIImapUrl::nsImapSelectNoopFolder:
         if (!moreHeadersToDownload)
-          ProcessMailboxUpdate(PR_TRUE);
+          ProcessMailboxUpdate(true);
         break;
       case nsIImapUrl::nsImapMsgHeader:
         {
           nsCString messageIds;
           m_runningUrl->GetListOfMessageIds(messageIds);
 
           FetchMessage(messageIds,
             kHeadersRFC822andUid);
@@ -2733,24 +2733,24 @@ void nsImapProtocol::ProcessSelectedStat
           m_runningUrl->GetListOfMessageIds(messageIdString);
           m_runningUrl->GetCustomAddFlags(addFlags);
           m_runningUrl->GetCustomSubtractFlags(subtractFlags);
           if (!addFlags.IsEmpty())
           {
             nsCAutoString storeString("+FLAGS (");
             storeString.Append(addFlags);
             storeString.Append(")");
-            Store(messageIdString, storeString.get(), PR_TRUE);
+            Store(messageIdString, storeString.get(), true);
           }
           if (!subtractFlags.IsEmpty())
           {
             nsCAutoString storeString("-FLAGS (");
             storeString.Append(subtractFlags);
             storeString.Append(")");
-            Store(messageIdString, storeString.get(), PR_TRUE);
+            Store(messageIdString, storeString.get(), true);
           }
         }
         break;
       case nsIImapUrl::nsImapDeleteMsg:
         {
           nsCString messageIdString;
           m_runningUrl->GetListOfMessageIds(messageIdString);
           
@@ -2771,33 +2771,33 @@ void nsImapProtocol::ProcessSelectedStat
               if (selectedMailboxName)
               {
                 m_runningUrl->AllocateCanonicalPath(selectedMailboxName,
                   kOnlineHierarchySeparatorUnknown, &canonicalName);
               }
             }
 
             if (m_imapMessageSink)
-              m_imapMessageSink->NotifyMessageDeleted(canonicalName, PR_FALSE, messageIdString.get());
+              m_imapMessageSink->NotifyMessageDeleted(canonicalName, false, messageIdString.get());
             // notice we don't wait for this to finish...
           }
           else
             HandleMemoryFailure();
         }
         break;
       case nsIImapUrl::nsImapDeleteFolderAndMsgs:
         DeleteFolderAndMsgs(mailboxName.get());
         break;
       case nsIImapUrl::nsImapDeleteAllMsgs:
         {
           uint32 numberOfMessages = GetServerStateParser().NumberOfMessages();
           if (numberOfMessages)
           {
             Store(NS_LITERAL_CSTRING("1:*"), "+FLAGS.SILENT (\\Deleted)",
-              PR_FALSE);  // use sequence #'s  
+              false);  // use sequence #'s  
             
             if (GetServerStateParser().LastCommandSuccessful())
               Expunge();      // expunge messages with deleted flag
             if (GetServerStateParser().LastCommandSuccessful())
             {
               // convert name back from utf7
               utf_name_struct *nameStruct = (utf_name_struct *) PR_Malloc(sizeof(utf_name_struct));
               char *canonicalName = NULL;
@@ -2807,17 +2807,17 @@ void nsImapProtocol::ProcessSelectedStat
                 if (selectedMailboxName )
                 {
                   m_runningUrl->AllocateCanonicalPath(selectedMailboxName,
                     kOnlineHierarchySeparatorUnknown, &canonicalName);
                 }
               }
 
               if (m_imapMessageSink)
-                m_imapMessageSink->NotifyMessageDeleted(canonicalName, PR_TRUE, nsnull);
+                m_imapMessageSink->NotifyMessageDeleted(canonicalName, true, nsnull);
             }
 
           }
           bool deleteSelf = false;
           DeleteSubFolders(mailboxName.get(), deleteSelf);	// don't delete self
         }
         break;
       case nsIImapUrl::nsImapAppendDraftFromFile:
@@ -2826,37 +2826,37 @@ void nsImapProtocol::ProcessSelectedStat
         }
         break;
       case nsIImapUrl::nsImapAddMsgFlags:
         {
           nsCString messageIdString;
           m_runningUrl->GetListOfMessageIds(messageIdString);
 
           ProcessStoreFlags(messageIdString, bMessageIdsAreUids,
-            msgFlags, PR_TRUE);
+            msgFlags, true);
         }
         break;
       case nsIImapUrl::nsImapSubtractMsgFlags:
         {
           nsCString messageIdString;
           m_runningUrl->GetListOfMessageIds(messageIdString);
 
           ProcessStoreFlags(messageIdString, bMessageIdsAreUids,
-            msgFlags, PR_FALSE);
+            msgFlags, false);
         }
         break;
       case nsIImapUrl::nsImapSetMsgFlags:
         {
           nsCString messageIdString;
           m_runningUrl->GetListOfMessageIds(messageIdString);
 
           ProcessStoreFlags(messageIdString, bMessageIdsAreUids,
-            msgFlags, PR_TRUE);
+            msgFlags, true);
           ProcessStoreFlags(messageIdString, bMessageIdsAreUids,
-            ~msgFlags, PR_FALSE);
+            ~msgFlags, false);
         }
         break;
       case nsIImapUrl::nsImapBiff:
         PeriodicBiff();
         break;
       case nsIImapUrl::nsImapOnlineCopy:
       case nsIImapUrl::nsImapOnlineMove:
         {
@@ -2955,32 +2955,32 @@ void nsImapProtocol::ProcessSelectedStat
             }
           }
           else
             HandleMemoryFailure();
         }
         break;
       default:
         if (GetServerStateParser().LastCommandSuccessful() && !uidValidityOk)
-          ProcessMailboxUpdate(PR_FALSE); // handle uidvalidity change
+          ProcessMailboxUpdate(false); // handle uidvalidity change
         break;
     }
    }
   }
   else if (!DeathSignalReceived())
     HandleMemoryFailure();
 }
 
 void nsImapProtocol::AutoSubscribeToMailboxIfNecessary(const char *mailboxName)
 {
 #ifdef HAVE_PORT
   if (m_folderNeedsSubscribing)  // we don't know about this folder - we need to subscribe to it / list it.
   {
     fHierarchyNameState = kListingForInfoOnly;
-    List(mailboxName, PR_FALSE);
+    List(mailboxName, false);
     fHierarchyNameState = kNoOperationInProgress;
 
     // removing and freeing it as we go.
     TIMAPMailboxInfo *mb = NULL;
     int total = XP_ListCount(fListedMailboxList);
     do
     {
       mb = (TIMAPMailboxInfo *) XP_ListRemoveTopObject(fListedMailboxList);
@@ -2989,48 +2989,48 @@ void nsImapProtocol::AutoSubscribeToMail
 
     // if the mailbox exists (it was returned from the LIST response)
     if (total > 0)
     {
       // Subscribe to it, if the pref says so
       if (TIMAPHostInfo::GetHostIsUsingSubscription(fCurrentUrl->GetUrlHost()) && m_autoSubscribeOnOpen)
       {
         XP_Bool lastReportingErrors = GetServerStateParser().GetReportingErrors();
-        GetServerStateParser().SetReportingErrors(PR_FALSE);
+        GetServerStateParser().SetReportingErrors(false);
         Subscribe(mailboxName);
         GetServerStateParser().SetReportingErrors(lastReportingErrors);
       }
 
       // Always LIST it anyway, to get it into the folder lists,
       // so that we can continue to perform operations on it, at least
       // for this session.
       fHierarchyNameState = kNoOperationInProgress;
-      List(mailboxName, PR_FALSE);
+      List(mailboxName, false);
     }
 
     // We should now be subscribed to it, and have it in our folder lists
     // and panes.  Even if something failed, we don't want to try this again.
-    m_folderNeedsSubscribing = PR_FALSE;
+    m_folderNeedsSubscribing = false;
 
   }
 #endif
 }
 
 nsresult nsImapProtocol::BeginMessageDownLoad(
                                               PRUint32 total_message_size, // for user, headers and body
                                               const char *content_type)
 {
   nsresult rv = NS_OK;
   char *sizeString = PR_smprintf("OPEN Size: %ld", total_message_size);
   Log("STREAM",sizeString,"Begin Message Download Stream");
   PR_Free(sizeString);
   //total_message_size));
   if (content_type)
   {
-    m_fromHeaderSeen = PR_FALSE;
+    m_fromHeaderSeen = false;
     if (GetServerStateParser().GetDownloadingHeaders())
     {
       // if we get multiple calls to BeginMessageDownload w/o intervening
       // calls to NormalEndMessageDownload or Abort, then we're just
       // going to fake a NormalMessageEndDownload. This will most likely
       // cause an empty header to get written to the db, and the user
       // will have to delete the empty header themselves, which
       // should remove the message from the server as well.
@@ -3047,17 +3047,17 @@ nsresult nsImapProtocol::BeginMessageDow
     // and they will read it out of the other end.
     else if (m_channelListener)
     {
       // create a pipe to pump the message into...the output will go to whoever
       // is consuming the message display
       // we create an "infinite" pipe in case we get extremely long lines from the imap server,
       // and the consumer is waiting for a whole line
       nsCOMPtr<nsIPipe> pipe = do_CreateInstance("@mozilla.org/pipe;1");
-      rv = pipe->Init(PR_FALSE, PR_FALSE, 4096, PR_UINT32_MAX, nsnull);
+      rv = pipe->Init(false, false, 4096, PR_UINT32_MAX, nsnull);
       NS_ASSERTION(NS_SUCCEEDED(rv), "nsIPipe->Init failed!");
 
       pipe->GetInputStream(getter_AddRefs(m_channelInputStream));
       pipe->GetOutputStream(getter_AddRefs(m_channelOutputStream));
     }
     // else, if we are saving the message to disk!
     else if (m_imapMessageSink /* && m_imapAction == nsIImapUrl::nsImapSaveMessageToDisk */)
     {
@@ -3108,17 +3108,17 @@ void
 nsImapProtocol::AdjustChunkSize()
 {
   PRTime deltaTime;
   PRInt32 deltaInSeconds;
 
   m_endTime = PR_Now();
   LL_SUB(deltaTime, m_endTime, m_startTime);
   PRTime2Seconds(deltaTime, &deltaInSeconds);
-  m_trackingTime = PR_FALSE;
+  m_trackingTime = false;
   if (deltaInSeconds < 0)
     return;            // bogus for some reason
 
   if (deltaInSeconds <= m_tooFastTime && m_curFetchSize >= m_chunkSize)
   {
     m_chunkSize += m_chunkAddSize;
     m_chunkThreshold = m_chunkSize + (m_chunkSize / 2);
     // we used to have a max for the chunk size - I don't think that's needed.
@@ -3133,17 +3133,17 @@ nsImapProtocol::AdjustChunkSize()
       m_chunkSize -= m_chunkAddSize;
     m_chunkThreshold = m_chunkSize + (m_chunkSize / 2);
   }
   // remember these new values globally so new connections
   // can take advantage of them.
   if (gChunkSize != m_chunkSize)
   {
     // will cause chunk size pref to be written in CloseStream.
-    gChunkSizeDirty = PR_TRUE;
+    gChunkSizeDirty = true;
     gChunkSize = m_chunkSize;
     gChunkThreshold = m_chunkThreshold;
   }
 }
 
 // authenticated state commands
 
 // escape any backslashes or quotes.  Backslashes are used a lot with our NT server
@@ -3158,17 +3158,17 @@ void nsImapProtocol::CreateEscapedMailbo
       escapedName.Insert('\\', strIndex++);
   }
 }
 void nsImapProtocol::SelectMailbox(const char *mailboxName)
 {
   ProgressEventFunctionUsingIdWithString (IMAP_STATUS_SELECTING_MAILBOX, mailboxName);
   IncrementCommandTagNumber();
 
-  m_closeNeededBeforeSelect = PR_FALSE;   // initial value
+  m_closeNeededBeforeSelect = false;   // initial value
   GetServerStateParser().ResetFlagInfo();
   nsCString escapedName;
   CreateEscapedMailboxName(mailboxName, escapedName);
   nsCString commandBuffer(GetServerCommandTag());
   commandBuffer.Append(" select \"");
   commandBuffer.Append(escapedName.get());
   commandBuffer.Append("\"");
   if (UseCondStore())
@@ -3187,17 +3187,17 @@ void nsImapProtocol::SelectMailbox(const
   // if we've selected a mailbox, and we're not going to do an update because of the
   // url type, but don't have the flags, go get them!
   if (GetServerStateParser().LastCommandSuccessful() && NS_SUCCEEDED(res) &&
     imapAction != nsIImapUrl::nsImapSelectFolder && imapAction != nsIImapUrl::nsImapExpungeFolder
     && imapAction != nsIImapUrl::nsImapLiteSelectFolder &&
     imapAction != nsIImapUrl::nsImapDeleteAllMsgs &&
     ((GetServerStateParser().NumberOfMessages() != numOfMessagesInFlagState) && (numOfMessagesInFlagState == 0)))
   {
-      ProcessMailboxUpdate(PR_FALSE);
+      ProcessMailboxUpdate(false);
   }
 }
 
 // Please call only with a single message ID
 void nsImapProtocol::Bodystructure(const nsCString &messageId, bool idIsUid)
 {
   IncrementCommandTagNumber();
 
@@ -3249,17 +3249,17 @@ void nsImapProtocol::PipelinedFetchMessa
         }
         else
         {
           // headers for the top-level message
           stringToFetch.Append("BODY.PEEK[HEADER]");
         }
         break;
       default:
-        NS_ASSERTION(PR_FALSE, "we should only be pipelining MIME headers and Message headers");
+        NS_ASSERTION(false, "we should only be pipelining MIME headers and Message headers");
         break;
       }
 
     }
     currentPartNum++;
   }
 
   // Run the single, pipelined fetch command
@@ -3289,35 +3289,35 @@ void nsImapProtocol::FetchMsgAttribute(c
     commandString.Append(messageIds);
     commandString.Append(" (");
     commandString.Append(attribute);
     commandString.Append(")"CRLF);
     nsresult rv = SendData(commandString.get());
 
     if (NS_SUCCEEDED(rv))
        ParseIMAPandCheckForNewMail(commandString.get());
-    GetServerStateParser().SetFetchingFlags(PR_FALSE);
-    GetServerStateParser().SetFetchingEverythingRFC822(PR_FALSE); // always clear this flag after every fetch....
+    GetServerStateParser().SetFetchingFlags(false);
+    GetServerStateParser().SetFetchingEverythingRFC822(false); // always clear this flag after every fetch....
 }
 
 // this routine is used to fetch a message or messages, or headers for a
 // message...
 
 void nsImapProtocol::FallbackToFetchWholeMsg(const nsCString &messageId, PRUint32 messageSize)
 {
   if (m_imapMessageSink && m_runningUrl)
   {
     bool shouldStoreMsgOffline;
     m_runningUrl->GetStoreOfflineOnFallback(&shouldStoreMsgOffline);
     m_runningUrl->SetStoreResultsOffline(shouldStoreMsgOffline);
   }
   FetchTryChunking(messageId,
                    m_imapAction == nsIImapUrl::nsImapMsgFetchPeek ?
                      kEveryThingRFC822Peek : kEveryThingRFC822,
-                   PR_TRUE, nsnull, messageSize, PR_TRUE);
+                   true, nsnull, messageSize, true);
 }
 
 void
 nsImapProtocol::FetchMessage(const nsCString &messageIds, 
                              nsIMAPeFetchFields whatToFetch,
                              const char *fetchModifier,
                              PRUint32 startByte, PRUint32 numBytes,
                              char *part)
@@ -3325,21 +3325,21 @@ nsImapProtocol::FetchMessage(const nsCSt
   IncrementCommandTagNumber();
 
   nsCString commandString;
   commandString = "%s UID fetch";
 
   switch (whatToFetch) {
   case kEveryThingRFC822:
     m_flagChangeCount++;
-    GetServerStateParser().SetFetchingEverythingRFC822(PR_TRUE);
+    GetServerStateParser().SetFetchingEverythingRFC822(true);
     if (m_trackingTime)
       AdjustChunkSize();      // we started another segment
     m_startTime = PR_Now();     // save start of download time
-    m_trackingTime = PR_TRUE;
+    m_trackingTime = true;
     if (numBytes > 0)
       m_curFetchSize = numBytes;
 
     if (GetServerStateParser().ServerHasIMAP4Rev1Capability())
     {
       if (GetServerStateParser().GetCapabilityFlag() & kHasXSenderCapability)
         commandString.Append(" %s (XSENDER UID RFC822.SIZE BODY[]");
       else
@@ -3366,17 +3366,17 @@ nsImapProtocol::FetchMessage(const nsCSt
 
     break;
 
   case kEveryThingRFC822Peek:
     {
       const char *formatString = "";
       PRUint32 server_capabilityFlags = GetServerStateParser().GetCapabilityFlag();
 
-      GetServerStateParser().SetFetchingEverythingRFC822(PR_TRUE);
+      GetServerStateParser().SetFetchingEverythingRFC822(true);
       if (server_capabilityFlags & kIMAP4rev1Capability)
       {
         // use body[].peek since rfc822.peek is not in IMAP4rev1
         if (server_capabilityFlags & kHasXSenderCapability)
           formatString = " %s (XSENDER UID RFC822.SIZE BODY.PEEK[]";
         else
           formatString = " %s (UID RFC822.SIZE BODY.PEEK[]";
       }
@@ -3458,17 +3458,17 @@ nsImapProtocol::FetchMessage(const nsCSt
     }
     else
       commandString.Append(" %s (UID RFC822.SIZE RFC822.HEADER FLAGS)");
     break;
   case kUid:
     commandString.Append(" %s (UID)");
     break;
   case kFlags:
-    GetServerStateParser().SetFetchingFlags(PR_TRUE);
+    GetServerStateParser().SetFetchingFlags(true);
     commandString.Append(" %s (FLAGS)");
     break;
   case kRFC822Size:
     commandString.Append(" %s (RFC822.SIZE)");
     break;
   case kBodyStart:
     {
       PRInt32 numBytesToFetch;
@@ -3556,18 +3556,18 @@ nsImapProtocol::FetchMessage(const nsCSt
     }
 
     nsresult rv = SendData(protocolString);
 
     nsMemory::Free(cCommandStr);
     if (NS_SUCCEEDED(rv))
       ParseIMAPandCheckForNewMail(protocolString);
     PR_Free(protocolString);
-    GetServerStateParser().SetFetchingFlags(PR_FALSE);
-    GetServerStateParser().SetFetchingEverythingRFC822(PR_FALSE); // always clear this flag after every fetch....
+    GetServerStateParser().SetFetchingFlags(false);
+    GetServerStateParser().SetFetchingEverythingRFC822(false); // always clear this flag after every fetch....
     if (GetServerStateParser().LastCommandSuccessful() && CheckNeeded())
       Check();
   }
   else
     HandleMemoryFailure();
 }
 
 void nsImapProtocol::FetchTryChunking(const nsCString &messageIds,
@@ -3611,17 +3611,17 @@ void nsImapProtocol::FetchTryChunking(co
     // Otherwise, let the body shell abort the stream.
     if ((whatToFetch == kEveryThingRFC822)
       &&
       ((startByte > 0 && (startByte < downloadSize) &&
       (DeathSignalReceived() || GetPseudoInterrupted())) ||
       !GetServerStateParser().ContinueParse()))
     {
       AbortMessageDownLoad();
-      PseudoInterrupt(PR_FALSE);
+      PseudoInterrupt(false);
     }
   }
   else
   {
     // small message, or (we're not chunking and not doing bodystructure),
     // or the server is not rev1.
     // Just fetch the whole thing.
     FetchMessage(messageIds, whatToFetch, nsnull, 0, 0, part);
@@ -3666,17 +3666,17 @@ void nsImapProtocol::PipelinedFetchMessa
         }
         else
         {
           // headers for the top-level message
           stringToFetch += "BODY.PEEK[HEADER]";
         }
         break;
       default:
-        NS_ASSERTION(PR_FALSE, "we should only be pipelining MIME headers and Message headers");
+        NS_ASSERTION(false, "we should only be pipelining MIME headers and Message headers");
         break;
       }
 
     }
     currentPartNum++;
   }
 
   // Run the single, pipelined fetch command
@@ -3865,25 +3865,25 @@ void nsImapProtocol::HandleMessageDownLo
   NS_ASSERTION(lineLength == PL_strlen(messageLine), "lineLength not accurate");
 
   // check if sender obtained via XSENDER server extension matches "From:" field
   const char *xSenderInfo = GetServerStateParser().GetXSenderInfo();
   if (xSenderInfo && *xSenderInfo && !m_fromHeaderSeen)
   {
     if (!PL_strncmp("From: ", messageLine, 6))
     {
-      m_fromHeaderSeen = PR_TRUE;
+      m_fromHeaderSeen = true;
       if (PL_strstr(messageLine, xSenderInfo) != NULL)
           // Adding a X-Mozilla-Status line here is not very elegant but it
           // works.  Another X-Mozilla-Status line is added to the message when
           // downloading to a local folder; this new line will also contain the
           // 'authed' flag we are adding here.  (If the message is again
           // uploaded to the server, this flag is lost.)
           // 0x0200 == nsMsgMessageFlags::SenderAuthed
-          HandleMessageDownLoadLine("X-Mozilla-Status: 0200\r\n", PR_FALSE);
+          HandleMessageDownLoadLine("X-Mozilla-Status: 0200\r\n", false);
       GetServerStateParser().FreeXSenderInfo();
     }
   }
 
   if (GetServerStateParser().GetDownloadingHeaders())
   {
     if (!m_curHdrInfo)
       BeginMessageDownLoad(GetServerStateParser().SizeOfMostRecentMessage(), MESSAGE_RFC822);
@@ -4013,21 +4013,21 @@ void nsImapProtocol::ProcessMailboxUpdat
       undoIds.Assign(undoIdsStr);
       if (!undoIds.IsEmpty())
       {
         char firstChar = (char) undoIds.CharAt(0);
         undoIds.Cut(0, 1);  // remove first character
         // if this string started with a '-', then this is an undo of a delete
         // if its a '+' its a redo
         if (firstChar == '-')
-          Store(undoIds, "-FLAGS (\\Deleted)", PR_TRUE);  // most servers will fail silently on a failure, deal with it?
+          Store(undoIds, "-FLAGS (\\Deleted)", true);  // most servers will fail silently on a failure, deal with it?
         else  if (firstChar == '+')
-          Store(undoIds, "+FLAGS (\\Deleted)", PR_TRUE);  // most servers will fail silently on a failure, deal with it?
+          Store(undoIds, "+FLAGS (\\Deleted)", true);  // most servers will fail silently on a failure, deal with it?
         else 
-          NS_ASSERTION(PR_FALSE, "bogus undo Id's");
+          NS_ASSERTION(false, "bogus undo Id's");
       }
     }
 
     // make the parser record these flags
     nsCString fetchStr;
     PRInt32 added = 0, deleted = 0;
 
     m_flagState->GetNumberOfMessages(&added);
@@ -4050,32 +4050,32 @@ void nsImapProtocol::ProcessMailboxUpdat
     if (needFullFolderSync || needFolderSync)
     {
       nsCString idsToFetch("1:*");
       char fetchModifier[40] = "";
       if (!needFullFolderSync && !GetShowDeletedMessages() && UseCondStore())
         PR_snprintf(fetchModifier, sizeof(fetchModifier), " (CHANGEDSINCE %llu)",
                     mFolderLastModSeq);
       else
-        m_flagState->SetPartialUIDFetch(PR_FALSE);
+        m_flagState->SetPartialUIDFetch(false);
 
       FetchMessage(idsToFetch, kFlags, fetchModifier);
       // lets see if we should expunge during a full sync of flags.
       if (GetServerStateParser().LastCommandSuccessful())
       {
         // if we did a CHANGEDSINCE fetch, do a sanity check on the msg counts
         // to see if some other client may have done an expunge.
         if (m_flagState->GetPartialUIDFetch())
         {
           if (m_flagState->NumberOfDeletedMessages() + 
               mFolderTotalMsgCount != GetServerStateParser().NumberOfMessages())
           {
             // sanity check failed - fall back to full flag sync
             m_flagState->Reset();
-            m_flagState->SetPartialUIDFetch(PR_FALSE);
+            m_flagState->SetPartialUIDFetch(false);
             FetchMessage(NS_LITERAL_CSTRING("1:*"), kFlags);  
           }
         }
         PRInt32 numDeleted = m_flagState->NumberOfDeletedMessages();
         // Don't do expunge when we are lite selecting folder because we
         // could be doing undo.
         // Expunge if we're always expunging, or the number of deleted messages
         // is over the threshhold, and we're either always respecting the
@@ -4101,17 +4101,17 @@ void nsImapProtocol::ProcessMailboxUpdat
       fetchStr.Append(":*");
       FetchMessage(fetchStr, kFlags);      // only new messages please
     }
   }
   else if (GetServerStateParser().LastCommandSuccessful())
   {
     GetServerStateParser().ResetFlagInfo();
     // the flag state is empty, but not partial.
-    m_flagState->SetPartialUIDFetch(PR_FALSE);
+    m_flagState->SetPartialUIDFetch(false);
   }
 
   if (GetServerStateParser().LastCommandSuccessful())
   {
     nsImapAction imapAction;
     nsresult res = m_runningUrl->GetImapAction(&imapAction);
     if (NS_SUCCEEDED(res) && imapAction == nsIImapUrl::nsImapLiteSelectFolder)
       return;
@@ -4125,29 +4125,29 @@ void nsImapProtocol::ProcessMailboxUpdat
   nsImapMailboxSpec *new_spec = GetServerStateParser().CreateCurrentMailboxSpec();
   if (new_spec && GetServerStateParser().LastCommandSuccessful())
   {
     nsImapAction imapAction;
     nsresult res = m_runningUrl->GetImapAction(&imapAction);
     if (NS_SUCCEEDED(res) && imapAction == nsIImapUrl::nsImapExpungeFolder)
       new_spec->mBoxFlags |= kJustExpunged;
     m_waitForBodyIdsMonitor.Enter();
-    entered_waitForBodyIdsMonitor = PR_TRUE;
+    entered_waitForBodyIdsMonitor = true;
 
     if (m_imapMailFolderSink)
     {
       bool more;
       m_imapMailFolderSink->UpdateImapMailboxInfo(this, new_spec);
       m_imapMailFolderSink->GetMsgHdrsToDownload(&more, &m_progressCount,
                                                  &msgCount, &msgIdList);
       m_progressIndex = 0;
       m_runningUrl->SetMoreHeadersToDownload(more);
       // We're going to be re-running this url if there are more headers.
       if (more)
-        m_runningUrl->SetRerunningUrl(PR_TRUE);
+        m_runningUrl->SetRerunningUrl(true);
     }
   }
   else if (!new_spec)
     HandleMemoryFailure();
 
   if (GetServerStateParser().LastCommandSuccessful())
   {
     if (entered_waitForBodyIdsMonitor)
@@ -4170,17 +4170,17 @@ void nsImapProtocol::ProcessMailboxUpdat
   {
     WaitForPotentialListOfBodysToFetch(&msgIdList, msgCount);
     if ( msgCount && GetServerStateParser().LastCommandSuccessful())
     {
       // Tell the url that it should store the msg fetch results offline,
       // while we're dumping the messages, and then restore the setting.
       bool wasStoringOffline;
       m_runningUrl->GetStoreResultsOffline(&wasStoringOffline);
-      m_runningUrl->SetStoreResultsOffline(PR_TRUE);
+      m_runningUrl->SetStoreResultsOffline(true);
       m_progressIndex = 0;
       m_progressCount = msgCount;
       FolderMsgDump(msgIdList, msgCount, kEveryThingRFC822Peek);
       m_runningUrl->SetStoreResultsOffline(wasStoringOffline);
     }
   }
   if (!GetServerStateParser().LastCommandSuccessful())
     GetServerStateParser().ResetFlagInfo();
@@ -4215,33 +4215,33 @@ void nsImapProtocol::FolderMsgDump(PRUin
 
 void nsImapProtocol::WaitForPotentialListOfBodysToFetch(PRUint32 **msgIdList, PRUint32 &msgCount)
 {
   PRIntervalTime sleepTime = kImapSleepTime;
 
   ReentrantMonitorAutoEnter fetchListMon(m_fetchBodyListMonitor);
   while(!m_fetchBodyListIsNew && !DeathSignalReceived())
     fetchListMon.Wait(sleepTime);
-  m_fetchBodyListIsNew = PR_FALSE;
+  m_fetchBodyListIsNew = false;
 
   *msgIdList = m_fetchBodyIdList;
   msgCount   = m_fetchBodyCount;
 }
 
 // libmsg uses this to notify a running imap url about message bodies it should download.
 // why not just have libmsg explicitly download the message bodies?
 NS_IMETHODIMP nsImapProtocol::NotifyBodysToDownload(PRUint32 *keys, PRUint32 keyCount)
 {
   ReentrantMonitorAutoEnter fetchListMon(m_fetchBodyListMonitor);
   PR_FREEIF(m_fetchBodyIdList);
   m_fetchBodyIdList = (PRUint32 *) PR_MALLOC(keyCount * sizeof(PRUint32));
   if (m_fetchBodyIdList)
     memcpy(m_fetchBodyIdList, keys, keyCount * sizeof(PRUint32));
   m_fetchBodyCount    = keyCount;
-  m_fetchBodyListIsNew = PR_TRUE;
+  m_fetchBodyListIsNew = true;
   fetchListMon.Notify();
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapProtocol::GetFlagsForUID(PRUint32 uid, bool *foundIt, imapMessageFlagsType *resultFlags, char **customFlags)
 {
   PRInt32 i;
 
@@ -4621,33 +4621,33 @@ void nsImapProtocol::SetContentModified(
 bool	nsImapProtocol::GetShouldFetchAllParts()
 {
   if (m_runningUrl  && !DeathSignalReceived())
   {
     nsImapContentModifiedType contentModified;
     if (NS_SUCCEEDED(m_runningUrl->GetContentModified(&contentModified)))
       return (contentModified == IMAP_CONTENT_FORCE_CONTENT_NOT_MODIFIED);
   }
-  return PR_TRUE;
+  return true;
 }
 
 PRInt32 nsImapProtocol::OpenTunnel (PRInt32 maxNumberOfBytesToRead)
 {
   return 0;
 }
 
 PRInt32 nsImapProtocol::GetTunnellingThreshold()
 {
   return 0;
 //  return gTunnellingThreshold;
 }
 
 bool nsImapProtocol::GetIOTunnellingEnabled()
 {
-  return PR_FALSE;
+  return false;
 //  return gIOTunnelling;
 }
 
 // Adds a set of rights for a given user on a given mailbox on the current host.
 // if userName is NULL, it means "me," or MYRIGHTS.
 void nsImapProtocol::AddFolderRightsForUser(const char *mailboxName, const char *userName, const char *rights)
 {
   if (!userName)
@@ -4734,18 +4734,18 @@ char* nsImapProtocol::CreateNewLineFromS
             m_runningUrl->GetRerunningUrl(&rerunningUrl);
             m_runningUrl->GetImapAction(&imapAction);
             // don't rerun if we already were rerunning. And don't rerun
             // online move/copies that timeout.
             if (!rerunningUrl && (rv != NS_ERROR_NET_TIMEOUT ||
                                  (imapAction != nsIImapUrl::nsImapOnlineCopy &&
                                   imapAction != nsIImapUrl::nsImapOnlineMove)))
             {
-              m_runningUrl->SetRerunningUrl(PR_TRUE);
-              m_retryUrlOnError = PR_TRUE;
+              m_runningUrl->SetRerunningUrl(true);
+              m_retryUrlOnError = true;
               break;
             }
           }
           if (rv == NS_ERROR_NET_TIMEOUT)
             AlertUserEventUsingId(IMAP_NET_TIMEOUT_ERROR);
           else
             AlertUserEventUsingId(TestFlag(IMAP_RECEIVED_GREETING)
             ? IMAP_SERVER_DISCONNECTED : IMAP_SERVER_DROPPED_CONNECTION);
@@ -4809,17 +4809,17 @@ EMailboxDiscoverStatus nsImapProtocol::G
   ReentrantMonitorAutoEnter mon(m_dataMemberMonitor);
   return m_discoveryStatus;
 }
 
 bool
 nsImapProtocol::GetSubscribingNow()
 {
     // ***** code me *****
-    return PR_FALSE;// ***** for now
+    return false;// ***** for now
 }
 
 void
 nsImapProtocol::DiscoverMailboxSpec(nsImapMailboxSpec * adoptedBoxSpec)
 {
   nsIMAPNamespace *ns = nsnull;
 
   NS_ASSERTION (m_hostSessionList, "fatal null host session list");
@@ -4861,18 +4861,18 @@ nsImapProtocol::DiscoverMailboxSpec(nsIm
     {
       if (ns && nsPrefix) // if no personal namespace, there can be no Trash folder
       {
         bool onlineTrashFolderExists = false;
         if (m_hostSessionList)
         {
           if (adoptedBoxSpec->mBoxFlags & (kImapTrash|kImapXListTrash))
           {
-             m_hostSessionList->SetOnlineTrashFolderExistsForHost(GetImapServerKey(), PR_TRUE);
-             onlineTrashFolderExists = PR_TRUE;
+             m_hostSessionList->SetOnlineTrashFolderExistsForHost(GetImapServerKey(), true);
+             onlineTrashFolderExists = true;
           }
           else
           {
             m_hostSessionList->GetOnlineTrashFolderExistsForHost(
                                   GetImapServerKey(), onlineTrashFolderExists);
           }
         }
 
@@ -4940,17 +4940,17 @@ nsImapProtocol::DiscoverMailboxSpec(nsIm
           {
             SetConnectionStatus(NS_ERROR_FAILURE);
           }
           else if (!adoptedBoxSpec->mAllocatedPathName.IsEmpty() &&
             (GetMailboxDiscoveryStatus() ==
             eListMyChildren) &&
             (!useSubscription || GetSubscribingNow()))
           {
-            NS_ASSERTION (PR_FALSE,
+            NS_ASSERTION (false,
               "we should never get here anymore");
             SetMailboxDiscoveryStatus(eContinue);
           }
           else if (GetMailboxDiscoveryStatus() == eContinueNew)
           {
             if (m_hierarchyNameState ==
               kListingForInfoAndDiscovery &&
               !adoptedBoxSpec->mAllocatedPathName.IsEmpty() &&
@@ -4988,17 +4988,17 @@ nsImapProtocol::DiscoverMailboxSpec(nsIm
       }
       break;
     case kDiscoveringNamespacesOnly:
       {
         NS_IF_RELEASE(adoptedBoxSpec);
       }
       break;
     default:
-      NS_ASSERTION (PR_FALSE, "we aren't supposed to be here");
+      NS_ASSERTION (false, "we aren't supposed to be here");
       break;
   }
 }
 
 void
 nsImapProtocol::AlertUserEventUsingId(PRUint32 aMessageId)
 {
   if (m_imapServerSink)
@@ -5264,17 +5264,17 @@ nsImapProtocol::Expunge()
 
   if (aclFlags && !(aclFlags & IMAP_ACL_EXPUNGE_FLAG))
     return;
   ProgressEventFunctionUsingId (IMAP_STATUS_EXPUNGING_MAILBOX);
 
   if(gCheckDeletedBeforeExpunge)
   {
     GetServerStateParser().ResetSearchResultSequence();
-    Search("SEARCH DELETED", PR_FALSE, PR_FALSE);
+    Search("SEARCH DELETED", false, false);
     if (GetServerStateParser().LastCommandSuccessful())
     {
       nsImapSearchResultIterator *search = GetServerStateParser().CreateSearchResultIterator();
       nsMsgKey key = search->GetNextMessageNumber();
       delete search;
       if (key == 0)
         return;  //no deleted messages to expunge (bug 235004)
     }
@@ -5289,17 +5289,17 @@ nsImapProtocol::Expunge()
     ParseIMAPandCheckForNewMail();
 }
 
 void
 nsImapProtocol::HandleMemoryFailure()
 {
     PR_CEnterMonitor(this);
     // **** jefft fix me!!!!!! ******
-    // m_imapThreadIsRunning = PR_FALSE;
+    // m_imapThreadIsRunning = false;
     // SetConnectionStatus(-1);
     PR_CExitMonitor(this);
 }
 
 void nsImapProtocol::HandleCurrentUrlError()
 {
   // This is to handle a move/copy failing, especially because the user
   // cancelled the password prompt.
@@ -5460,17 +5460,17 @@ void nsImapProtocol::Language()
         return;
 
       command.Append(" LANGUAGE ");
       command.Append(extractedLanguage);
       command.Append(CRLF);
 
       rv = SendData(command.get());
       if (NS_SUCCEEDED(rv))
-        ParseIMAPandCheckForNewMail(nsnull, PR_TRUE /* ignore bad or no result from the server for this command */);
+        ParseIMAPandCheckForNewMail(nsnull, true /* ignore bad or no result from the server for this command */);
     }
   }
 }
 
 void nsImapProtocol::EscapeUserNamePasswordString(const char *strToEscape, nsCString *resultStr)
 {
   if (strToEscape)
   {
@@ -5758,17 +5758,17 @@ nsresult nsImapProtocol::AuthLogin(const
       PR_snprintf(&plainstr[1], 510, "%s", userName);
       len += PL_strlen(userName);
       len++;  // count for second <NUL> char
       PR_snprintf(&plainstr[len], 511-len, "%s", password.get());
       len += password.Length();
       char *base64Str = PL_Base64Encode(plainstr, len, nsnull);
       PR_snprintf(m_dataOutputBuf, OUTPUT_BUFFER_SIZE, "%s" CRLF, base64Str);
       PR_Free(base64Str);
-      rv = SendData(m_dataOutputBuf, PR_TRUE /* suppress logging */);
+      rv = SendData(m_dataOutputBuf, true /* suppress logging */);
       if (NS_SUCCEEDED(rv))
         ParseIMAPandCheckForNewMail(currentCommand);
     } // if the last command succeeded
   } // if auth plain capability
   else if (flag & kHasAuthLoginCapability)
   {
     PR_LOG(IMAP, PR_LOG_DEBUG, ("LOGIN auth"));
     PR_snprintf(m_dataOutputBuf, OUTPUT_BUFFER_SIZE, "%s authenticate login" CRLF, GetServerCommandTag());
@@ -5777,26 +5777,26 @@ nsresult nsImapProtocol::AuthLogin(const
     currentCommand = PL_strdup(m_dataOutputBuf);
     ParseIMAPandCheckForNewMail();
 
     if (GetServerStateParser().LastCommandSuccessful())
     {
       char *base64Str = PL_Base64Encode(userName, PL_strlen(userName), nsnull);
       PR_snprintf(m_dataOutputBuf, OUTPUT_BUFFER_SIZE, "%s" CRLF, base64Str);
       PR_Free(base64Str);
-      rv = SendData(m_dataOutputBuf, PR_TRUE /* suppress logging */);
+      rv = SendData(m_dataOutputBuf, true /* suppress logging */);
       if (NS_SUCCEEDED(rv))
       {
         ParseIMAPandCheckForNewMail(currentCommand);
         if (GetServerStateParser().LastCommandSuccessful())
         {
           base64Str = PL_Base64Encode(password.get(), password.Length(), nsnull);
           PR_snprintf(m_dataOutputBuf, OUTPUT_BUFFER_SIZE, "%s" CRLF, base64Str);
           PR_Free(base64Str);
-          rv = SendData(m_dataOutputBuf, PR_TRUE /* suppress logging */);
+          rv = SendData(m_dataOutputBuf, true /* suppress logging */);
           if (NS_SUCCEEDED(rv))
             ParseIMAPandCheckForNewMail(currentCommand);
         } // if last command successful
       } // if last command successful
     } // if last command successful
   } // if has auth login capability
   else if (flag & kHasAuthOldLoginCapability)
   {
@@ -5811,17 +5811,17 @@ nsresult nsImapProtocol::AuthLogin(const
     command.Append("\" \"");
 
     // if the password contains a \, login will fail
     // turn foo\bar into foo\\bar
     nsCAutoString correctedPassword;
     EscapeUserNamePasswordString(password.get(), &correctedPassword);
     command.Append(correctedPassword);
     command.Append("\""CRLF);
-    rv = SendData(command.get(), PR_TRUE /* suppress logging */);
+    rv = SendData(command.get(), true /* suppress logging */);
     NS_ENSURE_SUCCESS(rv, rv);
     ParseIMAPandCheckForNewMail();
   }
   else if (flag & kHasAuthNoneCapability)
   {
     // TODO What to do? "login <username>" like POP?
     return NS_ERROR_NOT_IMPLEMENTED;
   }
@@ -6079,17 +6079,17 @@ void nsImapProtocol::UploadMessageFromFi
             if (GetServerStateParser().LastCommandSuccessful())
             {
               command = "SEARCH UNDELETED HEADER Message-ID ";
               command.Append(messageId);
 
               // Clean up result sequence before issuing the cmd.
               GetServerStateParser().ResetSearchResultSequence();
 
-              Search(command.get(), PR_TRUE, PR_FALSE);
+              Search(command.get(), true, false);
               if (GetServerStateParser().LastCommandSuccessful())
               {
                 nsMsgKey newkey = nsMsgKey_None;
                 nsImapSearchResultIterator *searchResult =
                   GetServerStateParser().CreateSearchResultIterator();
                 newkey = searchResult->GetNextMessageNumber();
                 delete searchResult;
                 if (newkey != nsMsgKey_None)
@@ -6182,27 +6182,27 @@ char * nsImapProtocol::OnCreateServerDes
 }
 
 void nsImapProtocol::OnCreateFolder(const char * aSourceMailbox)
 {
   bool created = CreateMailboxRespectingSubscriptions(aSourceMailbox);
   if (created)
   {
     m_hierarchyNameState = kListingForCreate;
-    List(aSourceMailbox, PR_FALSE);
+    List(aSourceMailbox, false);
     m_hierarchyNameState = kNoOperationInProgress;
   }
   else
     FolderNotCreated(aSourceMailbox);
 }
 
 void nsImapProtocol::OnEnsureExistsFolder(const char * aSourceMailbox)
 {
 
-  List(aSourceMailbox, PR_FALSE); // how to tell if that succeeded?
+  List(aSourceMailbox, false); // how to tell if that succeeded?
   bool exists = false;
 
   // try converting aSourceMailbox to canonical format
 
   nsIMAPNamespace *nsForMailbox = nsnull;
   m_hostSessionList->GetNamespaceForMailboxForHost(GetImapServerKey(),
                                                      aSourceMailbox, nsForMailbox);
   // NS_ASSERTION (nsForMailbox, "Oops .. null nsForMailbox\n");
@@ -6225,17 +6225,17 @@ void nsImapProtocol::OnEnsureExistsFolde
   {
     Subscribe(aSourceMailbox);
   }
   else
   {
     bool created = CreateMailboxRespectingSubscriptions(aSourceMailbox);
     if (created)
     {
-        List(aSourceMailbox, PR_FALSE);
+        List(aSourceMailbox, false);
     }
   }
   if (!GetServerStateParser().LastCommandSuccessful())
         FolderNotCreated(aSourceMailbox);
 }
 
 
 void nsImapProtocol::OnSubscribe(const char * sourceMailbox)
@@ -6244,31 +6244,31 @@ void nsImapProtocol::OnSubscribe(const c
 }
 
 void nsImapProtocol::OnUnsubscribe(const char * sourceMailbox)
 {
   // When we try to auto-unsubscribe from \Noselect folders,
   // some servers report errors if we were already unsubscribed
   // from them.
   bool lastReportingErrors = GetServerStateParser().GetReportingErrors();
-  GetServerStateParser().SetReportingErrors(PR_FALSE);
+  GetServerStateParser().SetReportingErrors(false);
   Unsubscribe(sourceMailbox);
   GetServerStateParser().SetReportingErrors(lastReportingErrors);
 }
 
 void nsImapProtocol::RefreshACLForFolderIfNecessary(const char *mailboxName)
 {
   if (GetServerStateParser().ServerHasACLCapability())
   {
     if (!m_folderNeedsACLRefreshed && m_imapMailFolderSink)
       m_imapMailFolderSink->GetFolderNeedsACLListed(&m_folderNeedsACLRefreshed);
     if (m_folderNeedsACLRefreshed)
     {
       RefreshACLForFolder(mailboxName);
-      m_folderNeedsACLRefreshed = PR_FALSE;
+      m_folderNeedsACLRefreshed = false;
     }
   }
 }
 
 void nsImapProtocol::RefreshACLForFolder(const char *mailboxName)
 {
 
   nsIMAPNamespace *ns = nsnull;
@@ -6307,17 +6307,17 @@ void nsImapProtocol::RefreshACLForFolder
       // We're all done, refresh the icon/flags for this folder
       RefreshFolderACLView(mailboxName, ns);
       break;
     }
   }
   else
   {
     // no namespace, not even default... can this happen?
-    NS_ASSERTION(PR_FALSE, "couldn't get namespace");
+    NS_ASSERTION(false, "couldn't get namespace");
   }
 }
 
 void nsImapProtocol::RefreshFolderACLView(const char *mailboxName, nsIMAPNamespace *nsForMailbox)
 {
   nsCString canonicalMailboxName;
 
   if (nsForMailbox)
@@ -6346,20 +6346,20 @@ void nsImapProtocol::GetACLForFolder(con
 }
 
 void nsImapProtocol::OnRefreshAllACLs()
 {
   m_hierarchyNameState = kListingForInfoOnly;
   nsIMAPMailboxInfo *mb = NULL;
 
   // This will fill in the list
-  List("*", PR_TRUE);
+  List("*", true);
 
   PRInt32 total = m_listedMailboxList.Count(), count = 0;
-  GetServerStateParser().SetReportingErrors(PR_FALSE);
+  GetServerStateParser().SetReportingErrors(false);
   for (PRInt32 i = 0; i < total; i++)
   {
     mb = (nsIMAPMailboxInfo *) m_listedMailboxList.ElementAt(i);
     if (mb) // paranoia
     {
       char *onlineName = nsnull;
       m_runningUrl->AllocateServerPath(PromiseFlatCString(mb->GetMailboxName()).get(), mb->GetDelimiter(), &onlineName);
       if (onlineName)
@@ -6370,17 +6370,17 @@ void nsImapProtocol::OnRefreshAllACLs()
       PercentProgressUpdateEvent(NULL, count, total);
       delete mb;
       count++;
     }
   }
   m_listedMailboxList.Clear();
 
   PercentProgressUpdateEvent(NULL, 100, 100);
-  GetServerStateParser().SetReportingErrors(PR_TRUE);
+  GetServerStateParser().SetReportingErrors(true);
   m_hierarchyNameState = kNoOperationInProgress;
 }
 
 // any state commands
 void nsImapProtocol::Logout(bool shuttingDown /* = false */,
                             bool waitForResponse /* = true */)
 {
   if (!shuttingDown)
@@ -6565,18 +6565,18 @@ void nsImapProtocol::OnStatusForFolder(c
 
 
 void nsImapProtocol::OnListFolder(const char * aSourceMailbox, bool aBool)
 {
   List(aSourceMailbox, aBool);
 }
 
 
-// Returns PR_TRUE if the mailbox is a NoSelect mailbox.
-// If we don't know about it, returns PR_FALSE.
+// Returns true if the mailbox is a NoSelect mailbox.
+// If we don't know about it, returns false.
 bool nsImapProtocol::MailboxIsNoSelectMailbox(const char *mailboxName)
 {
   bool rv = false;
 
   nsIMAPNamespace *nsForMailbox = nsnull;
     m_hostSessionList->GetNamespaceForMailboxForHost(GetImapServerKey(),
                                                      mailboxName, nsForMailbox);
   // NS_ASSERTION (nsForMailbox, "Oops .. null nsForMailbox\n");
@@ -6588,17 +6588,17 @@ bool nsImapProtocol::MailboxIsNoSelectMa
                                             nsForMailbox->GetDelimiter(),
                                             getter_Copies(name));
   else
     m_runningUrl->AllocateCanonicalPath(mailboxName,
                                             kOnlineHierarchySeparatorUnknown,
                                             getter_Copies(name));
 
   if (name.IsEmpty())
-    return PR_FALSE;
+    return false;
 
   NS_ASSERTION(m_imapServerSink, "unexpected, no imap server sink, see bug #194335");
   if (m_imapServerSink)
     m_imapServerSink->FolderIsNoSelect(name, &rv);
   return rv;
 }
 
 nsresult nsImapProtocol::SetFolderAdminUrl(const char *mailboxName)
@@ -6619,63 +6619,63 @@ nsresult nsImapProtocol::SetFolderAdminU
     m_runningUrl->AllocateCanonicalPath(mailboxName,
                                             kOnlineHierarchySeparatorUnknown,
                                             getter_Copies(name));
 
   if (m_imapServerSink)
     rv = m_imapServerSink->SetFolderAdminURL(name, nsDependentCString(GetServerStateParser().GetManageFolderUrl()));
   return rv;
 }
-// returns PR_TRUE is the delete succeeded (regardless of subscription changes)
+// returns true is the delete succeeded (regardless of subscription changes)
 bool nsImapProtocol::DeleteMailboxRespectingSubscriptions(const char *mailboxName)
 {
   bool rv = true;
   if (!MailboxIsNoSelectMailbox(mailboxName))
   {
     // Only try to delete it if it really exists
     DeleteMailbox(mailboxName);
     rv = GetServerStateParser().LastCommandSuccessful();
   }
 
   // We can unsubscribe even if the mailbox doesn't exist.
   if (rv && m_autoUnsubscribe) // auto-unsubscribe is on
   {
     bool reportingErrors = GetServerStateParser().GetReportingErrors();
-    GetServerStateParser().SetReportingErrors(PR_FALSE);
+    GetServerStateParser().SetReportingErrors(false);
     Unsubscribe(mailboxName);
     GetServerStateParser().SetReportingErrors(reportingErrors);
 
   }
   return (rv);
 }
 
-// returns PR_TRUE is the rename succeeded (regardless of subscription changes)
-// reallyRename tells us if we should really do the rename (PR_TRUE) or if we should just move subscriptions (PR_FALSE)
+// returns true is the rename succeeded (regardless of subscription changes)
+// reallyRename tells us if we should really do the rename (true) or if we should just move subscriptions (false)
 bool nsImapProtocol::RenameMailboxRespectingSubscriptions(const char *existingName, const char *newName, bool reallyRename)
 {
   bool rv = true;
   if (reallyRename && !MailboxIsNoSelectMailbox(existingName))
   {
     RenameMailbox(existingName, newName);
     rv = GetServerStateParser().LastCommandSuccessful();
   }
 
   if (rv)
   {
     if (m_autoSubscribe)  // if auto-subscribe is on
     {
       bool reportingErrors = GetServerStateParser().GetReportingErrors();
-      GetServerStateParser().SetReportingErrors(PR_FALSE);
+      GetServerStateParser().SetReportingErrors(false);
       Subscribe(newName);
       GetServerStateParser().SetReportingErrors(reportingErrors);
     }
     if (m_autoUnsubscribe) // if auto-unsubscribe is on
     {
       bool reportingErrors = GetServerStateParser().GetReportingErrors();
-      GetServerStateParser().SetReportingErrors(PR_FALSE);
+      GetServerStateParser().SetReportingErrors(false);
       Unsubscribe(existingName);
       GetServerStateParser().SetReportingErrors(reportingErrors);
     }
   }
   return (rv);
 }
 
 bool nsImapProtocol::RenameHierarchyByHand(const char *oldParentMailboxName,
@@ -6708,26 +6708,26 @@ bool nsImapProtocol::RenameHierarchyByHa
             nsCString pattern(oldParentMailboxName);
             pattern += ns->GetDelimiter();
             pattern += "*";
             bool isUsingSubscription = false;
             m_hostSessionList->GetHostIsUsingSubscription(GetImapServerKey(),
                                                           isUsingSubscription);
 
             if (isUsingSubscription)
-                Lsub(pattern.get(), PR_FALSE);
+                Lsub(pattern.get(), false);
             else
-                List(pattern.get(), PR_FALSE);
+                List(pattern.get(), false);
     }
     m_hierarchyNameState = kNoOperationInProgress;
 
     if (GetServerStateParser().LastCommandSuccessful())
       renameSucceeded = // rename this, and move subscriptions
                 RenameMailboxRespectingSubscriptions(oldParentMailboxName,
-                                                     newParentMailboxName, PR_TRUE);
+                                                     newParentMailboxName, true);
 
     PRInt32 numberToDelete = m_deletableChildren->Count();
         PRInt32 childIndex;
 
     for (childIndex = 0;
              (childIndex < numberToDelete) && renameSucceeded; childIndex++)
     {
       // the imap parser has already converted to a non UTF7 string in the canonical
@@ -6775,17 +6775,17 @@ bool nsImapProtocol::DeleteSubFolders(co
         nsCString pattern(selectedMailbox);
         char onlineDirSeparator = kOnlineHierarchySeparatorUnknown;
         m_runningUrl->GetOnlineSubDirSeparator(&onlineDirSeparator);
         pattern.Append(onlineDirSeparator);
         pattern.Append('*');
 
     if (!pattern.IsEmpty())
     {
-      List(pattern.get(), PR_FALSE);
+      List(pattern.get(), false);
     }
     m_hierarchyNameState = kNoOperationInProgress;
 
     // this should be a short list so perform a sequential search for the
     // longest name mailbox.  Deleting the longest first will hopefully
         // prevent the server from having problems about deleting parents
         // ** jt - why? I don't understand this.
     PRInt32 numberToDelete = m_deletableChildren->Count();
@@ -6803,17 +6803,17 @@ bool nsImapProtocol::DeleteSubFolders(co
             strcpy(selectedMailboxDir, selectedMailbox);
             selectedMailboxDir[length] = onlineDirSeparator;
             selectedMailboxDir[length+1] = '\0';
             PRInt32 i;
             for( i=0; i<numberToDelete && !folderInSubfolderList; i++ )
             {
                 char *currentName = (char *) m_deletableChildren->ElementAt(i);
                 if( !strcmp(currentName, selectedMailbox) || !strcmp(currentName, selectedMailboxDir) )
-                    folderInSubfolderList = PR_TRUE;
+                    folderInSubfolderList = true;
             }
         }
     }
 
     deleteSucceeded = GetServerStateParser().LastCommandSuccessful();
     for (outerIndex = 0;
          (outerIndex < numberToDelete) && deleteSucceeded;
          outerIndex++)
@@ -6968,30 +6968,30 @@ void nsImapProtocol::OnDeleteFolder(cons
 }
 
 void nsImapProtocol::RemoveMsgsAndExpunge()
 {
   uint32 numberOfMessages = GetServerStateParser().NumberOfMessages();
   if (numberOfMessages)
   {
     // Remove all msgs and expunge the folder (ie, compact it).
-    Store(NS_LITERAL_CSTRING("1:*"), "+FLAGS.SILENT (\\Deleted)", PR_FALSE);  // use sequence #'s  
+    Store(NS_LITERAL_CSTRING("1:*"), "+FLAGS.SILENT (\\Deleted)", false);  // use sequence #'s  
     if (GetServerStateParser().LastCommandSuccessful())
       Expunge();
   }
 }
 
 void nsImapProtocol::DeleteFolderAndMsgs(const char * sourceMailbox)
 {
   RemoveMsgsAndExpunge();
   if (GetServerStateParser().LastCommandSuccessful())
   {
     // All msgs are deleted successfully - let's remove the folder itself.
     bool reportingErrors = GetServerStateParser().GetReportingErrors();
-    GetServerStateParser().SetReportingErrors(PR_FALSE);
+    GetServerStateParser().SetReportingErrors(false);
     OnDeleteFolder(sourceMailbox);
     GetServerStateParser().SetReportingErrors(reportingErrors);
   }
 }
 
 void nsImapProtocol::OnRenameFolder(const char * sourceMailbox)
 {
   char *destinationMailbox = OnCreateServerDestinationFolderPathString();
@@ -7069,37 +7069,37 @@ void nsImapProtocol::DiscoverAllAndSubsc
   for (PRUint32 i = 0; i < count; i++ )
   {
     nsIMAPNamespace *ns = nsnull;
 
     m_hostSessionList->GetNamespaceNumberForHost(GetImapServerKey(), i,
       ns);
     if (ns &&
       gHideOtherUsersFromList ? (ns->GetType() != kOtherUsersNamespace)
-      : PR_TRUE)
+      : true)
     {
       const char *prefix = ns->GetPrefix();
       if (prefix)
       {
         if (!gHideUnusedNamespaces && *prefix &&
         PL_strcasecmp(prefix, "INBOX.")) /* only do it for
         non-empty namespace prefixes */
         {
           // Explicitly discover each Namespace, just so they're
           // there in the subscribe UI
           nsImapMailboxSpec *boxSpec = new nsImapMailboxSpec;
           if (boxSpec)
           {
             NS_ADDREF(boxSpec);
-            boxSpec->mFolderSelected = PR_FALSE;
+            boxSpec->mFolderSelected = false;
             boxSpec->mHostName.Assign(GetImapHostName());
             boxSpec->mConnection = this;
             boxSpec->mFlagState = nsnull;
-            boxSpec->mDiscoveredFromLsub = PR_TRUE;
-            boxSpec->mOnlineVerified = PR_TRUE;
+            boxSpec->mDiscoveredFromLsub = true;
+            boxSpec->mOnlineVerified = true;
             boxSpec->mBoxFlags = kNoselect;
             boxSpec->mHierarchySeparator = ns->GetDelimiter();
             
             m_runningUrl->AllocateCanonicalPath(ns->GetPrefix(), ns->GetDelimiter(), 
                                                 getter_Copies(boxSpec->mAllocatedPathName));
             boxSpec->mNamespaceForFolder = ns;
             boxSpec->mBoxFlags |= kNameSpace;
 
@@ -7143,28 +7143,28 @@ void nsImapProtocol::DiscoverAllAndSubsc
         }
 
         nsresult rv;
         nsCOMPtr<nsIImapIncomingServer> imapServer = do_QueryReferent(m_server, &rv);
         if (NS_FAILED(rv) || !imapServer) return;
 
         if (!allPattern.IsEmpty())
         {
-          imapServer->SetDoingLsub(PR_TRUE);
-          Lsub(allPattern.get(), PR_TRUE);	// LSUB all the subscribed
+          imapServer->SetDoingLsub(true);
+          Lsub(allPattern.get(), true);	// LSUB all the subscribed
         }
         if (!topLevelPattern.IsEmpty())
         {
-          imapServer->SetDoingLsub(PR_FALSE);
-          List(topLevelPattern.get(), PR_TRUE);	// LIST the top level
+          imapServer->SetDoingLsub(false);
+          List(topLevelPattern.get(), true);	// LIST the top level
         }
         if (!secondLevelPattern.IsEmpty())
         {
-          imapServer->SetDoingLsub(PR_FALSE);
-          List(secondLevelPattern.get(), PR_TRUE);	// LIST the second level
+          imapServer->SetDoingLsub(false);
+          List(secondLevelPattern.get(), true);	// LIST the second level
         }
       }
     }
   }
 }
 
 // DiscoverMailboxList() is used to actually do the discovery of folders
 // for a host.  This is used both when we initially start up (and re-sync)
@@ -7173,32 +7173,32 @@ void nsImapProtocol::DiscoverAllAndSubsc
 // pane.
 // DiscoverMailboxList() also gets the ACLs for each newly discovered folder
 void nsImapProtocol::DiscoverMailboxList()
 {
   bool usingSubscription = false;
 
   m_hostSessionList->GetHostIsUsingSubscription(GetImapServerKey(), usingSubscription);
   // Pretend that the Trash folder doesn't exist, so we will rediscover it if we need to.
-  m_hostSessionList->SetOnlineTrashFolderExistsForHost(GetImapServerKey(), PR_FALSE);
+  m_hostSessionList->SetOnlineTrashFolderExistsForHost(GetImapServerKey(), false);
 
   // should we check a pref here, to be able to turn off XList?
   bool hasXLIST = GetServerStateParser().GetCapabilityFlag() & kHasXListCapability;
   if (hasXLIST && usingSubscription)
   {
     m_hierarchyNameState = kXListing;
     nsCAutoString pattern("%");
-    List("%", PR_TRUE, PR_TRUE);
+    List("%", true, true);
     // We list the first and second levels since special folders are unlikely
     // to be more than 2 levels deep.
     char separator = 0;
     m_runningUrl->GetOnlineSubDirSeparator(&separator);
     pattern.Append(separator);
     pattern += '%';
-    List(pattern.get(), PR_TRUE, PR_TRUE);
+    List(pattern.get(), true, true);
   }
 
   SetMailboxDiscoveryStatus(eContinue);
   if (GetServerStateParser().ServerHasACLCapability())
     m_hierarchyNameState = kListingForInfoAndDiscovery;
   else
     m_hierarchyNameState = kNoOperationInProgress;
 
@@ -7213,33 +7213,33 @@ void nsImapProtocol::DiscoverMailboxList
     {
       const char *prefix = ns->GetPrefix();
       if (prefix)
       {
         // static bool gHideUnusedNamespaces = true;
         // mscott -> WARNING!!! i where are we going to get this
                 // global variable for unusued name spaces from??? *wince*
         // dmb - we should get this from a per-host preference,
-        // I'd say. But for now, just make it PR_TRUE;
+        // I'd say. But for now, just make it true;
         if (!gHideUnusedNamespaces && *prefix &&
                     PL_strcasecmp(prefix, "INBOX."))  // only do it for
                     // non-empty namespace prefixes, and for non-INBOX prefix
         {
           // Explicitly discover each Namespace, so that we can
                     // create subfolders of them,
           nsImapMailboxSpec *boxSpec = new nsImapMailboxSpec;
           if (boxSpec)
           {
             NS_ADDREF(boxSpec);
-            boxSpec->mFolderSelected = PR_FALSE;
+            boxSpec->mFolderSelected = false;
             boxSpec->mHostName = GetImapHostName();
             boxSpec->mConnection = this;
             boxSpec->mFlagState = nsnull;
-            boxSpec->mDiscoveredFromLsub = PR_TRUE;
-            boxSpec->mOnlineVerified = PR_TRUE;
+            boxSpec->mDiscoveredFromLsub = true;
+            boxSpec->mOnlineVerified = true;
             boxSpec->mBoxFlags = kNoselect;
             boxSpec->mHierarchySeparator = ns->GetDelimiter();
             // Until |AllocateCanonicalPath()| gets updated:
             char* allocatedPathStr;
             m_runningUrl->AllocateCanonicalPath(
                             ns->GetPrefix(), ns->GetDelimiter(),
                             &allocatedPathStr);
             boxSpec->mAllocatedPathName.Assign(allocatedPathStr);
@@ -7287,43 +7287,43 @@ void nsImapProtocol::DiscoverMailboxList
             pattern2 = prefix;
             pattern2 += "%";
             pattern2 += delimiter;
             pattern2 += "%";
             // pattern2 = PR_smprintf("%s%%%c%%", prefix, delimiter);
           }
         }
         if (usingSubscription) // && !GetSubscribingNow())  should never get here from subscribe pane
-          Lsub(pattern.get(), PR_TRUE);
+          Lsub(pattern.get(), true);
         else
         {
-          List(pattern.get(), PR_TRUE, hasXLIST);
-          List(pattern2.get(), PR_TRUE, hasXLIST);
+          List(pattern.get(), true, hasXLIST);
+          List(pattern2.get(), true, hasXLIST);
         }
       }
     }
   }
 
   // explicitly LIST the INBOX if (a) we're not using subscription, or (b) we are using subscription and
   // the user wants us to always show the INBOX.
   bool listInboxForHost = false;
   m_hostSessionList->GetShouldAlwaysListInboxForHost(GetImapServerKey(), listInboxForHost);
   if (!usingSubscription || listInboxForHost)
-    List("INBOX", PR_TRUE);
+    List("INBOX", true);
 
   m_hierarchyNameState = kNoOperationInProgress;
 
   MailboxDiscoveryFinished();
 
   // Get the ACLs for newly discovered folders
   if (GetServerStateParser().ServerHasACLCapability())
   {
     PRInt32 total = m_listedMailboxList.Count(), cnt = 0;
     // Let's not turn this off here, since we don't turn it on after
-    // GetServerStateParser().SetReportingErrors(PR_FALSE);
+    // GetServerStateParser().SetReportingErrors(false);
     if (total)
     {
       ProgressEventFunctionUsingId(IMAP_GETTING_ACL_FOR_FOLDER);
       nsIMAPMailboxInfo * mb = nsnull;
       do
       {
         if (m_listedMailboxList.Count() == 0)
             break;
@@ -7375,64 +7375,64 @@ void nsImapProtocol::MailboxDiscoveryFin
     m_hostSessionList->GetHostIsUsingSubscription(GetImapServerKey(),usingSubscription);
     if (!trashFolderExists && GetDeleteIsMoveToTrash() && usingSubscription)
     {
       // maybe we're not subscribed to the Trash folder
       if (personalDir)
       {
         nsCString originalTrashName(CreatePossibleTrashName(personalDir));
         m_hierarchyNameState = kDiscoverTrashFolderInProgress;
-        List(originalTrashName.get(), PR_TRUE);
+        List(originalTrashName.get(), true);
         m_hierarchyNameState = kNoOperationInProgress;
       }
     }
 
     // There is no Trash folder (either LIST'd or LSUB'd), and we're using the
     // Delete-is-move-to-Trash model, and there is a personal namespace
     if (!trashFolderExists && GetDeleteIsMoveToTrash() && ns)
     {
       nsCString trashName(CreatePossibleTrashName(ns->GetPrefix()));
       nsCString onlineTrashName;
       m_runningUrl->AllocateServerPath(trashName.get(), ns->GetDelimiter(),
                                        getter_Copies(onlineTrashName));
 
-      GetServerStateParser().SetReportingErrors(PR_FALSE);
+      GetServerStateParser().SetReportingErrors(false);
       bool created = CreateMailboxRespectingSubscriptions(onlineTrashName.get());
-      GetServerStateParser().SetReportingErrors(PR_TRUE);
+      GetServerStateParser().SetReportingErrors(true);
 
       // force discovery of new trash folder.
       if (created)
       {
         m_hierarchyNameState = kDiscoverTrashFolderInProgress;
-        List(onlineTrashName.get(), PR_FALSE);
+        List(onlineTrashName.get(), false);
         m_hierarchyNameState = kNoOperationInProgress;
       }
       else
-        m_hostSessionList->SetOnlineTrashFolderExistsForHost(GetImapServerKey(), PR_TRUE);
+        m_hostSessionList->SetOnlineTrashFolderExistsForHost(GetImapServerKey(), true);
     } //if trashg folder doesn't exist
-    m_hostSessionList->SetHaveWeEverDiscoveredFoldersForHost(GetImapServerKey(), PR_TRUE);
+    m_hostSessionList->SetHaveWeEverDiscoveredFoldersForHost(GetImapServerKey(), true);
 
     // notify front end that folder discovery is complete....
     if (m_imapServerSink)
       m_imapServerSink->DiscoveryDone();
   }
 }
 
-// returns PR_TRUE is the create succeeded (regardless of subscription changes)
+// returns true is the create succeeded (regardless of subscription changes)
 bool nsImapProtocol::CreateMailboxRespectingSubscriptions(const char *mailboxName)
 {
   CreateMailbox(mailboxName);
   bool rv = GetServerStateParser().LastCommandSuccessful();
   if (rv)
   {
     if (m_autoSubscribe) // auto-subscribe is on
     {
       // create succeeded - let's subscribe to it
       bool reportingErrors = GetServerStateParser().GetReportingErrors();
-      GetServerStateParser().SetReportingErrors(PR_FALSE);
+      GetServerStateParser().SetReportingErrors(false);
       OnSubscribe(mailboxName);
       GetServerStateParser().SetReportingErrors(reportingErrors);
     }
   }
   return (rv);
 }
 
 void nsImapProtocol::CreateMailbox(const char *mailboxName)
@@ -7459,19 +7459,19 @@ void nsImapProtocol::CreateMailbox(const
     // Figure out parent folder name.
     nsCString parentName(mailboxName);
     char hierarchyDelimiter;
     m_runningUrl->GetOnlineSubDirSeparator(&hierarchyDelimiter);
     PRInt32 leafPos = parentName.RFindChar(hierarchyDelimiter);
     if (leafPos > 0)
     {
       parentName.SetLength(leafPos);
-      List(parentName.get(), PR_FALSE);
+      List(parentName.get(), false);
       // We still want the caller to know the create failed, so restore that.
-      GetServerStateParser().SetCommandFailed(PR_TRUE);
+      GetServerStateParser().SetCommandFailed(true);
     }
   }
 }
 
 void nsImapProtocol::DeleteMailbox(const char *mailboxName)
 {
 
   // check if this connection currently has the folder to be deleted selected.
@@ -7579,17 +7579,17 @@ void nsImapProtocol::List(const char *ma
     " xlist \"\" \"" : " list \"\" \"";
   command += escapedPattern;
   command += "\""CRLF;
 
   PR_Free(boxnameWithOnlineDirectory);
 
   nsresult rv = SendData(command.get());
   if (NS_SUCCEEDED(rv))
-    ParseIMAPandCheckForNewMail(command.get(), PR_TRUE);
+    ParseIMAPandCheckForNewMail(command.get(), true);
 }
 
 void nsImapProtocol::Subscribe(const char *mailboxName)
 {
   ProgressEventFunctionUsingIdWithString (IMAP_STATUS_SUBSCRIBE_TO_MAILBOX, mailboxName);
 
   IncrementCommandTagNumber();
 
@@ -7630,17 +7630,17 @@ void nsImapProtocol::Idle()
 
   if (m_urlInProgress)
     return;
   nsCAutoString command (GetServerCommandTag());
   command += " IDLE"CRLF;
   nsresult rv = SendData(command.get());
   if (NS_SUCCEEDED(rv))
   {
-      m_idle = PR_TRUE;
+      m_idle = true;
       // we'll just get back a continuation char at first.
       // + idling...
       ParseIMAPandCheckForNewMail();
       // this will cause us to get notified of data or the socket getting closed.
       // That notification will occur on the socket transport thread - we just
       // need to poke a monitor so the imap thread will do a blocking read
       // and parse the data.
       nsCOMPtr <nsIAsyncInputStream> asyncInputStream = do_QueryInterface(m_inputStream);
@@ -7659,17 +7659,17 @@ void nsImapProtocol::EndIdle(bool waitFo
   if (asyncInputStream)
     asyncInputStream->AsyncWait(nsnull, 0, 0, nsnull);
   nsresult rv = SendData("DONE"CRLF);
   // set a short timeout if we don't want to wait for a response
   if (m_transport && !waitForResponse)
     m_transport->SetTimeout(nsISocketTransport::TIMEOUT_READ_WRITE, 5);
   if (NS_SUCCEEDED(rv))
   {
-    m_idle = PR_FALSE;
+    m_idle = false;
     ParseIMAPandCheckForNewMail();
   }
   m_imapMailFolderSink = nsnull;
 }
 
 
 void nsImapProtocol::Search(const char * searchCriteria,
                             bool useUID,
@@ -7789,17 +7789,17 @@ void nsImapProtocol::NthLevelChildList(c
   m_runningUrl->GetOnlineSubDirSeparator(&separator);
   suffix.Assign(separator);
   suffix += '%';
 
   while (count < depth)
   {
       pattern += suffix;
       count++;
-      List(pattern.get(), PR_FALSE);
+      List(pattern.get(), false);
   }
 }
 
 void nsImapProtocol::ProcessAuthenticatedStateURL()
 {
   nsImapAction imapAction;
   char * sourceMailbox = nsnull;
   m_runningUrl->GetImapAction(&imapAction);
@@ -7846,33 +7846,33 @@ void nsImapProtocol::ProcessAuthenticate
 
       if (GetServerStateParser().LastCommandSuccessful())
       {
         bool shouldList;
         // if url is an external click url, then we should list the folder
         // after subscribing to it, so we can select it.
         m_runningUrl->GetExternalLinkUrl(&shouldList);
         if (shouldList)
-          OnListFolder(sourceMailbox, PR_TRUE);
+          OnListFolder(sourceMailbox, true);
       }
       break;
     case nsIImapUrl::nsImapUnsubscribe:
       sourceMailbox = OnCreateServerSourceFolderPathString();
       OnUnsubscribe(sourceMailbox);
       break;
     case nsIImapUrl::nsImapRefreshACL:
       sourceMailbox = OnCreateServerSourceFolderPathString();
       RefreshACLForFolder(sourceMailbox);
       break;
     case nsIImapUrl::nsImapRefreshAllACLs:
       OnRefreshAllACLs();
       break;
     case nsIImapUrl::nsImapListFolder:
       sourceMailbox = OnCreateServerSourceFolderPathString();
-      OnListFolder(sourceMailbox, PR_FALSE);
+      OnListFolder(sourceMailbox, false);
       break;
     case nsIImapUrl::nsImapFolderStatus:
       sourceMailbox = OnCreateServerSourceFolderPathString();
       OnStatusForFolder(sourceMailbox);
       break;
     case nsIImapUrl::nsImapRefreshFolderUrls:
       sourceMailbox = OnCreateServerSourceFolderPathString();
       XMailboxInfo(sourceMailbox);
@@ -7911,17 +7911,17 @@ void nsImapProtocol::ProcessAfterAuthent
     {
       XServerInfo();
       if (GetServerStateParser().LastCommandSuccessful() && m_imapServerSink)
       {
         m_imapServerSink->SetMailServerUrls(GetServerStateParser().GetMailAccountUrl(),
           GetServerStateParser().GetManageListsUrl(),
           GetServerStateParser().GetManageFiltersUrl());
         // we've tried to ask for it, so don't try again this session.
-        m_hostSessionList->SetHostHasAdminURL(GetImapServerKey(), PR_TRUE);
+        m_hostSessionList->SetHostHasAdminURL(GetImapServerKey(), true);
       }
     }
     else if (GetServerStateParser().ServerIsNetscape3xServer())
     {
       Netscape();
       if (GetServerStateParser().LastCommandSuccessful() && m_imapServerSink)
         m_imapServerSink->SetMailServerUrls(GetServerStateParser().GetMailAccountUrl(),
                                             EmptyCString(), EmptyCString());
@@ -8182,24 +8182,24 @@ nsresult nsImapProtocol::GetPassword(nsC
 NS_IMETHODIMP
 nsImapProtocol::OnPromptStart(bool *aResult)
 {
   nsresult rv;
   nsCOMPtr<nsIImapIncomingServer> imapServer = do_QueryReferent(m_server, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr<nsIMsgWindow> msgWindow;
 
-  *aResult = PR_FALSE;
+  *aResult = false;
   GetMsgWindow(getter_AddRefs(msgWindow));
   nsCString password = m_lastPasswordSent;
   rv = imapServer->PromptPassword(msgWindow, password);
   m_password = password;
   m_passwordStatus = rv;
   if (!m_password.IsEmpty())
-    *aResult = PR_TRUE;
+    *aResult = true;
 
   // Notify the imap thread that we have a password.
   ReentrantMonitorAutoEnter passwordMon(m_passwordReadyMonitor);
   passwordMon.Notify();
   return rv;
 }
 
 NS_IMETHODIMP
@@ -8262,17 +8262,17 @@ bool nsImapProtocol::TryToLogon()
         else
           // tell user to change to plaintext pw, with big warning
           AlertUserEventUsingId(IMAP_AUTH_CHANGE_ENCRYPT_TO_PLAIN_NO_SSL);
       }
       else
         // just "change auth method"
         AlertUserEventUsingId(IMAP_AUTH_MECH_NOT_SUPPORTED);
 
-      skipLoop = PR_TRUE;
+      skipLoop = true;
     }
     else
     {
       // try to reset failed methods and try them again
       ResetAuthMethods();
       rv = ChooseAuthMethod();
       if (NS_FAILED(rv)) // all methods failed
       {
@@ -8282,17 +8282,17 @@ bool nsImapProtocol::TryToLogon()
     }
   }
 
   // Get username, either the stored one or from user
   rv = m_imapServerSink->GetLoginUsername(userName);
   if (NS_FAILED(rv) || userName.IsEmpty())
   {
     // The user hit "Cancel" on the dialog box
-    skipLoop = PR_TRUE;
+    skipLoop = true;
   }
 
   /*
    * Login can fail for various reasons:
    * 1. Server claims to support GSSAPI, but it really doesn't.
    *    Or the client doesn't support GSSAPI, or is not logged in yet.
    *    (GSSAPI is a mechanism without password in apps).
    * 2. Server claims to support CRAM-MD5, but it's broken and will fail despite correct password.
@@ -8315,27 +8315,27 @@ bool nsImapProtocol::TryToLogon()
   while (!loginSucceeded && !skipLoop && !DeathSignalReceived())
   {
       // Get password
       if (m_currentAuthMethod != kHasAuthGssApiCapability && // GSSAPI uses no pw in apps
           m_currentAuthMethod != kHasAuthExternalCapability &&
           m_currentAuthMethod != kHasAuthNoneCapability)
       {
           rv = GetPassword(password, newPasswordRequested);
-          newPasswordRequested = PR_FALSE;
+          newPasswordRequested = false;
           if (rv == NS_MSG_PASSWORD_PROMPT_CANCELLED || NS_FAILED(rv))
           {
             PR_LOG(IMAP, PR_LOG_ERROR, ("IMAP: password prompt failed or user canceled it"));
             break;
           }
           PR_LOG(IMAP, PR_LOG_DEBUG, ("got new password"));
       }
 
       bool lastReportingErrors = GetServerStateParser().GetReportingErrors();
-      GetServerStateParser().SetReportingErrors(PR_FALSE); // turn off errors - we'll put up our own.
+      GetServerStateParser().SetReportingErrors(false); // turn off errors - we'll put up our own.
 
       rv = AuthLogin(userName.get(), password, m_currentAuthMethod);
 
       GetServerStateParser().SetReportingErrors(lastReportingErrors); // restore error reports
       loginSucceeded = NS_SUCCEEDED(rv);
 
       if (!loginSucceeded)
       {
@@ -8372,17 +8372,17 @@ bool nsImapProtocol::TryToLogon()
           {
             PR_LOG(IMAP, PR_LOG_WARN, ("new password button pressed."));
             // Forget the current password
             password.Truncate();
             m_hostSessionList->SetPasswordForHost(GetImapServerKey(), nsnull);
             m_imapServerSink->ForgetPassword();
             m_password.Truncate();
             PR_LOG(IMAP, PR_LOG_WARN, ("password resetted (nulled)"));
-            newPasswordRequested = PR_TRUE;
+            newPasswordRequested = true;
             // Will call GetPassword() in beginning of next loop
 
             // Try all possible auth methods again with the new password.
             ResetAuthMethods();
           }
           else if (buttonPressed == 0) // Retry button
           {
             PR_LOG(IMAP, PR_LOG_WARN, ("retry button pressed"));
@@ -8413,17 +8413,17 @@ bool nsImapProtocol::TryToLogon()
     bool imapPasswordIsNew = !passwordAlreadyVerified;
     if (imapPasswordIsNew)
     {
       if (m_currentBiffState == nsIMsgFolder::nsMsgBiffState_Unknown)
       {
           m_currentBiffState = nsIMsgFolder::nsMsgBiffState_NoMail;
           SendSetBiffIndicatorEvent(m_currentBiffState);
       }
-      m_imapServerSink->SetUserAuthenticated(PR_TRUE);
+      m_imapServerSink->SetUserAuthenticated(true);
     }
 
     nsImapAction imapAction;
     m_runningUrl->GetImapAction(&imapAction);
     // We don't want to do any more processing if we're just
     // verifying the ability to logon because it can leave us in
     // a half-constructed state.
     if (imapAction != nsIImapUrl::nsImapVerifylogon)
@@ -8468,21 +8468,21 @@ void nsImapProtocol::GetQuotaDataIfSuppo
 
   nsCAutoString quotacommand(GetServerCommandTag());
   quotacommand.Append(NS_LITERAL_CSTRING(" getquotaroot \""));
   quotacommand.Append(escapedName);
   quotacommand.Append(NS_LITERAL_CSTRING("\"" CRLF));
 
   NS_ASSERTION(m_imapMailFolderSink, "m_imapMailFolderSink is null!");
   if (m_imapMailFolderSink)
-    m_imapMailFolderSink->SetFolderQuotaCommandIssued(PR_TRUE);
+    m_imapMailFolderSink->SetFolderQuotaCommandIssued(true);
 
   nsresult quotarv = SendData(quotacommand.get());
   if (NS_SUCCEEDED(quotarv))
-    ParseIMAPandCheckForNewMail(nsnull, PR_TRUE); // don't display errors.
+    ParseIMAPandCheckForNewMail(nsnull, true); // don't display errors.
 }
 
 bool
 nsImapProtocol::GetDeleteIsMoveToTrash()
 {
     bool rv = false;
     NS_ASSERTION (m_hostSessionList, "fatal... null host session list");
     if (m_hostSessionList)
@@ -8499,24 +8499,24 @@ nsImapProtocol::GetShowDeletedMessages()
     return rv;
 }
 
 NS_IMETHODIMP nsImapProtocol::OverrideConnectionInfo(const PRUnichar *pHost, PRUint16 pPort, const char *pCookieData)
 {
   m_logonHost = NS_LossyConvertUTF16toASCII(pHost);
   m_logonPort = pPort;
   m_logonCookie = pCookieData;
-  m_overRideUrlConnectionInfo = PR_TRUE;
+  m_overRideUrlConnectionInfo = true;
   return NS_OK;
 }
 
 bool nsImapProtocol::CheckNeeded()
 {
   if (m_flagChangeCount >= kFlagChangesBeforeCheck)
-    return PR_TRUE;
+    return true;
 
   PRTime deltaTime;
   PRInt32 deltaInSeconds;
 
   LL_SUB(deltaTime, PR_Now(), m_lastCheckTime);
   PRTime2Seconds(deltaTime, &deltaInSeconds);
 
   return (deltaInSeconds >= kMaxSecondsBeforeCheck);
@@ -8646,19 +8646,19 @@ NS_INTERFACE_MAP_BEGIN(nsImapMockChannel
 NS_INTERFACE_MAP_END_THREADSAFE
 
 
 nsImapMockChannel::nsImapMockChannel()
 {
   m_channelContext = nsnull;
   m_cancelStatus = NS_OK;
   mLoadFlags = 0;
-  mChannelClosed = PR_FALSE;
-  mReadingFromCache = PR_FALSE;
-  mTryingToReadPart = PR_FALSE;
+  mChannelClosed = false;
+  mReadingFromCache = false;
+  mTryingToReadPart = false;
 }
 
 nsImapMockChannel::~nsImapMockChannel()
 {
   // if we're offline, we may not get to close the channel correctly.
   // we need to do this to send the url state change notification in
   // the case of mem and disk cache reads.
   NS_WARN_IF_FALSE(NS_IsMainThread(), "should only access mock channel on ui thread");
@@ -8675,30 +8675,30 @@ nsresult nsImapMockChannel::NotifyStartE
   if (imapUrl)
   {
     nsCOMPtr<nsIImapMailFolderSink> folderSink;
     rv = imapUrl->GetImapMailFolderSink(getter_AddRefs(folderSink));
     if (folderSink)
     {
       nsCOMPtr<nsIMsgMailNewsUrl> mailUrl = do_QueryInterface(m_url);
       rv = folderSink->SetUrlState(nsnull /* we don't know the protocol */,
-                                   mailUrl, start, PR_FALSE, m_cancelStatus);
+                                   mailUrl, start, false, m_cancelStatus);
 
       // Required for killing ImapProtocol thread
       if (m_cancelStatus != NS_OK && imapProtocol)
-        imapProtocol->TellThreadToDie(PR_FALSE);
+        imapProtocol->TellThreadToDie(false);
     }
   }
   return rv;
 }
 
 NS_IMETHODIMP nsImapMockChannel::Close()
 {
   if (mReadingFromCache)
-    NotifyStartEndReadFromCache(PR_FALSE);
+    NotifyStartEndReadFromCache(false);
   else
   {
     nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(m_url);
     if (mailnewsUrl)
     {
       nsCOMPtr<nsICacheEntryDescriptor>  cacheEntry;
       mailnewsUrl->GetMemCacheEntry(getter_AddRefs(cacheEntry));
       if (cacheEntry)
@@ -8732,17 +8732,17 @@ NS_IMETHODIMP nsImapMockChannel::Close()
       rv = imapUrl->GetImapMailFolderSink(getter_AddRefs(folderSink));
       if (folderSink)
       {
         nsCOMPtr <nsIMsgMailNewsUrl> mailUrl = do_QueryInterface(m_url);
         rv = folderSink->ReleaseUrlCacheEntry(mailUrl);
       }
     }
   }
-  mChannelClosed = PR_TRUE;
+  mChannelClosed = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapMockChannel::GetProgressEventSink(nsIProgressEventSink ** aProgressEventSink)
 {
   *aProgressEventSink = mProgressEventSink;
   NS_IF_ADDREF(*aProgressEventSink);
   return NS_OK;
@@ -8911,17 +8911,17 @@ nsImapMockChannel::OnCacheEntryAvailable
         }
       }
     }
     else
     {
       rv = ReadFromMemCache(entry);
       if (NS_SUCCEEDED(rv))
       {
-        NotifyStartEndReadFromCache(PR_TRUE);
+        NotifyStartEndReadFromCache(true);
         if (access & nsICache::ACCESS_WRITE)
           entry->MarkValid();
         return NS_OK; // kick out if reading from the cache succeeded...
       }
       entry->Doom(); // doom entry if we failed to read from mem cache
       mailnewsUrl->SetMemCacheEntry(nsnull); // we aren't going to be reading from the cache
     }
   } // if we got a valid entry back from the cache...
@@ -8957,28 +8957,28 @@ nsresult nsImapMockChannel::OpenCacheEnt
 
   // for now, truncate of the query part so we don't duplicate urls in the cache...
   PRInt32 anchorIndex = urlSpec.RFindChar('?');
   if (anchorIndex > 0)
   {
     // if we were trying to read a part, we failed - fall back and look for whole msg
     if (mTryingToReadPart)
     {
-      mTryingToReadPart = PR_FALSE;
+      mTryingToReadPart = false;
       urlSpec.SetLength(anchorIndex);
     }
     else
     {
       // check if this is a filter plugin requesting the message. In that case,we're not
       // fetching a part, and we want the cache key to be just the uri.
       nsCAutoString anchor(Substring(urlSpec, anchorIndex));
 
       if (!anchor.EqualsLiteral("?header=filter")
         && !anchor.EqualsLiteral("?header=attach") && !anchor.EqualsLiteral("?header=src"))
-        mTryingToReadPart = PR_TRUE;
+        mTryingToReadPart = true;
       else
         urlSpec.SetLength(anchorIndex);
     }
   }
   PRInt32 uidValidity = -1;
   nsCacheAccessMode cacheAccess = nsICache::ACCESS_READ_WRITE;
 
   nsCOMPtr <nsIImapUrl> imapUrl = do_QueryInterface(m_url, &rv);
@@ -9016,17 +9016,17 @@ nsresult nsImapMockChannel::ReadFromMemC
 
   entry->GetKey(entryKey);
   // if we have a part, then we should use the cache entry.
   if (entryKey.FindChar('?') != kNotFound)
   {
     entry->GetMetaDataElement("contentType", getter_Copies(contentType));
     if (!contentType.IsEmpty())
       SetContentType(contentType);
-    shouldUseCacheEntry = PR_TRUE;
+    shouldUseCacheEntry = true;
   }
   else
   {
     // otherwise, we have the whole msg, and we should make sure the content isn't modified.
     rv = entry->GetMetaDataElement("ContentModified", getter_Copies(annotation));
     if (NS_SUCCEEDED(rv) && !annotation.IsEmpty())
       shouldUseCacheEntry = annotation.EqualsLiteral("Not Modified");
     if (shouldUseCacheEntry)
@@ -9040,17 +9040,17 @@ nsresult nsImapMockChannel::ReadFromMemC
         nsCOMPtr<nsIMsgDBHdr> msgHdr;
         // A failure to get a message header isn't an error
         msgUrl->GetMessageHeader(getter_AddRefs(msgHdr));
         if (msgHdr)
         {
           PRUint32 messageSize;
           if (NS_SUCCEEDED(msgHdr->GetMessageSize(&messageSize)) &&
               messageSize != entrySize)
-            shouldUseCacheEntry = PR_FALSE;
+            shouldUseCacheEntry = false;
         }
       }
     }
   }
   if (shouldUseCacheEntry)
   {
     nsCOMPtr<nsIInputStream> in;
     PRUint32 readCount;
@@ -9092,17 +9092,17 @@ nsresult nsImapMockChannel::ReadFromMemC
     NS_RELEASE(cacheListener);
 
     if (NS_SUCCEEDED(rv)) // ONLY if we succeeded in actually starting the read should we return
     {
       mCacheRequest = pump;
       nsCOMPtr<nsIImapUrl> imapUrl = do_QueryInterface(m_url);
       // if the msg is unread, we should mark it read on the server. This lets
       // the code running this url we're loading from the cache, if it cares.
-      imapUrl->SetMsgLoadingFromCache(PR_TRUE);
+      imapUrl->SetMsgLoadingFromCache(true);
 
       // be sure to set the cache entry's security info status as our security info status...
       nsCOMPtr<nsISupports> securityInfo;
       entry->GetSecurityInfo(getter_AddRefs(securityInfo));
       SetSecurityInfo(securityInfo);
       return NS_OK;
     } // if AsyncRead succeeded.
   } // if contnet is not modified
@@ -9121,17 +9121,17 @@ nsresult nsImapMockChannel::ReadFromImap
   nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(m_url);
 
   bool localOnly = false;
   imapUrl->GetLocalFetchOnly(&localOnly);
   if (localOnly)
   {
     // This will cause an OnStartRunningUrl, and the subsequent close
     // will then cause an OnStopRunningUrl with the cancel status.
-    NotifyStartEndReadFromCache(PR_TRUE);
+    NotifyStartEndReadFromCache(true);
     Cancel(NS_MSG_ERROR_MSG_NOT_OFFLINE);
     if (m_channelListener)
       m_channelListener->OnStopRequest(this, m_channelContext,
                                        NS_MSG_ERROR_MSG_NOT_OFFLINE);
     return NS_MSG_ERROR_MSG_NOT_OFFLINE;
   }
 
   nsCOMPtr <nsILoadGroup> loadGroup;
@@ -9203,24 +9203,24 @@ bool nsImapMockChannel::ReadFromLocalCac
           rv = pump->AsyncRead(cacheListener, m_channelContext);
 
         NS_RELEASE(cacheListener);
 
         if (NS_SUCCEEDED(rv)) // ONLY if we succeeded in actually starting the read should we return
         {
           // if the msg is unread, we should mark it read on the server. This lets
           // the code running this url we're loading from the cache, if it cares.
-          imapUrl->SetMsgLoadingFromCache(PR_TRUE);
-          return PR_TRUE;
+          imapUrl->SetMsgLoadingFromCache(true);
+          return true;
         }
       } // if we got an offline file transport
     } // if we got the folder for this url
   } // if use local cache
 
-  return PR_FALSE;
+  return false;
 }
 
 NS_IMETHODIMP nsImapMockChannel::AsyncOpen(nsIStreamListener *listener, nsISupports *ctxt)
 {
   nsresult rv = NS_OK;
 
   PRInt32 port;
   if (!m_url)
@@ -9256,17 +9256,17 @@ NS_IMETHODIMP nsImapMockChannel::AsyncOp
 
     if (! (imapAction == nsIImapUrl::nsImapSelectFolder || imapAction == nsIImapUrl::nsImapMsgFetch || imapAction == nsIImapUrl::nsImapOpenMimePart
       || imapAction == nsIImapUrl::nsImapMsgFetchPeek))
       return NS_ERROR_FAILURE; // abort the running of this url....it failed a security check
   }
 
   if (ReadFromLocalCache())
   {
-    (void) NotifyStartEndReadFromCache(PR_TRUE);
+    (void) NotifyStartEndReadFromCache(true);
     return NS_OK;
   }
 
   // okay, it's not in the local cache, now check the memory cache...
   // but we can't download for offline use from the memory cache
   if (imapAction != nsIImapUrl::nsImapMsgDownloadForOffline)
   {
     rv = OpenCacheEntry();
@@ -9452,17 +9452,17 @@ NS_IMETHODIMP nsImapMockChannel::Cancel(
   if (m_url)
   {
     nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(m_url);
     DoomCacheEntry(mailnewsUrl);
   }
 
   // Required for killing ImapProtocol thread
   if (imapProtocol)
-    imapProtocol->TellThreadToDie(PR_FALSE);
+    imapProtocol->TellThreadToDie(false);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapMockChannel::Suspend()
 {
     NS_NOTREACHED("nsImapMockChannel::Suspend");
     return NS_ERROR_NOT_IMPLEMENTED;
@@ -9525,17 +9525,17 @@ nsImapMockChannel::OnTransportStatus(nsI
   return NS_OK;
 }
 
 
 nsIMAPMailboxInfo::nsIMAPMailboxInfo(const nsACString &aName, char aDelimiter)
 {
   mMailboxName.Assign(aName);
   mDelimiter = aDelimiter;
-  mChildrenListed = PR_FALSE;
+  mChildrenListed = false;
 }
 
 nsIMAPMailboxInfo::~nsIMAPMailboxInfo()
 {
 }
 
 void nsIMAPMailboxInfo::SetChildrenListed(bool childrenListed)
 {
--- a/mailnews/imap/src/nsImapServerResponseParser.cpp
+++ b/mailnews/imap/src/nsImapServerResponseParser.cpp
@@ -57,52 +57,52 @@
 #include "nsMsgUtils.h"
 
 ////////////////// nsImapServerResponseParser /////////////////////////
 
 extern PRLogModuleInfo* IMAP;
 
 nsImapServerResponseParser::nsImapServerResponseParser(nsImapProtocol &imapProtocolConnection) 
                             : nsIMAPGenericParser(),
-    fReportingErrors(PR_TRUE),
-    fCurrentFolderReadOnly(PR_FALSE),
-    fCurrentLineContainedFlagInfo(PR_FALSE),
-    fFetchEverythingRFC822(PR_FALSE),
-    fServerIsNetscape3xServer(PR_FALSE),
+    fReportingErrors(true),
+    fCurrentFolderReadOnly(false),
+    fCurrentLineContainedFlagInfo(false),
+    fFetchEverythingRFC822(false),
+    fServerIsNetscape3xServer(false),
     fNumberOfUnseenMessages(0),
     fNumberOfExistingMessages(0),
     fNumberOfRecentMessages(0),
     fSizeOfMostRecentMessage(0),
     fTotalDownloadSize(0),
     fCurrentCommandTag(nsnull),
     fSelectedMailboxName(nsnull),
     fIMAPstate(kNonAuthenticated),
-    fLastChunk(PR_FALSE),
+    fLastChunk(false),
     fServerConnection(imapProtocolConnection),
     fHostSessionList(nsnull)
 {
   fSearchResults = nsImapSearchResultSequence::CreateSearchResultSequence();
   fFolderAdminUrl = nsnull;
   fNetscapeServerVersionString = nsnull;
   fXSenderInfo = nsnull;
   fSupportsUserDefinedFlags = 0;
   fSettablePermanentFlags = 0;
   fCapabilityFlag = kCapabilityUndefined; 
   fLastAlert = nsnull;
-  fDownloadingHeaders = PR_FALSE;
-  fGotPermanentFlags = PR_FALSE;
+  fDownloadingHeaders = false;
+  fGotPermanentFlags = false;
   fFolderUIDValidity = 0;
   fHighestModSeq = 0;
   fAuthChallenge = nsnull;
   fStatusUnseenMessages = 0;
   fStatusRecentMessages = 0;
   fStatusNextUID = nsMsgKey_None;
   fStatusExistingMessages = 0;
   fReceivedHeaderOrSizeForUID = nsMsgKey_None;
-  fCondStoreEnabled = PR_FALSE;
+  fCondStoreEnabled = false;
 }
 
 nsImapServerResponseParser::~nsImapServerResponseParser()
 {
   PR_Free( fCurrentCommandTag );
   delete fSearchResults; 
   PR_Free( fFolderAdminUrl );
   PR_Free( fNetscapeServerVersionString );
@@ -116,24 +116,24 @@ nsImapServerResponseParser::~nsImapServe
 
 bool nsImapServerResponseParser::LastCommandSuccessful()
 {
   return (!CommandFailed() && 
     !fServerConnection.DeathSignalReceived() &&
     nsIMAPGenericParser::LastCommandSuccessful());
 }
 
-// returns PR_TRUE if things look ok to continue
+// returns true if things look ok to continue
 bool nsImapServerResponseParser::GetNextLineForParser(char **nextLine)
 {
   bool rv = true;
   *nextLine = fServerConnection.CreateNewLineFromSocket();
   if (fServerConnection.DeathSignalReceived() ||
       NS_FAILED(fServerConnection.GetConnectionStatus()))
-    rv = PR_FALSE;
+    rv = false;
   // we'd really like to try to silently reconnect, but we shouldn't put this
   // message up just in the interrupt case
   if (NS_FAILED(fServerConnection.GetConnectionStatus()) &&
       !fServerConnection.DeathSignalReceived())
     fServerConnection.AlertUserEventUsingId(IMAP_SERVER_DISCONNECTED);
   return rv;
 }
 
@@ -164,17 +164,17 @@ void nsImapServerResponseParser::Increme
   PR_Free( fCurrentCommandTag );
   fCurrentCommandTag = PL_strdup(newExpectedTag);
   if (!fCurrentCommandTag)
     HandleMemoryFailure();
 }
 
 void nsImapServerResponseParser::InitializeState()
 {
-  fCurrentCommandFailed = PR_FALSE;
+  fCurrentCommandFailed = false;
   fNumberOfRecentMessages = 0;
   fReceivedHeaderOrSizeForUID = nsMsgKey_None;
 }
 
 // RFC3501:  response = *(continue-req / response-data) response-done
 //           response-data = "*" SP (resp-cond-state / resp-cond-bye /
 //                           mailbox-data / message-data / capability-data) CRLF
 //           continue-req    = "+" SP (resp-text / base64) CRLF
@@ -182,21 +182,21 @@ void nsImapServerResponseParser::ParseIM
                                                          bool aIgnoreBadAndNOResponses,
                                                          char *aGreetingWithCapability)
 {
   
   NS_ASSERTION(aCurrentCommand && *aCurrentCommand != '\r' && 
     *aCurrentCommand != '\n' && *aCurrentCommand != ' ', "Invailid command string");
   bool sendingIdleDone = !strcmp(aCurrentCommand, "DONE"CRLF);
   if (sendingIdleDone)
-    fWaitingForMoreClientInput = PR_FALSE;
+    fWaitingForMoreClientInput = false;
 
   // Reinitialize the parser
-  SetConnected(PR_TRUE);
-  SetSyntaxError(PR_FALSE);
+  SetConnected(true);
+  SetSyntaxError(false);
   
   // Reinitialize our state
   InitializeState();
   
   // the default is to not pipeline
   fNumberOfTaggedResponsesExpected = 1;
   int numberOfTaggedResponsesReceived = 0;
   
@@ -242,17 +242,17 @@ void nsImapServerResponseParser::ParseIM
 
         // untagged responses [RFC3501, Sec. 2.2.2]
         while (ContinueParse() && !PL_strcmp(fNextToken, "*") )
         {
           response_data();
           if (ContinueParse())
           {
             if (!fAtEndOfLine)
-              SetSyntaxError(PR_TRUE);
+              SetSyntaxError(true);
             else if (!inIdle && !fCurrentCommandFailed && !aGreetingWithCapability)
               AdvanceToNextToken();
           }
         }
 
         // command continuation request [RFC3501, Sec. 7.5]
         if (ContinueParse() && *fNextToken == '+')	// never pipeline APPEND or AUTHENTICATE
         {
@@ -278,17 +278,17 @@ void nsImapServerResponseParser::ParseIM
       } while (ContinueParse() && !inIdle && (numberOfTaggedResponsesReceived < fNumberOfTaggedResponsesExpected));
       
       // check and see if the server is waiting for more input
       // it's possible that we ate this + while parsing certain responses (like cram data),
       // in these cases, the parsing routine for that specific command will manually set
       // fWaitingForMoreClientInput so we don't lose that information....
       if (*fNextToken == '+' || inIdle)
       {
-        fWaitingForMoreClientInput = PR_TRUE;
+        fWaitingForMoreClientInput = true;
       }
       // if we aren't still waiting for more input....
       else if (!fWaitingForMoreClientInput && !aGreetingWithCapability)
       {
         if (ContinueParse())
           response_done();
         
         if (ContinueParse() && !CommandFailed())
@@ -302,33 +302,33 @@ void nsImapServerResponseParser::ParseIM
           ProcessBadCommand(commandToken);
           if (fReportingErrors && !aIgnoreBadAndNOResponses)
             fServerConnection.AlertUserEventFromServer(fCurrentLine);
         }
       }
     }
   }
   else
-    SetConnected(PR_FALSE);
+    SetConnected(false);
 }
 
 void nsImapServerResponseParser::HandleMemoryFailure()
 {
   fServerConnection.AlertUserEventUsingId(IMAP_OUT_OF_MEMORY);
   nsIMAPGenericParser::HandleMemoryFailure();
 }
 
 
 // SEARCH is the only command that requires pre-processing for now.
 // others will be added here.
 void nsImapServerResponseParser::PreProcessCommandToken(const char *commandToken,
                                                         const char *currentCommand)
 {
-  fCurrentCommandIsSingleMessageFetch = PR_FALSE;
-  fWaitingForMoreClientInput = PR_FALSE;
+  fCurrentCommandIsSingleMessageFetch = false;
+  fWaitingForMoreClientInput = false;
   
   if (!PL_strcasecmp(commandToken, "SEARCH"))
     fSearchResults->ResetSequence();
   else if (!PL_strcasecmp(commandToken, "SELECT") && currentCommand)
   {
     // the mailbox name must be quoted, so strip the quotes
     const char *openQuote = PL_strchr(currentCommand, '"');
     NS_ASSERTION(openQuote, "expected open quote in imap server response");
@@ -380,17 +380,17 @@ void nsImapServerResponseParser::PreProc
       char *fetchToken = NS_strtok(WHITESPACE, &placeInTokenString);
       uidToken = nsnull; // use variable to quiet compiler warning
       tagToken = nsnull; // use variable to quiet compiler warning
       if (!PL_strcasecmp(fetchToken, "FETCH") )
       {
         char *uidStringToken = NS_strtok(WHITESPACE, &placeInTokenString);
         // , and : are uid delimiters
         if (!PL_strchr(uidStringToken, ',') && !PL_strchr(uidStringToken, ':'))
-          fCurrentCommandIsSingleMessageFetch = PR_TRUE;
+          fCurrentCommandIsSingleMessageFetch = true;
       }
     }
   }
 }
 
 const char *nsImapServerResponseParser::GetSelectedMailboxName()
 {
   return fSelectedMailboxName;
@@ -440,17 +440,17 @@ void nsImapServerResponseParser::Process
     // Move this to be called from the connection object
     // itself.
   }
   else if (!PL_strcasecmp(commandToken, "FETCH"))
   {
     if (!fZeroLengthMessageUidString.IsEmpty())
     {
       // "Deleting zero length message");
-      fServerConnection.Store(fZeroLengthMessageUidString, "+Flags (\\Deleted)", PR_TRUE);
+      fServerConnection.Store(fZeroLengthMessageUidString, "+Flags (\\Deleted)", true);
       if (LastCommandSuccessful())
         fServerConnection.Expunge();
       
       fZeroLengthMessageUidString.Truncate();
     }
   }
   if (GetFillingInShell())
   {
@@ -469,17 +469,17 @@ void nsImapServerResponseParser::Process
       if ((navCon && navCon->GetPseudoInterrupted())
         || fServerConnection.DeathSignalReceived())
       {
         // we were pseudointerrupted or interrupted
         // if it's not in the cache, then we were (pseudo)interrupted while generating
         // for the first time. Release it.
         if (!m_shell->IsShellCached())
           m_shell = nsnull;
-        navCon->PseudoInterrupt(PR_FALSE);
+        navCon->PseudoInterrupt(false);
       }
       else if (m_shell->GetIsValid())
       {
         // If we have a valid shell that has not already been cached, then cache it.
         if (!m_shell->IsShellCached() && fHostSessionList)	// cache is responsible for destroying it
         {
           PR_LOG(IMAP, PR_LOG_ALWAYS, 
             ("BODYSHELL:  Adding shell to cache."));
@@ -533,57 +533,57 @@ void nsImapServerResponseParser::respons
   if (ContinueParse())
   {
     // Instead of comparing lots of strings and make function calls, try to
     // pre-flight the possibilities based on the first letter of the token.
     switch (NS_ToUpper(fNextToken[0]))
     {
     case 'O':   // OK
       if (NS_ToUpper(fNextToken[1]) == 'K')
-        resp_cond_state(PR_FALSE);
-      else SetSyntaxError(PR_TRUE);
+        resp_cond_state(false);
+      else SetSyntaxError(true);
       break;
     case 'N':   // NO
       if (NS_ToUpper(fNextToken[1]) == 'O')
-        resp_cond_state(PR_FALSE);
+        resp_cond_state(false);
       else if (!PL_strcasecmp(fNextToken, "NAMESPACE"))
         namespace_data();
-      else SetSyntaxError(PR_TRUE);
+      else SetSyntaxError(true);
       break;
     case 'B':   // BAD
       if (!PL_strcasecmp(fNextToken, "BAD"))
-        resp_cond_state(PR_FALSE);
+        resp_cond_state(false);
       else if (!PL_strcasecmp(fNextToken, "BYE"))
         resp_cond_bye();
-      else SetSyntaxError(PR_TRUE);
+      else SetSyntaxError(true);
       break;
     case 'F':
       if (!PL_strcasecmp(fNextToken, "FLAGS"))
         mailbox_data();
-      else SetSyntaxError(PR_TRUE);
+      else SetSyntaxError(true);
       break;
     case 'P':
       if (PL_strcasecmp(fNextToken, "PERMANENTFLAGS"))
         mailbox_data();
-      else SetSyntaxError(PR_TRUE);
+      else SetSyntaxError(true);
       break;
     case 'L':
       if (!PL_strcasecmp(fNextToken, "LIST") || !PL_strcasecmp(fNextToken, "LSUB"))
         mailbox_data();
       else if (!PL_strcasecmp(fNextToken, "LANGUAGE"))
         language_data();
       else
-        SetSyntaxError(PR_TRUE);
+        SetSyntaxError(true);
       break;
     case 'M':
       if (!PL_strcasecmp(fNextToken, "MAILBOX"))
         mailbox_data();
       else if (!PL_strcasecmp(fNextToken, "MYRIGHTS"))
-        myrights_data(PR_FALSE);
-      else SetSyntaxError(PR_TRUE);
+        myrights_data(false);
+      else SetSyntaxError(true);
       break;
     case 'S':
       if (!PL_strcasecmp(fNextToken, "SEARCH"))
         mailbox_data();
       else if (!PL_strcasecmp(fNextToken, "STATUS"))
       {
         AdvanceToNextToken();
         if (fNextToken)
@@ -645,64 +645,64 @@ void nsImapServerResponseParser::respons
               // else we advance
               if ( *(fNextToken + strlen(fNextToken) - 1) == ')')
                 fNextToken += strlen(fNextToken) - 1;
             }
           }
           else if (*fNextToken == ')')
             break;
           else if (!fAtEndOfLine)
-            SetSyntaxError(PR_TRUE);
+            SetSyntaxError(true);
         } 
-      } else SetSyntaxError(PR_TRUE);
+      } else SetSyntaxError(true);
       break;
     case 'C':
       if (!PL_strcasecmp(fNextToken, "CAPABILITY"))
         capability_data();
-      else SetSyntaxError(PR_TRUE);
+      else SetSyntaxError(true);
       break;
     case 'V':
       if (!PL_strcasecmp(fNextToken, "VERSION"))
       {
         // figure out the version of the Netscape server here
         PR_FREEIF(fNetscapeServerVersionString);
         AdvanceToNextToken();
         if (! fNextToken) 
-          SetSyntaxError(PR_TRUE);
+          SetSyntaxError(true);
         else
         {
           fNetscapeServerVersionString = CreateAstring();
           AdvanceToNextToken();
           if (fNetscapeServerVersionString)
           {
             fServerIsNetscape3xServer = (*fNetscapeServerVersionString == '3');
           }
         }
         skip_to_CRLF();
       }
-      else SetSyntaxError(PR_TRUE);
+      else SetSyntaxError(true);
       break;
     case 'A':
       if (!PL_strcasecmp(fNextToken, "ACL"))
       {
         acl_data();
       }
       else if (!PL_strcasecmp(fNextToken, "ACCOUNT-URL"))
       {
         fMailAccountUrl.Truncate();
         AdvanceToNextToken();
         if (! fNextToken) 
-          SetSyntaxError(PR_TRUE);
+          SetSyntaxError(true);
         else
         {
           fMailAccountUrl.Adopt(CreateAstring());
           AdvanceToNextToken();
         }
       } 
-      else SetSyntaxError(PR_TRUE);
+      else SetSyntaxError(true);
       break;
     case 'E':
       if (!PL_strcasecmp(fNextToken, "ENABLED"))
         enable_data();
         break;
     case 'X':
       if (!PL_strcasecmp(fNextToken, "XSERVERINFO"))
         xserverinfo_data();
@@ -724,33 +724,33 @@ void nsImapServerResponseParser::respons
           {
             AdvanceToNextToken();
             customCommandResponse.Append(fNextToken);
             customCommandResponse.Append(" ");
           }
           fServerConnection.GetCurrentUrl()->SetCustomCommandResult(customCommandResponse);
         }
         else
-          SetSyntaxError(PR_TRUE);
+          SetSyntaxError(true);
       }
       break;
     case 'Q':
       if (!PL_strcasecmp(fNextToken, "QUOTAROOT")  || !PL_strcasecmp(fNextToken, "QUOTA"))
         quota_data();
       else
-        SetSyntaxError(PR_TRUE);
+        SetSyntaxError(true);
       break;
     case 'I':
       id_data();
       break;
     default:
       if (IsNumericString(fNextToken))
         numeric_mailbox_data();
       else
-        SetSyntaxError(PR_TRUE);
+        SetSyntaxError(true);
       break;
     }
     
     if (ContinueParse())
       PostProcessEndOfLine();
   }
 }
 
@@ -760,17 +760,17 @@ void nsImapServerResponseParser::PostPro
   // for now we only have to do one thing here
   // a fetch response to a 'uid store' command might return the flags
   // before it returns the uid of the message.  So we need both before
   // we report the new flag info to the front end
   
   // also check and be sure that there was a UID in the current response
   if (fCurrentLineContainedFlagInfo && CurrentResponseUID())
   {
-    fCurrentLineContainedFlagInfo = PR_FALSE;
+    fCurrentLineContainedFlagInfo = false;
     fServerConnection.NotifyMessageFlags(fSavedFlagInfo, CurrentResponseUID(), fHighestModSeq);
   }
 }
 
 
 /*
  mailbox_data    ::=  "FLAGS" SPACE flag_list /
                                "LIST" SPACE mailbox_list /
@@ -800,23 +800,23 @@ void nsImapServerResponseParser::mailbox
     else
       parse_folder_flags();
   }
   else if (!PL_strcasecmp(fNextToken, "LIST") ||
            !PL_strcasecmp(fNextToken, "XLIST"))
   {
     AdvanceToNextToken();
     if (ContinueParse())
-      mailbox_list(PR_FALSE);
+      mailbox_list(false);
   }
   else if (!PL_strcasecmp(fNextToken, "LSUB"))
   {
     AdvanceToNextToken();
     if (ContinueParse())
-      mailbox_list(PR_TRUE);
+      mailbox_list(true);
   }
   else if (!PL_strcasecmp(fNextToken, "MAILBOX"))
     skip_to_CRLF();
   else if (!PL_strcasecmp(fNextToken, "SEARCH"))
   {
     fSearchResults->AddSearchResultLine(fCurrentLine);
     fServerConnection.NotifySearchHit(fCurrentLine);
     skip_to_CRLF();
@@ -833,24 +833,24 @@ void nsImapServerResponseParser::mailbox
 {
   nsImapMailboxSpec *boxSpec = new nsImapMailboxSpec;
   NS_ADDREF(boxSpec);
   bool needsToFreeBoxSpec = true;
   if (!boxSpec)
     HandleMemoryFailure();
   else
   {
-    boxSpec->mFolderSelected = PR_FALSE;
+    boxSpec->mFolderSelected = false;
     boxSpec->mBoxFlags = kNoFlags;
     boxSpec->mAllocatedPathName.Truncate();
     boxSpec->mHostName.Truncate();
     boxSpec->mConnection = &fServerConnection;
     boxSpec->mFlagState = nsnull;
     boxSpec->mDiscoveredFromLsub = discoveredFromLsub;
-    boxSpec->mOnlineVerified = PR_TRUE;
+    boxSpec->mOnlineVerified = true;
     boxSpec->mBoxFlags &= ~kNameSpace;
     
     bool endOfFlags = false;
     fNextToken++;// eat the first "("
     do {
       if (!PL_strncasecmp(fNextToken, "\\Marked", 7))
         boxSpec->mBoxFlags |= kMarked;
       else if (!PL_strncasecmp(fNextToken, "\\Unmarked", 9))
@@ -889,17 +889,17 @@ void nsImapServerResponseParser::mailbox
       }
       else	// likely NIL.  Discovered late in 4.02 that we do not handle literals here (e.g. {10} <10 chars>), although this is almost impossibly unlikely
         boxSpec->mHierarchySeparator = kOnlineHierarchySeparatorNil;
       AdvanceToNextToken();
       if (ContinueParse())
       {
         // nsImapProtocol::DiscoverMailboxSpec() eventually frees the
         // boxSpec
-        needsToFreeBoxSpec = PR_FALSE;
+        needsToFreeBoxSpec = false;
         mailbox(boxSpec);
       }
     }
   }
   if (needsToFreeBoxSpec)
     NS_RELEASE(boxSpec);
 }
 
@@ -948,17 +948,17 @@ void nsImapServerResponseParser::mailbox
         break;
       default:	// (kUnknownNamespace)
         break;
       }
       boxSpec->mNamespaceForFolder = ns;
     }
     
     //    	char *convertedName =
-    //            fServerConnection.CreateUtf7ConvertedString(boxname, PR_FALSE);
+    //            fServerConnection.CreateUtf7ConvertedString(boxname, false);
     //		PRUnichar *unicharName;
     //        unicharName = fServerConnection.CreatePRUnicharStringFromUTF7(boxname);
     //    	PL_strfree(boxname);
     //    	boxname = convertedName;
   }
   
   if (!boxname)
   {
@@ -978,17 +978,17 @@ void nsImapServerResponseParser::mailbox
     if (boxname)
       PL_strfree( boxname);
     // storage for the boxSpec is now owned by server connection
     fServerConnection.DiscoverMailboxSpec(boxSpec);
 
     // if this was cancelled by the user,then we sure don't want to
     // send more mailboxes their way
     if (NS_FAILED(fServerConnection.GetConnectionStatus()))
-      SetConnected(PR_FALSE);
+      SetConnected(false);
   }
 }
 
 
 /*
  message_data    ::= nz_number SPACE ("EXPUNGE" /
                               ("FETCH" SPACE msg_fetch) / msg_obsolete)
 
@@ -1050,17 +1050,17 @@ msg_fetch       ::= "(" 1#("BODY" SPACE 
 
 void nsImapServerResponseParser::msg_fetch()
 {
   nsresult res;
   bool bNeedEndMessageDownload = false;
   
   // we have not seen a uid response or flags for this fetch, yet
   fCurrentResponseUID = 0;
-  fCurrentLineContainedFlagInfo = PR_FALSE;
+  fCurrentLineContainedFlagInfo = false;
   fSizeOfMostRecentMessage = 0;  
   // show any incremental progress, for instance, for header downloading
   fServerConnection.ShowProgress();
   
   fNextToken++;	// eat the '(' character
   
   // some of these productions are ignored for now
   while (ContinueParse() && (*fNextToken != ')') )
@@ -1128,21 +1128,21 @@ void nsImapServerResponseParser::msg_fet
           fNextToken = strchr(fNextToken, ')');
           if (fNextToken)
           {
             fNextToken++;
             if (*fNextToken != ')')
               AdvanceToNextToken();
           }
           else
-            SetSyntaxError(PR_TRUE);
+            SetSyntaxError(true);
         }
         else
         {
-          SetSyntaxError(PR_TRUE);
+          SetSyntaxError(true);
         }
       }
     }
     else if (!PL_strcasecmp(fNextToken, "RFC822") ||
       !PL_strcasecmp(fNextToken, "RFC822.HEADER") ||
       !PL_strncasecmp(fNextToken, "BODY[HEADER",11) ||
       !PL_strncasecmp(fNextToken, "BODY[]", 6) ||
       !PL_strcasecmp(fNextToken, "RFC822.TEXT") ||
@@ -1153,32 +1153,32 @@ void nsImapServerResponseParser::msg_fet
       if (fCurrentResponseUID == 0)
         fFlagState->GetUidOfMessage(fFetchResponseIndex - 1, &fCurrentResponseUID);
       
       if (!PL_strcasecmp(fNextToken, "RFC822.HEADER") ||
         !PL_strcasecmp(fNextToken, "BODY[HEADER]"))
       {
         // all of this message's headers
         AdvanceToNextToken();
-        fDownloadingHeaders = PR_TRUE;
+        fDownloadingHeaders = true;
         BeginMessageDownload(MESSAGE_RFC822); // initialize header parser
-        bNeedEndMessageDownload = PR_FALSE;
+        bNeedEndMessageDownload = false;
         if (ContinueParse())
           msg_fetch_headers(nsnull);
       }
       else if (!PL_strncasecmp(fNextToken, "BODY[HEADER.FIELDS",19))
       {
-        fDownloadingHeaders = PR_TRUE;
+        fDownloadingHeaders = true;
         BeginMessageDownload(MESSAGE_RFC822); // initialize header parser
         // specific message header fields
         while (ContinueParse() && fNextToken[strlen(fNextToken)-1] != ']')
           AdvanceToNextToken();
         if (ContinueParse())
         {
-          bNeedEndMessageDownload = PR_FALSE;
+          bNeedEndMessageDownload = false;
           AdvanceToNextToken();
           if (ContinueParse())
             msg_fetch_headers(nsnull);
         }
       }
       else
       {
         char *whereHeader = PL_strstr(fNextToken, "HEADER");
@@ -1205,37 +1205,37 @@ void nsImapServerResponseParser::msg_fet
                   if (ContinueParse())
                     msg_fetch_headers(partNum);
                 }
               }
               PR_Free(partNum);
             }
           }
           else
-            SetSyntaxError(PR_TRUE);
+            SetSyntaxError(true);
         }
         else
         {
-          fDownloadingHeaders = PR_FALSE;
+          fDownloadingHeaders = false;
           
           bool chunk = false;
           PRInt32 origin = 0;
           if (!PL_strncasecmp(fNextToken, "BODY[]<", 7))
           {
             char *tokenCopy = 0;
             tokenCopy = PL_strdup(fNextToken);
             if (tokenCopy)
             {
               char *originString = tokenCopy + 7;	// where the byte number starts
               char *closeBracket = PL_strchr(tokenCopy,'>');
               if (closeBracket && originString && *originString)
               {
                 *closeBracket = 0;
                 origin = atoi(originString);
-                chunk = PR_TRUE;
+                chunk = true;
               }
               PR_Free(tokenCopy);
             }
           }
           
           AdvanceToNextToken();
           if (ContinueParse())
           {
@@ -1286,17 +1286,17 @@ void nsImapServerResponseParser::msg_fet
             AdvanceToNextToken();
         }
       }
       else if (!PL_strcasecmp(fNextToken, "XSENDER"))
       {
         PR_FREEIF(fXSenderInfo);
         AdvanceToNextToken();
         if (! fNextToken) 
-          SetSyntaxError(PR_TRUE);
+          SetSyntaxError(true);
         else
         {
           fXSenderInfo = CreateAstring(); 
           AdvanceToNextToken();
         }
       }
       // I only fetch RFC822 so I should never see these BODY responses
       else if (!PL_strcasecmp(fNextToken, "BODY"))
@@ -1308,41 +1308,41 @@ void nsImapServerResponseParser::msg_fet
         bodystructure_data();
       }
       else if (!PL_strncasecmp(fNextToken, "BODY[TEXT", 9))
       {
         mime_data();
       }
       else if (!PL_strncasecmp(fNextToken, "BODY[", 5) && PL_strncasecmp(fNextToken, "BODY[]", 6))
       {
-        fDownloadingHeaders = PR_FALSE;
+        fDownloadingHeaders = false;
         // A specific MIME part, or MIME part header
         mime_data();
       }
       else if (!PL_strcasecmp(fNextToken, "ENVELOPE"))
       {
-        fDownloadingHeaders = PR_TRUE;
-        bNeedEndMessageDownload = PR_TRUE;
+        fDownloadingHeaders = true;
+        bNeedEndMessageDownload = true;
         BeginMessageDownload(MESSAGE_RFC822);
         envelope_data(); 
       }
       else if (!PL_strcasecmp(fNextToken, "INTERNALDATE"))
       {
-        fDownloadingHeaders = PR_TRUE; // we only request internal date while downloading headers
+        fDownloadingHeaders = true; // we only request internal date while downloading headers
         if (!bNeedEndMessageDownload)
           BeginMessageDownload(MESSAGE_RFC822);
-        bNeedEndMessageDownload = PR_TRUE;
+        bNeedEndMessageDownload = true;
         internal_date(); 
       }
       else if (!PL_strcasecmp(fNextToken, "XAOL-ENVELOPE"))
       {
-        fDownloadingHeaders = PR_TRUE;
+        fDownloadingHeaders = true;
         if (!bNeedEndMessageDownload)
           BeginMessageDownload(MESSAGE_RFC822);
-        bNeedEndMessageDownload = PR_TRUE;
+        bNeedEndMessageDownload = true;
         xaolenvelope_data();
       }
       else
       {
         nsImapAction imapAction; 
         if (!fServerConnection.GetCurrentUrl())
           return;
         fServerConnection.GetCurrentUrl()->GetImapAction(&imapAction);
@@ -1355,34 +1355,34 @@ void nsImapServerResponseParser::msg_fet
           // look through the tokens until we find the closing ')'
           // we can have a result like the following:
           // ((A B) (C D) (E F))
           fServerConnection.GetCurrentUrl()->SetCustomAttributeResult(nsDependentCString(fetchResult));
           PR_Free(fetchResult);
           break;
         }
         else
-          SetSyntaxError(PR_TRUE);
+          SetSyntaxError(true);
       }
       
         }
         
         if (ContinueParse())
         {
           if (CurrentResponseUID() && CurrentResponseUID() != nsMsgKey_None 
             && fCurrentLineContainedFlagInfo && fFlagState)
           {
             fFlagState->AddUidFlagPair(CurrentResponseUID(), fSavedFlagInfo, fFetchResponseIndex - 1);
             for (PRInt32 i = 0; i < fCustomFlags.Length(); i++)
               fFlagState->AddUidCustomFlagPair(CurrentResponseUID(), fCustomFlags[i].get());
             fCustomFlags.Clear();
           }
           
           if (fFetchingAllFlags)
-            fCurrentLineContainedFlagInfo = PR_FALSE;	// do not fire if in PostProcessEndOfLine          
+            fCurrentLineContainedFlagInfo = false;	// do not fire if in PostProcessEndOfLine          
           
           AdvanceToNextToken();	// eat the ')' ending token
 										// should be at end of line
           if (bNeedEndMessageDownload)
           {
             if (ContinueParse())
             {
               // complete the message download
@@ -1440,43 +1440,43 @@ void nsImapServerResponseParser::envelop
   AdvanceToNextToken();
   fNextToken++; // eat '('
   for (int tableIndex = 0; tableIndex < (int)(sizeof(EnvelopeTable) / sizeof(EnvelopeTable[0])); tableIndex++)
   {
     if (!ContinueParse())
       break;
     else if (*fNextToken == ')')
     {
-      SetSyntaxError(PR_TRUE); // envelope too short
+      SetSyntaxError(true); // envelope too short
       break;
     }
     else
     {
       nsCAutoString headerLine(EnvelopeTable[tableIndex].name);
       headerLine += ": ";
       bool headerNonNil = true;
       if (EnvelopeTable[tableIndex].type == envelopeString)
       {
         nsCAutoString strValue;
         strValue.Adopt(CreateNilString());
         if (!strValue.IsEmpty())
           headerLine.Append(strValue);
         else
-          headerNonNil = PR_FALSE;
+          headerNonNil = false;
       }
       else
       {
         nsCAutoString address;
         parse_address(address);
         headerLine += address;
         if (address.IsEmpty())
-          headerNonNil = PR_FALSE;
+          headerNonNil = false;
       }
       if (headerNonNil)
-        fServerConnection.HandleMessageDownLoadLine(headerLine.get(), PR_FALSE);
+        fServerConnection.HandleMessageDownLoadLine(headerLine.get(), false);
     }
     if (ContinueParse())
       AdvanceToNextToken();
   }
   // Now we should be at the end of the envelope and have *fToken == ')'.
   // Skip this last parenthesis.
   AdvanceToNextToken();
 }
@@ -1489,60 +1489,60 @@ void nsImapServerResponseParser::xaolenv
   if (ContinueParse() && (*fNextToken != ')'))
   {
     AdvanceToNextToken();
     fNextToken++; // eat '('
     nsCAutoString subject;
     subject.Adopt(CreateNilString());
     nsCAutoString subjectLine("Subject: ");
     subjectLine += subject;
-    fServerConnection.HandleMessageDownLoadLine(subjectLine.get(), PR_FALSE);
+    fServerConnection.HandleMessageDownLoadLine(subjectLine.get(), false);
     fNextToken++; // eat the next '('
     if (ContinueParse())
     {
       AdvanceToNextToken();
       if (ContinueParse())
       {
         nsCAutoString fromLine;
         if (!strcmp(GetSelectedMailboxName(), "Sent Items"))
         {
           // xaol envelope switches the From with the To, so we switch them back and
           // create a fake from line From: user@aol.com
           fromLine.Append("To: ");
           nsCAutoString fakeFromLine(NS_LITERAL_CSTRING("From: "));
           fakeFromLine.Append(fServerConnection.GetImapUserName());
           fakeFromLine.Append(NS_LITERAL_CSTRING("@aol.com"));
-          fServerConnection.HandleMessageDownLoadLine(fakeFromLine.get(), PR_FALSE);
+          fServerConnection.HandleMessageDownLoadLine(fakeFromLine.get(), false);
         }
         else
         {
           fromLine.Append("From: ");
         }
         parse_address(fromLine);
-        fServerConnection.HandleMessageDownLoadLine(fromLine.get(), PR_FALSE);
+        fServerConnection.HandleMessageDownLoadLine(fromLine.get(), false);
         if (ContinueParse())
         {
           AdvanceToNextToken();	// ge attachment size
           PRInt32 attachmentSize = atoi(fNextToken);
           if (attachmentSize != 0)
           {
             nsCAutoString attachmentLine("X-attachment-size: ");
             attachmentLine.AppendInt(attachmentSize);
-            fServerConnection.HandleMessageDownLoadLine(attachmentLine.get(), PR_FALSE);
+            fServerConnection.HandleMessageDownLoadLine(attachmentLine.get(), false);
           }
         }
         if (ContinueParse())
         {
           AdvanceToNextToken();	// skip image size
           PRInt32 imageSize = atoi(fNextToken);
           if (imageSize != 0)
           {
             nsCAutoString imageLine("X-image-size: ");
             imageLine.AppendInt(imageSize);
-            fServerConnection.HandleMessageDownLoadLine(imageLine.get(), PR_FALSE);
+            fServerConnection.HandleMessageDownLoadLine(imageLine.get(), false);
           }
         }
         if (ContinueParse())
           AdvanceToNextToken();	// skip )
       }
     }
   }
 }
@@ -1558,17 +1558,17 @@ void nsImapServerResponseParser::parse_a
   while (ContinueParse() && *fNextToken == '(')
   {
     NS_ASSERTION(*fNextToken == '(', "address should start with '('");
     fNextToken++; // eat the next '('
     
     if (!firstAddress)
       addressLine += ", ";
     
-    firstAddress = PR_FALSE;
+    firstAddress = false;
     char *personalName = CreateNilString();
     AdvanceToNextToken();
     char *atDomainList = CreateNilString();
     if (ContinueParse())
     {
       AdvanceToNextToken();
       char *mailboxName = CreateNilString();
       if (ContinueParse())
@@ -1615,17 +1615,17 @@ void nsImapServerResponseParser::interna
   {
     nsCAutoString dateLine("Date: ");
     char *strValue = CreateNilString();
     if (strValue)
     {
       dateLine += strValue;
       NS_Free(strValue);
     }
-    fServerConnection.HandleMessageDownLoadLine(dateLine.get(), PR_FALSE);
+    fServerConnection.HandleMessageDownLoadLine(dateLine.get(), false);
   }
   // advance the parser.
   AdvanceToNextToken();
 }
 
 void nsImapServerResponseParser::flags()
 {
   imapMessageFlagsType messageFlags = kNoImapMsgFlag;
@@ -1644,75 +1644,75 @@ void nsImapServerResponseParser::flags()
     bool knownFlag = false;					     
     if (*fNextToken == '\\')
     {
       switch (NS_ToUpper(fNextToken[1])) {
       case 'S':
         if (!PL_strncasecmp(fNextToken, "\\Seen",5))
         {
           messageFlags |= kImapMsgSeenFlag;
-          knownFlag = PR_TRUE;
+          knownFlag = true;
         }
         break;
       case 'A':
         if (!PL_strncasecmp(fNextToken, "\\Answered",9))
         {
           messageFlags |= kImapMsgAnsweredFlag;
-          knownFlag = PR_TRUE;
+          knownFlag = true;
         }
         break;
       case 'F':
         if (!PL_strncasecmp(fNextToken, "\\Flagged",8))
         {
           messageFlags |= kImapMsgFlaggedFlag;
-          knownFlag = PR_TRUE;
+          knownFlag = true;
         }
         break;
       case 'D':
         if (!PL_strncasecmp(fNextToken, "\\Deleted",8))
         {
           messageFlags |= kImapMsgDeletedFlag;
-          knownFlag = PR_TRUE;
+          knownFlag = true;
         }
         else if (!PL_strncasecmp(fNextToken, "\\Draft",6))
         {
           messageFlags |= kImapMsgDraftFlag;
-          knownFlag = PR_TRUE;
+          knownFlag = true;
         }
         break;
       case 'R':
         if (!PL_strncasecmp(fNextToken, "\\Recent",7))
         {
           messageFlags |= kImapMsgRecentFlag;
-          knownFlag = PR_TRUE;
+          knownFlag = true;
         }
         break;
       default:
         break;
       }
     }
     else if (*fNextToken == '$')
     {
       switch (NS_ToUpper(fNextToken[1])) {
       case 'M':
         if ((fSupportsUserDefinedFlags & (kImapMsgSupportUserFlag |
           kImapMsgSupportMDNSentFlag))
           && !PL_strncasecmp(fNextToken, "$MDNSent",8))
         {
           messageFlags |= kImapMsgMDNSentFlag;
-          knownFlag = PR_TRUE;
+          knownFlag = true;
         }
         break;
       case 'F':
         if ((fSupportsUserDefinedFlags & (kImapMsgSupportUserFlag |
           kImapMsgSupportForwardedFlag))
           && !PL_strncasecmp(fNextToken, "$Forwarded",10))
         {
           messageFlags |= kImapMsgForwardedFlag;
-          knownFlag = PR_TRUE;
+          knownFlag = true;
         }
         break;
       default:
         break;
       }
     }
     if (!knownFlag && fFlagState)
     {
@@ -1735,33 +1735,33 @@ void nsImapServerResponseParser::flags()
     else
       AdvanceToNextToken();
   }
   
   if (ContinueParse())
     while(*fNextToken != ')')
       fNextToken++;
     
-    fCurrentLineContainedFlagInfo = PR_TRUE;	// handled in PostProcessEndOfLine
+    fCurrentLineContainedFlagInfo = true;	// handled in PostProcessEndOfLine
     fSavedFlagInfo = messageFlags;
 }
 
 // RFC3501:  resp-cond-state = ("OK" / "NO" / "BAD") SP resp-text
 //                             ; Status condition
 void nsImapServerResponseParser::resp_cond_state(bool isTagged)
 {
   // According to RFC3501, Sec. 7.1, the untagged NO response "indicates a
   // warning; the command can still complete successfully."
   // However, the untagged BAD response "indicates a protocol-level error for
   // which the associated command can not be determined; it can also indicate an
   // internal server failure." 
   // Thus, we flag an error for a tagged NO response and for any BAD response.
   if (isTagged && !PL_strcasecmp(fNextToken, "NO") ||
     !PL_strcasecmp(fNextToken, "BAD"))
-    fCurrentCommandFailed = PR_TRUE;
+    fCurrentCommandFailed = true;
   
   AdvanceToNextToken();
   if (ContinueParse())
     resp_text();
 }
 
 /*
 resp_text       ::= ["[" resp_text_code "]" SPACE] (text_mime2 / text)
@@ -1903,26 +1903,26 @@ void nsImapServerResponseParser::resp_te
       parse_folder_flags();
       // if the server tells us there are no permanent flags, we're
       // just going to pretend that the FLAGS response flags, if any, are
       // permanent in case the server is broken. This will allow us
       // to store delete and seen flag changes - if they're not permanent, 
       // they're not permanent, but at least we'll try to set them.
       if (!fSettablePermanentFlags)
         fSettablePermanentFlags = saveSettableFlags;
-      fGotPermanentFlags = PR_TRUE;
+      fGotPermanentFlags = true;
     }
     else if (!PL_strcasecmp(fNextToken,"READ-ONLY]"))
     {
-      fCurrentFolderReadOnly = PR_TRUE;
+      fCurrentFolderReadOnly = true;
       AdvanceToNextToken();
     }
     else if (!PL_strcasecmp(fNextToken,"READ-WRITE]"))
     {
-      fCurrentFolderReadOnly = PR_FALSE;
+      fCurrentFolderReadOnly = false;
       AdvanceToNextToken();
     }
     else if (!PL_strcasecmp(fNextToken,"TRYCREATE]"))
     {
       // do nothing for now
       AdvanceToNextToken();
     }
     else if (!PL_strcasecmp(fNextToken,"UIDVALIDITY"))
@@ -1992,33 +1992,33 @@ void nsImapServerResponseParser::resp_te
       }
     }
     else if (!PL_strcasecmp(fNextToken, "HIGHESTMODSEQ"))
     {
       AdvanceToNextToken();
       if (ContinueParse())
       {
         fHighestModSeq = ParseUint64Str(fNextToken); 
-        fUseModSeq = PR_TRUE;
+        fUseModSeq = true;
         AdvanceToNextToken();
       }
     }
     else if (!PL_strcasecmp(fNextToken, "NOMODSEQ]"))
     {
       fHighestModSeq = 0;
-      fUseModSeq = PR_FALSE;
+      fUseModSeq = false;
       skip_to_CRLF();
     }
     else if (!PL_strcasecmp(fNextToken, "CAPABILITY"))
     {
       capability_data();
     }
     else if (!PL_strcasecmp(fNextToken, "MYRIGHTS"))
     {
-      myrights_data(PR_TRUE);      
+      myrights_data(true);      
     }
     else // just text
     {
       // do nothing but eat tokens until we see the ] or CRLF
       // we should see the ] but we don't want to go into an
       // endless loop if the CRLF is not there
       do 
       {
@@ -2043,21 +2043,21 @@ void nsImapServerResponseParser::resp_te
  
 // RFC3501:  response-tagged = tag SP resp-cond-state CRLF
  void nsImapServerResponseParser::response_tagged()
  {
    // eat the tag
    AdvanceToNextToken();
    if (ContinueParse())
    {
-     resp_cond_state(PR_TRUE);
+     resp_cond_state(true);
      if (ContinueParse())
      {
        if (!fAtEndOfLine)
-         SetSyntaxError(PR_TRUE);
+         SetSyntaxError(true);
        else if (!fCurrentCommandFailed)
          ResetLexAnalyzer();
      }
    }
  }
  
 // RFC3501:  response-fatal = "*" SP resp-cond-bye CRLF
 //                              ; Server closes connection immediately
@@ -2067,65 +2067,65 @@ void nsImapServerResponseParser::resp_te
    AdvanceToNextToken();
    if (ContinueParse())
      resp_cond_bye();
  }
 
 // RFC3501:  resp-cond-bye = "BYE" SP resp-text
 void nsImapServerResponseParser::resp_cond_bye()
 {
-  SetConnected(PR_FALSE);
+  SetConnected(false);
   fIMAPstate = kNonAuthenticated;
 }
 
 
 void nsImapServerResponseParser::msg_fetch_headers(const char *partNum)
 {
   if (GetFillingInShell())
   {
     char *headerData = CreateAstring();
     AdvanceToNextToken();
     m_shell->AdoptMessageHeaders(headerData, partNum);
   }
   else
   {
-    msg_fetch_content(PR_FALSE, 0, MESSAGE_RFC822);
+    msg_fetch_content(false, 0, MESSAGE_RFC822);
   }
 }
 
 
 /* nstring         ::= string / nil
 string          ::= quoted / literal
 nil             ::= "NIL"
 
 */
 void nsImapServerResponseParser::msg_fetch_content(bool chunk, PRInt32 origin, const char *content_type)
 {
   // setup the stream for downloading this message.
   // Don't do it if we are filling in a shell or downloading a part.
   // DO do it if we are downloading a whole message as a result of
   // an invalid shell trying to generate.
   if ((!chunk || (origin == 0)) && !GetDownloadingHeaders() &&
-    (GetFillingInShell() ? m_shell->GetGeneratingWholeMessage() : PR_TRUE))
+    (GetFillingInShell() ? m_shell->GetGeneratingWholeMessage() : true))
   {
     if (NS_FAILED(BeginMessageDownload(content_type)))
       return;
   }
   
   if (PL_strcasecmp(fNextToken, "NIL"))
   {
     if (*fNextToken == '"')
       fLastChunk = msg_fetch_quoted(chunk, origin);
     else
       fLastChunk = msg_fetch_literal(chunk, origin);
   }
   else
     AdvanceToNextToken();	// eat "NIL"
   
-  if (fLastChunk && (GetFillingInShell() ? m_shell->GetGeneratingWholeMessage() : PR_TRUE))
+  if (fLastChunk && (GetFillingInShell() ? m_shell->GetGeneratingWholeMessage() : true))
   {
     // complete the message download
     if (ContinueParse())
     {
       if (fReceivedHeaderOrSizeForUID == CurrentResponseUID())
       {
         fServerConnection.NormalMessageEndDownload();
         fReceivedHeaderOrSizeForUID = nsMsgKey_None;
@@ -2153,17 +2153,17 @@ bool nsImapServerResponseParser::msg_fet
   
 #ifdef DEBUG_chrisf
 	 PR_ASSERT(!chunk);
 #endif
          
          char *q = CreateQuoted();
          if (q)
          {
-           fServerConnection.HandleMessageDownLoadLine(q, PR_FALSE, q);
+           fServerConnection.HandleMessageDownLoadLine(q, false, q);
            PR_Free(q);
          }
          
          AdvanceToNextToken();
          
          bool lastChunk = !chunk || ((origin + numberOfCharsInThisChunk) >= fTotalDownloadSize);
          return lastChunk;
 }
@@ -2175,17 +2175,17 @@ void nsImapServerResponseParser::msg_obs
     AdvanceToNextToken();
   else if (!PL_strcasecmp(fNextToken, "STORE"))
   {
     AdvanceToNextToken();
     if (ContinueParse())
       msg_fetch();
   }
   else
-    SetSyntaxError(PR_TRUE);
+    SetSyntaxError(true);
   
 }
 
 void nsImapServerResponseParser::capability_data()
 {
   PRInt32 endToken = -1;
   fCapabilityFlag = kCapabilityDefined | kHasAuthOldLoginCapability;
   do {
@@ -2328,17 +2328,17 @@ void nsImapServerResponseParser::xserver
 
 void nsImapServerResponseParser::enable_data()
 {
   do
   {
     // eat each enable response;
      AdvanceToNextToken();
      if (!strcmp("CONDSTORE", fNextToken))
-       fCondStoreEnabled = PR_TRUE;
+       fCondStoreEnabled = true;
   } while (fNextToken && !fAtEndOfLine && ContinueParse());
   
 }
 
 void nsImapServerResponseParser::language_data()
 {
   // we may want to go out and store the language returned to us
   // by the language command in the host info session stuff. 
@@ -2353,17 +2353,17 @@ void nsImapServerResponseParser::languag
 
 // cram/auth response data ::= "+" SPACE challenge CRLF
 // the server expects more client data after issuing its challenge
 
 void nsImapServerResponseParser::authChallengeResponse_data()
 {
   AdvanceToNextToken();
   fAuthChallenge = strdup(fNextToken);
-  fWaitingForMoreClientInput = PR_TRUE; 
+  fWaitingForMoreClientInput = true; 
   
   skip_to_CRLF();
 }
 
 
 void nsImapServerResponseParser::namespace_data()
 {
 	EIMAPNamespaceType namespaceType = kPersonalNamespace;
@@ -2386,21 +2386,21 @@ void nsImapServerResponseParser::namespa
 
 			fNextToken++;
 			while (fNextToken[0] == '(' && ContinueParse())
 			{
 				// we have another namespace for this namespace type
 				fNextToken++;
 				if (fNextToken[0] != '"')
 				{
-					SetSyntaxError(PR_TRUE);
+					SetSyntaxError(true);
 				}
 				else
 				{
-					char *namespacePrefix = CreateQuoted(PR_FALSE);
+					char *namespacePrefix = CreateQuoted(false);
 
 					AdvanceToNextToken();
 					const char *quotedDelimiter = fNextToken;
 					char namespaceDelimiter = '\0';
 
 					if (quotedDelimiter[0] == '"')
 					{
 						quotedDelimiter++;
@@ -2408,44 +2408,44 @@ void nsImapServerResponseParser::namespa
 					}
 					else if (!PL_strncasecmp(quotedDelimiter, "NIL", 3))
 					{
 						// NIL hierarchy delimiter.  Leave namespace delimiter nsnull.
 					}
 					else
 					{
 						// not quoted or NIL.
-						SetSyntaxError(PR_TRUE);
+						SetSyntaxError(true);
 					}
 					if (ContinueParse())
 					{
             // add code to parse the TRANSLATE attribute if it is present....
             // we'll also need to expand the name space code to take in the translated prefix name.
 
-						nsIMAPNamespace *newNamespace = new nsIMAPNamespace(namespaceType, namespacePrefix, namespaceDelimiter, PR_FALSE);
+						nsIMAPNamespace *newNamespace = new nsIMAPNamespace(namespaceType, namespacePrefix, namespaceDelimiter, false);
 						// add it to a temporary list in the host
 						if (newNamespace && fHostSessionList)
 							fHostSessionList->AddNewNamespaceForHost(
                                 serverKey, newNamespace);
 
 						skip_to_close_paren();	// Ignore any extension data
 	
 						bool endOfThisNamespaceType = (fNextToken[0] == ')');
 						if (!endOfThisNamespaceType && fNextToken[0] != '(')	// no space between namespaces of the same type
 						{
-							SetSyntaxError(PR_TRUE);
+							SetSyntaxError(true);
 						}
 					}
 					PR_Free(namespacePrefix);
 				}
 			}
 		}
 		else
 		{
-			SetSyntaxError(PR_TRUE);
+			SetSyntaxError(true);
 		}
 		switch (namespaceType)
 		{
 		case kPersonalNamespace:
 			namespaceType = kOtherUsersNamespace;
 			break;
 		case kOtherUsersNamespace:
 			namespaceType = kPublicNamespace;
@@ -2457,17 +2457,17 @@ void nsImapServerResponseParser::namespa
 	}
 	if (ContinueParse())
 	{
 		nsImapProtocol *navCon = &fServerConnection;
 		NS_ASSERTION(navCon, "null protocol connection while parsing namespace");	// we should always have this
 		if (navCon)
 		{
 			navCon->CommitNamespacesForHostEvent();
-			namespacesCommitted = PR_TRUE;
+			namespacesCommitted = true;
 		}
 	}
 	skip_to_CRLF();
 
 	if (!namespacesCommitted && fHostSessionList)
 	{
 		bool success;
 		fHostSessionList->FlushUncommittedNamespacesForHost(serverKey,
@@ -2517,17 +2517,17 @@ void nsImapServerResponseParser::myright
     }
     else
     {
       HandleMemoryFailure();
     }
   }
   else
   {
-    SetSyntaxError(PR_TRUE);
+    SetSyntaxError(true);
   }
 }
 
 void nsImapServerResponseParser::acl_data()
 {
   AdvanceToNextToken();
   if (ContinueParse() && !fAtEndOfLine)
   {
@@ -2599,17 +2599,17 @@ void nsImapServerResponseParser::mime_he
       AdvanceToNextToken();
       if (m_shell)
       {
         m_shell->AdoptMimeHeader(start, mimeHeaderData);
       }
     }
     else
     {
-      SetSyntaxError(PR_TRUE);
+      SetSyntaxError(true);
     }
     PR_Free(partNumber);	// partNumber is not adopted by the body shell.
   }
   else
   {
     HandleMemoryFailure();
   }
 }
@@ -2627,17 +2627,17 @@ void nsImapServerResponseParser::mime_pa
     if (whereStart)
     {
       char *whereEnd = PL_strchr(whereStart, '>');
       if (whereEnd)
       {
         *whereEnd = 0;
         whereStart++;
         origin = atoi(whereStart);
-        originFound = PR_TRUE;
+        originFound = true;
       }
     }
     PR_Free(checkOriginToken);
     AdvanceToNextToken();
     msg_fetch_content(originFound, origin, MESSAGE_RFC822);	// keep content type as message/rfc822, even though the
     // MIME part might not be, because then libmime will
     // still handle and decode it.
   }
@@ -2650,46 +2650,46 @@ void nsImapServerResponseParser::mime_pa
 void nsImapServerResponseParser::bodystructure_data()
 {
   AdvanceToNextToken();
   if (ContinueParse() && fNextToken && *fNextToken == '(')  // It has to start with an open paren.
   {
     // Turn the BODYSTRUCTURE response into a form that the nsIMAPBodypartMessage can be constructed from.
     // FIXME: Follow up on bug 384210 to investigate why the caller has to duplicate the two in-param strings.
     nsIMAPBodypartMessage *message =
-      new nsIMAPBodypartMessage(NULL, NULL, PR_TRUE, strdup("message"),
+      new nsIMAPBodypartMessage(NULL, NULL, true, strdup("message"),
                                 strdup("rfc822"),
                                 NULL, NULL, NULL, 0,
                                 fServerConnection.GetPreferPlainText());
     nsIMAPBodypart *body = bodystructure_part(PL_strdup("1"), message);
     if (body)
       message->SetBody(body);
     else
     {
       delete message;
       message = nsnull;
     }
     m_shell = new nsIMAPBodyShell(&fServerConnection, message, CurrentResponseUID(), GetSelectedMailboxName());
     // ignore syntax errors in parsing the body structure response. If there's an error
     // we'll just fall back to fetching the whole message.
-    SetSyntaxError(PR_FALSE);
+    SetSyntaxError(false);
   }
   else
-    SetSyntaxError(PR_TRUE);
+    SetSyntaxError(true);
 }
 
 // RFC3501:  body = "(" (body-type-1part / body-type-mpart) ")"
 nsIMAPBodypart *
 nsImapServerResponseParser::bodystructure_part(char *partNum, nsIMAPBodypart *parentPart)
 {
   // Check to see if this buffer is a leaf or container
   // (Look at second character - if an open paren, then it is a container)
   if (*fNextToken != '(')
   {
-    NS_ASSERTION(PR_FALSE, "bodystructure_part must begin with '('");
+    NS_ASSERTION(false, "bodystructure_part must begin with '('");
     return NULL;
   }
   
   if (fNextToken[1] == '(')
     return bodystructure_multipart(partNum, parentPart);
   else
     return bodystructure_leaf(partNum, parentPart);
 }
@@ -2757,17 +2757,17 @@ nsImapServerResponseParser::bodystructur
       AdvanceToNextToken();
   }
   
   // body size
   if (isValid && ContinueParse())
   {
     char *bodySizeString = CreateAtom();
     if (!bodySizeString)
-      isValid = PR_FALSE;
+      isValid = false;
     else
     {
       partLength = atoi(bodySizeString);
       PR_Free(bodySizeString);
       if (ContinueParse())
         AdvanceToNextToken();
     }
   }
@@ -2789,48 +2789,48 @@ nsImapServerResponseParser::bodystructur
       return new nsIMAPBodypartLeaf(partNum, parentPart, bodyType, bodySubType,
                                     bodyID, bodyDescription, bodyEncoding,
                                     partLength,
                                     fServerConnection.GetPreferPlainText());
     }
     
     // This part is of type "message/rfc822"  (probably a forwarded message)
     nsIMAPBodypartMessage *message =
-      new nsIMAPBodypartMessage(partNum, parentPart, PR_FALSE,
+      new nsIMAPBodypartMessage(partNum, parentPart, false,
                                 bodyType, bodySubType, bodyID, bodyDescription,
                                 bodyEncoding, partLength,
                                 fServerConnection.GetPreferPlainText());
 
     // there are three additional fields: envelope structure, bodystructure, and size in lines    
     // historical note: this code was originally in nsIMAPBodypartMessage::ParseIntoObjects()
 
     // envelope (ignored)
     if (*fNextToken == '(')
     {
       fNextToken++;
       skip_to_close_paren();
     }
     else
-      isValid = PR_FALSE;
+      isValid = false;
 
     // bodystructure
     if (isValid && ContinueParse())
     {
       if (*fNextToken != '(')
-        isValid = PR_FALSE;
+        isValid = false;
       else
       {
         char *bodyPartNum = PR_smprintf("%s.1", partNum);
         if (bodyPartNum)
         {
           nsIMAPBodypart *body = bodystructure_part(bodyPartNum, message);
           if (body)
             message->SetBody(body);
           else
-            isValid = PR_FALSE;
+            isValid = false;
         }
       }
     }
     
     // ignore "size in text lines"
 
     if (isValid && ContinueParse()) {
       skip_to_close_paren();
@@ -2864,24 +2864,24 @@ nsImapServerResponseParser::bodystructur
       childCount++;
       char *childPartNum = NULL;
       // note: the multipart constructor does some magic on partNumber
       if (PL_strcmp(multipart->GetPartNumberString(), "0")) // not top-level
         childPartNum = PR_smprintf("%s.%d", multipart->GetPartNumberString(), childCount);
       else // top-level
         childPartNum = PR_smprintf("%d", childCount);
       if (!childPartNum)
-        isValid = PR_FALSE;
+        isValid = false;
       else
       {
         nsIMAPBodypart *child = bodystructure_part(childPartNum, multipart);
         if (child)
           multipart->AppendPart(child);
         else
-          isValid = PR_FALSE;
+          isValid = false;
       }
     }
 
     // RFC3501:  media-subtype   = string
     // (multipart subtype: mixed, alternative, etc.)
     if (isValid && ContinueParse())
     {
       char *bodySubType = CreateNilString();
@@ -2922,17 +2922,17 @@ nsImapServerResponseParser::bodystructur
           AdvanceToNextToken();
       }
       if (ContinueParse())
         fNextToken++;  // skip closing ')'
     }
     if (boundaryData)
       multipart->SetBoundaryData(boundaryData);
     else  
-      isValid = PR_FALSE;   // Actually, we should probably generate a boundary here.
+      isValid = false;   // Actually, we should probably generate a boundary here.
   }
 
   // always move to closing ')', even if part was not successfully read 
   if (ContinueParse())
     skip_to_close_paren();
 
   if (isValid)
     return multipart;
@@ -2981,33 +2981,33 @@ void nsImapServerResponseParser::quota_d
           {
             parengroup = CreateParenGroup();
             if(parengroup && (PR_sscanf(parengroup, "(STORAGE %lu %lu)", &used, &max) == 2) )
             {
               fServerConnection.UpdateFolderQuotaData(quotaroot, used, max);
               skip_to_CRLF();
             }
             else
-              SetSyntaxError(PR_TRUE);
+              SetSyntaxError(true);
 
             PR_Free(parengroup);
           }
           else
             // Ignore other limits, we just check STORAGE for now
             skip_to_CRLF();
         }
         else
-          SetSyntaxError(PR_TRUE);
+          SetSyntaxError(true);
       }
       else
         HandleMemoryFailure();
     }
   }
   else
-    SetSyntaxError(PR_TRUE);
+    SetSyntaxError(true);
 }
 
 void nsImapServerResponseParser::id_data()
 {
   AdvanceToNextToken();
   if (!PL_strcasecmp(fNextToken, "NIL"))
     AdvanceToNextToken();
   else
@@ -3027,17 +3027,17 @@ bool nsImapServerResponseParser::GetDown
 
 // Tells the server state parser to use a previously cached shell.
 void	nsImapServerResponseParser::UseCachedShell(nsIMAPBodyShell *cachedShell)
 {
 	// We shouldn't already have another shell we're dealing with.
 	if (m_shell && cachedShell)
 	{
 		PR_LOG(IMAP, PR_LOG_ALWAYS, ("PARSER: Shell Collision"));
-		NS_ASSERTION(PR_FALSE, "shell collision");
+		NS_ASSERTION(false, "shell collision");
 	}
 	m_shell = cachedShell;
 }
 
 
 void nsImapServerResponseParser::ResetCapabilityFlag() 
 {
     if (fHostSessionList)
@@ -3046,28 +3046,28 @@ void nsImapServerResponseParser::ResetCa
             fServerConnection.GetImapServerKey(), kCapabilityUndefined);
     }
 }
 
 /*
  literal         ::= "{" number "}" CRLF *CHAR8
                               ;; Number represents the number of CHAR8 octets
 */
-// returns PR_TRUE if this is the last chunk and we should close the stream
+// returns true if this is the last chunk and we should close the stream
 bool nsImapServerResponseParser::msg_fetch_literal(bool chunk, PRInt32 origin)
 {
   numberOfCharsInThisChunk = atoi(fNextToken + 1); // might be the whole message
   charsReadSoFar = 0;
   static bool lastCRLFwasCRCRLF = false;
   
   bool lastChunk = !chunk || (origin + numberOfCharsInThisChunk >= fTotalDownloadSize);
   
   nsImapAction imapAction; 
   if (!fServerConnection.GetCurrentUrl())
-    return PR_TRUE;
+    return true;
   fServerConnection.GetCurrentUrl()->GetImapAction(&imapAction);
   if (!lastCRLFwasCRCRLF && 
     fServerConnection.GetIOTunnellingEnabled() && 
     (numberOfCharsInThisChunk > fServerConnection.GetTunnellingThreshold()) &&
     (imapAction != nsIImapUrl::nsImapOnlineToOfflineCopy) &&
     (imapAction != nsIImapUrl::nsImapOnlineToOfflineMove))
   {
     // One day maybe we'll make this smarter and know how to handle CR/LF boundaries across tunnels.
@@ -3140,17 +3140,17 @@ bool nsImapServerResponseParser::msg_fet
     else
     {
       skip_to_CRLF();
       AdvanceToNextToken();
     }
   }
   else
   {
-    lastCRLFwasCRCRLF = PR_FALSE;
+    lastCRLFwasCRCRLF = false;
   }
   return lastChunk;
 }
 
 bool nsImapServerResponseParser::CurrentFolderReadOnly()
 {
   return fCurrentFolderReadOnly;
 }
@@ -3193,21 +3193,21 @@ PRUint32 nsImapServerResponseParser::Hig
 
 bool nsImapServerResponseParser::IsNumericString(const char *string)
 {
   int i;
   for(i = 0; i < (int) PL_strlen(string); i++)
   {
     if (! isdigit(string[i]))
     {
-      return PR_FALSE;
+      return false;
     }
   }
   
-  return PR_TRUE;
+  return true;
 }
 
 
 nsImapMailboxSpec *nsImapServerResponseParser::CreateCurrentMailboxSpec(const char *mailboxName /* = nsnull */)
 {
   nsImapMailboxSpec *returnSpec = new nsImapMailboxSpec;
   if (!returnSpec)
   {
@@ -3233,17 +3233,17 @@ nsImapMailboxSpec *nsImapServerResponseP
   returnSpec->mNumOfMessages = (mailboxName) ? fStatusExistingMessages : fNumberOfExistingMessages;
   returnSpec->mNumOfUnseenMessages = (mailboxName) ? fStatusUnseenMessages : fNumberOfUnseenMessages;
   returnSpec->mNumOfRecentMessages = (mailboxName) ? fStatusRecentMessages : fNumberOfRecentMessages;
   returnSpec->mNextUID = fStatusNextUID;
 
   returnSpec->mSupportedUserFlags = fSupportsUserDefinedFlags;
 
   returnSpec->mBoxFlags = kNoFlags;	// stub
-  returnSpec->mOnlineVerified = PR_FALSE;	// we're fabricating this.  The flags aren't verified.
+  returnSpec->mOnlineVerified = false;	// we're fabricating this.  The flags aren't verified.
   returnSpec->mAllocatedPathName.Assign(mailboxNameToConvert);
   returnSpec->mConnection = &fServerConnection;
   if (returnSpec->mConnection)
   {
     nsIURI * aUrl = nsnull;
     nsresult rv = NS_OK;
     returnSpec->mConnection->GetCurrentUrl()->QueryInterface(NS_GET_IID(nsIURI), (void **) &aUrl);
     if (NS_SUCCEEDED(rv) && aUrl) 
@@ -3272,17 +3272,17 @@ void nsImapServerResponseParser::ResetFl
 
 bool nsImapServerResponseParser::GetLastFetchChunkReceived()
 {
   return fLastChunk;
 }
 
 void nsImapServerResponseParser::ClearLastFetchChunkReceived()
 {
-  fLastChunk = PR_FALSE;
+  fLastChunk = false;
 }
 
 void nsImapServerResponseParser::SetHostSessionList(nsIImapHostSessionList*
                                                aHostSessionList)
 {
     NS_IF_RELEASE (fHostSessionList);
     fHostSessionList = aHostSessionList;
     NS_IF_ADDREF (fHostSessionList);
@@ -3316,13 +3316,13 @@ nsresult nsImapServerResponseParser::Beg
 {
   // if we're downloading a message, assert that we know its size.
   NS_ASSERTION(fDownloadingHeaders || fSizeOfMostRecentMessage > 0, "most recent message has 0 or negative size");
   nsresult rv = fServerConnection.BeginMessageDownLoad(fSizeOfMostRecentMessage, 
     content_type);
   if (NS_FAILED(rv))
   {
     skip_to_CRLF();
-    fServerConnection.PseudoInterrupt(PR_TRUE);
+    fServerConnection.PseudoInterrupt(true);
     fServerConnection.AbortMessageDownLoad();
   }
   return rv;
 }
--- a/mailnews/imap/src/nsImapService.cpp
+++ b/mailnews/imap/src/nsImapService.cpp
@@ -124,17 +124,17 @@ NS_IMPL_QUERY_INTERFACE6(nsImapService,
                          nsIMsgMessageService,
                          nsIProtocolHandler,
                          nsIMsgProtocolInfo,
                          nsIMsgMessageFetchPartService,
                          nsIContentHandler)
 
 nsImapService::nsImapService()
 {
-  mPrintingOperation = PR_FALSE;
+  mPrintingOperation = false;
   if (!gInitialized)
   {
     nsresult rv;
     nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); 
     if (NS_SUCCEEDED(rv) && prefBranch) 
     {
       prefBranch->GetBoolPref("mail.imap.mime_parts_on_demand", &gMIMEOnDemand);
       prefBranch->GetIntPref("mail.imap.mime_parts_on_demand_threshold", &gMIMEOnDemandThreshold);
@@ -144,17 +144,17 @@ nsImapService::nsImapService()
     nsCOMPtr<nsIAutoSyncManager> autoSyncMgr = do_GetService(NS_AUTOSYNCMANAGER_CONTRACTID, &rv);
     if (NS_SUCCEEDED(rv) && autoSyncMgr) 
     {
       // auto-sync manager initialization goes here
       // assign new strategy objects here... 
     }
     NS_ASSERTION(autoSyncMgr != nsnull, "*** Cannot initialize nsAutoSyncManager service.");
 
-    gInitialized = PR_TRUE;
+    gInitialized = true;
   }
 }
 
 nsImapService::~nsImapService()
 {
 }
 
 char nsImapService::GetHierarchyDelimiter(nsIMsgFolder *aMsgFolder)
@@ -236,19 +236,19 @@ NS_IMETHODIMP nsImapService::SelectFolde
   if (NS_SUCCEEDED(rv) && imapUrl)
   {
     // nsImapUrl::SetSpec() will set the imap action properly
     rv = imapUrl->SetImapAction(nsIImapUrl::nsImapSelectFolder);
 
     nsCOMPtr<nsIMsgMailNewsUrl> mailNewsUrl = do_QueryInterface(imapUrl);
     // if no msg window, we won't put up error messages (this is almost certainly a biff-inspired get new msgs)
     if (!aMsgWindow)
-      mailNewsUrl->SetSuppressErrorMsgs(PR_TRUE);
+      mailNewsUrl->SetSuppressErrorMsgs(true);
     mailNewsUrl->SetMsgWindow(aMsgWindow);
-    mailNewsUrl->SetUpdatingFolder(PR_TRUE);
+    mailNewsUrl->SetUpdatingFolder(true);
     rv = SetImapUrlSink(aImapMailFolder, imapUrl);
 
     if (NS_SUCCEEDED(rv))
     {
       nsCAutoString folderName;
       GetFolderName(aImapMailFolder, folderName);
       urlSpec.Append("/select>");
       urlSpec.Append(hierarchyDelimiter);
@@ -540,33 +540,33 @@ NS_IMETHODIMP nsImapService::DisplayMess
           aImapServer->GetMimePartsOnDemand(&useMimePartsOnDemand);
       }
 
       nsCAutoString uriStr(aMessageURI);
       PRInt32 keySeparator = uriStr.RFindChar('#');
       if(keySeparator != -1)
       {
         PRInt32 keyEndSeparator = MsgFindCharInSet(uriStr, "/?&", keySeparator);
-        PRInt32 mpodFetchPos = MsgFind(uriStr, "fetchCompleteMessage=true", PR_FALSE, keyEndSeparator);
+        PRInt32 mpodFetchPos = MsgFind(uriStr, "fetchCompleteMessage=true", false, keyEndSeparator);
         if (mpodFetchPos != -1)
-          useMimePartsOnDemand = PR_FALSE;
+          useMimePartsOnDemand = false;
       }
 
       if (folder)
       {
         folder->ShouldStoreMsgOffline(key, &shouldStoreMsgOffline);
         folder->HasMsgOffline(key, &hasMsgOffline);
       }
       imapUrl->SetStoreResultsOffline(shouldStoreMsgOffline);
       msgurl->SetAddToMemoryCache(!hasMsgOffline);
       imapUrl->SetFetchPartsOnDemand(
         useMimePartsOnDemand && messageSize >= (PRUint32) gMIMEOnDemandThreshold);
 
       if (hasMsgOffline)
-        msgurl->SetMsgIsInLocalCache(PR_TRUE);
+        msgurl->SetMsgIsInLocalCache(true);
 
       nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
       // Should the message fetch force a peek or a traditional fetch?
       // Force peek if there is a delay in marking read (or no auto-marking at all).
       // This is because a FETCH (BODY[]) will implicitly set tha \Seen flag on the msg,
       // but a FETCH (BODY.PEEK[]) won't.
       bool forcePeek = false;
       if (NS_SUCCEEDED(rv) && prefBranch)
@@ -575,17 +575,17 @@ NS_IMETHODIMP nsImapService::DisplayMess
         bool markReadAuto = true;
         prefBranch->GetBoolPref("mailnews.mark_message_read.auto", &markReadAuto);
         bool markReadDelay = false;
         prefBranch->GetBoolPref("mailnews.mark_message_read.delay", &markReadDelay);
         forcePeek = (!markReadAuto || markReadDelay || (dontMarkAsReadPos != kNotFound));
       }
 
       rv = FetchMessage(imapUrl, forcePeek ? nsIImapUrl::nsImapMsgFetchPeek : nsIImapUrl::nsImapMsgFetch, 
-                        folder, imapMessageSink, aMsgWindow, aDisplayConsumer, msgKey, PR_FALSE, 
+                        folder, imapMessageSink, aMsgWindow, aDisplayConsumer, msgKey, false, 
                         (mPrintingOperation) ? NS_LITERAL_CSTRING("print") : NS_LITERAL_CSTRING(""), aURL);
     }
   }
   return rv;
 }
 
 
 nsresult nsImapService::FetchMimePart(nsIImapUrl *aImapUrl,
@@ -657,17 +657,17 @@ nsresult nsImapService::FetchMimePart(ns
       // treat this load as if it were a user click event. Then the dispatching stuff will be much
       // happier.
       if (aImapAction == nsImapUrl::nsImapOpenMimePart)
       {
         docShell->CreateLoadInfo(getter_AddRefs(loadInfo));
         loadInfo->SetLoadType(nsIDocShellLoadInfo::loadLink);
       }
       
-      rv = docShell->LoadURI(url, loadInfo, nsIWebNavigation::LOAD_FLAGS_NONE, PR_FALSE);
+      rv = docShell->LoadURI(url, loadInfo, nsIWebNavigation::LOAD_FLAGS_NONE, false);
     }
     else
     {
       nsCOMPtr<nsIStreamListener> aStreamListener = do_QueryInterface(aDisplayConsumer, &rv);
       if (NS_SUCCEEDED(rv) && aStreamListener)
       {
         nsCOMPtr<nsIChannel> aChannel;
         nsCOMPtr<nsILoadGroup> loadGroup;
@@ -712,19 +712,19 @@ nsresult nsImapService::FetchMimePart(ns
 // to support print rendering.
 //
 NS_IMETHODIMP nsImapService::DisplayMessageForPrinting(const char *aMessageURI,
                                                        nsISupports *aDisplayConsumer,  
                                                        nsIMsgWindow *aMsgWindow,
                                                        nsIUrlListener *aUrlListener,
                                                        nsIURI **aURL) 
 {
-  mPrintingOperation = PR_TRUE;
+  mPrintingOperation = true;
   nsresult rv = DisplayMessage(aMessageURI, aDisplayConsumer, aMsgWindow, aUrlListener, nsnull, aURL);
-  mPrintingOperation = PR_FALSE;
+  mPrintingOperation = false;
   return rv;
 }
 
 NS_IMETHODIMP nsImapService::CopyMessage(const char *aSrcMailboxURI, 
                                          nsIStreamListener *aMailboxCopy, 
                                          bool moveMessage,
                                          nsIUrlListener *aUrlListener, 
                                          nsIMsgWindow *aMsgWindow, 
@@ -761,17 +761,17 @@ NS_IMETHODIMP nsImapService::CopyMessage
         if (msgurl)
           msgurl->SetMsgIsInLocalCache(hasMsgOffline);
       }
       // now try to download the message
       nsImapAction imapAction = nsIImapUrl::nsImapOnlineToOfflineCopy;
       if (moveMessage)
         imapAction = nsIImapUrl::nsImapOnlineToOfflineMove; 
       rv = FetchMessage(imapUrl,imapAction, folder, imapMessageSink,aMsgWindow, 
-                        streamSupport, msgKey, PR_FALSE, EmptyCString(), aURL);
+                        streamSupport, msgKey, false, EmptyCString(), aURL);
     } // if we got an imap message sink
   } // if we decomposed the imap message 
   return rv;
 }
 
 NS_IMETHODIMP nsImapService::CopyMessages(PRUint32 aNumKeys,
                                           nsMsgKey*aKeys,
                                           nsIMsgFolder *srcFolder,
@@ -810,17 +810,17 @@ NS_IMETHODIMP nsImapService::CopyMessage
       nsImapAction action;
       if (moveMessage) // don't use ?: syntax here, it seems to break the Mac.
         action = nsIImapUrl::nsImapOnlineToOfflineMove;
       else
         action = nsIImapUrl::nsImapOnlineToOfflineCopy;
       imapUrl->SetCopyState(aMailboxCopy);
       // now try to display the message
       rv = FetchMessage(imapUrl, action, folder, imapMessageSink, aMsgWindow, 
-                        streamSupport, messageIds, PR_FALSE, EmptyCString(), aURL);
+                        streamSupport, messageIds, false, EmptyCString(), aURL);
       // ### end of copy operation should know how to do the delete.if this is a move
       
     } // if we got an imap message sink
   } // if we decomposed the imap message 
   return rv;
 }
 
 NS_IMETHODIMP nsImapService::Search(nsIMsgSearchSession *aSearchSession, 
@@ -847,17 +847,17 @@ NS_IMETHODIMP nsImapService::Search(nsIM
 
   if (NS_SUCCEEDED(rv))
   {
     nsCString folderName;
     GetFolderName(aMsgFolder, folderName);
 
     nsCOMPtr <nsIMsgMailNewsUrl> mailNewsUrl = do_QueryInterface(imapUrl);
     if (!aMsgWindow)
-      mailNewsUrl->SetSuppressErrorMsgs(PR_TRUE);
+      mailNewsUrl->SetSuppressErrorMsgs(true);
 
     urlSpec.Append("/search>UID>");
     urlSpec.Append(hierarchyDelimiter);
     urlSpec.Append(folderName);
     urlSpec.Append('>');
     // escape aSearchUri so that IMAP special characters (i.e. '\')
     // won't be replaced with '/' in NECKO.
     // it will be unescaped in nsImapUrl::ParseUrl().
@@ -960,17 +960,17 @@ NS_IMETHODIMP nsImapService::SaveMessage
     nsCOMPtr <nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(msgUrl);
     if (mailnewsUrl)
       mailnewsUrl->SetMsgIsInLocalCache(hasMsgOffline);
 
     nsCOMPtr <nsIStreamListener> saveAsListener;
     mailnewsUrl->GetSaveAsListener(aAddDummyEnvelope, aFile, getter_AddRefs(saveAsListener));
 
     return FetchMessage(imapUrl, nsIImapUrl::nsImapSaveMessageToDisk, folder, imapMessageSink, 
-                        aMsgWindow, saveAsListener, msgKey, PR_FALSE, EmptyCString(), aURL);
+                        aMsgWindow, saveAsListener, msgKey, false, EmptyCString(), aURL);
   }
   return rv;
 }
 
 /* fetching RFC822 messages */
 /* imap4://HOST>fetch><UID>>MAILBOXPATH>x */
 /*   'x' is the message UID */
 /* will set the 'SEEN' flag */
@@ -1086,17 +1086,17 @@ nsresult nsImapService::GetMessageFromUr
         aImapServer(do_QueryInterface(aMsgIncomingServer, &rv));
       if (NS_SUCCEEDED(rv) && aImapServer)
         aImapServer->PseudoInterruptMsgLoad(aImapMailFolder, aMsgWindow, &interrupted);
     }
   }
   if (NS_SUCCEEDED(rv) && docShell)
   {
     NS_ASSERTION(!aConvertDataToText, "can't convert to text when using docshell");
-    rv = docShell->LoadURI(url, nsnull, nsIWebNavigation::LOAD_FLAGS_NONE, PR_FALSE);
+    rv = docShell->LoadURI(url, nsnull, nsIWebNavigation::LOAD_FLAGS_NONE, false);
   }
   else
   {
     nsCOMPtr<nsIStreamListener> streamListener = do_QueryInterface(aDisplayConsumer, &rv);
     nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(aImapUrl, &rv);
     if (aMsgWindow && mailnewsUrl)
       mailnewsUrl->SetMsgWindow(aMsgWindow);
     if (NS_SUCCEEDED(rv) && streamListener)
@@ -1225,17 +1225,17 @@ NS_IMETHODIMP nsImapService::StreamMessa
           rv = IsMsgInMemCache(url, folder, nsnull, &isMsgInMemCache);
           NS_ENSURE_SUCCESS(rv, rv);
 
           if (!isMsgInMemCache)
             return NS_ERROR_FAILURE;
         }
       }
 
-      msgurl->SetAddToMemoryCache(PR_TRUE);
+      msgurl->SetAddToMemoryCache(true);
 
       bool shouldStoreMsgOffline = false;
       folder->ShouldStoreMsgOffline(key, &shouldStoreMsgOffline);
       imapUrl->SetStoreResultsOffline(shouldStoreMsgOffline);
       rv = GetMessageFromUrl(imapUrl, nsIImapUrl::nsImapMsgFetchPeek, folder,
                              imapMessageSink, aMsgWindow, aConsumer,
                              aConvertData, aURL);
     }
@@ -1303,17 +1303,17 @@ NS_IMETHODIMP nsImapService::StreamHeade
 
 NS_IMETHODIMP nsImapService::IsMsgInMemCache(nsIURI *aUrl,
                                              nsIMsgFolder *aImapMailFolder,
                                              nsICacheEntryDescriptor **aCacheEntry,
                                              bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aUrl);
   NS_ENSURE_ARG_POINTER(aImapMailFolder);
-  *aResult = PR_FALSE;
+  *aResult = false;
 
   // Poke around in the memory cache
   if (mCacheSession)
   {
     nsresult rv;
     nsCOMPtr<nsIImapMailFolderSink> folderSink(do_QueryInterface(aImapMailFolder, &rv));
     NS_ENSURE_SUCCESS(rv, rv);
 
@@ -1323,21 +1323,21 @@ NS_IMETHODIMP nsImapService::IsMsgInMemC
     // changes, we won't re-use the wrong cache entries.
     nsCAutoString cacheKey;
     nsCAutoString escapedSpec;
 
     cacheKey.AppendInt(uidValidity, 16);
     aUrl->GetAsciiSpec(escapedSpec);
     cacheKey.Append(escapedSpec);
     nsCOMPtr<nsICacheEntryDescriptor> cacheEntry;
-    rv = mCacheSession->OpenCacheEntry(cacheKey, nsICache::ACCESS_READ, PR_FALSE,
+    rv = mCacheSession->OpenCacheEntry(cacheKey, nsICache::ACCESS_READ, false,
                                        getter_AddRefs(cacheEntry));
     if (NS_SUCCEEDED(rv))
     {
-      *aResult = PR_TRUE;
+      *aResult = true;
       if (aCacheEntry)
         NS_IF_ADDREF(*aCacheEntry = cacheEntry);
     }
   }
 
   return NS_OK;
 }
 
@@ -1374,17 +1374,17 @@ nsresult nsImapService::CreateStartOfIma
   // needs to represent a select folder action. 
   rv = CallCreateInstance(kImapUrlCID, imapUrl);
   if (NS_SUCCEEDED(rv) && *imapUrl)
   {
     nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(*imapUrl, &rv);
     if (NS_SUCCEEDED(rv) && mailnewsUrl && aUrlListener)
       mailnewsUrl->RegisterListener(aUrlListener);
     nsCOMPtr<nsIMsgMessageUrl> msgurl(do_QueryInterface(*imapUrl));
-    (*imapUrl)->SetExternalLinkUrl(PR_FALSE);
+    (*imapUrl)->SetExternalLinkUrl(false);
     msgurl->SetUri(PromiseFlatCString(aImapURI).get());
 
     urlSpec = "imap://";
     urlSpec.Append(escapedUsername);
     urlSpec.Append('@');
     urlSpec.Append(hostname);
     urlSpec.Append(':');
 
@@ -1561,17 +1561,17 @@ nsImapService::VerifyLogon(nsIMsgFolder 
   char delimiter = '/'; // shouldn't matter what is is.
   nsresult rv = CreateStartOfImapUrl(EmptyCString(), getter_AddRefs(imapUrl), aFolder,
                                      aUrlListener, urlSpec, delimiter);
   if (NS_SUCCEEDED(rv) && imapUrl)
   {
     nsCOMPtr<nsIURI> uri = do_QueryInterface(imapUrl);
 
     nsCOMPtr<nsIMsgMailNewsUrl> mailNewsUrl = do_QueryInterface(imapUrl);
-    mailNewsUrl->SetSuppressErrorMsgs(PR_TRUE);
+    mailNewsUrl->SetSuppressErrorMsgs(true);
     mailNewsUrl->SetMsgWindow(aMsgWindow);
     rv = SetImapUrlSink(aFolder, imapUrl);
     urlSpec.Append("/verifyLogon");
     rv = uri->SetSpec(urlSpec);
     if (NS_SUCCEEDED(rv)) {
       nsCOMPtr<nsIThread> thread(do_GetCurrentThread());
       rv = GetImapConnectionAndLoadUrl(thread, imapUrl, nsnull, nsnull);
     }
@@ -2011,17 +2011,17 @@ NS_IMETHODIMP nsImapService::OnlineMessa
   NS_ENSURE_SUCCESS(rv, rv);
 
   bool sameServer;
   rv = dstServer->Equals(srcServer, &sameServer);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (!sameServer) 
   {
-    NS_ASSERTION(PR_FALSE, "can't use this method to copy across servers");
+    NS_ASSERTION(false, "can't use this method to copy across servers");
     // *** can only take message from the same imap host and user accnt
     return NS_ERROR_FAILURE;
   }
 
   nsCOMPtr<nsIImapUrl> imapUrl;
   nsCAutoString urlSpec;
 
   char hierarchyDelimiter = GetHierarchyDelimiter(aSrcFolder);
@@ -2084,17 +2084,17 @@ nsresult nsImapService::OfflineAppendFro
     return NS_MSG_FOLDER_BUSY;
 
   if (NS_SUCCEEDED(rv) && destDB)
   {
     nsMsgKey fakeKey;
     destDB->GetNextFakeOfflineMsgKey(&fakeKey);
 
     nsCOMPtr <nsIMsgOfflineImapOperation> op;
-    rv = destDB->GetOfflineOpForKey(fakeKey, PR_TRUE, getter_AddRefs(op));
+    rv = destDB->GetOfflineOpForKey(fakeKey, true, getter_AddRefs(op));
     if (NS_SUCCEEDED(rv) && op)
     {
       nsCString destFolderUri;
       aDstFolder->GetURI(destFolderUri);
       op->SetOperation(nsIMsgOfflineImapOperation::kAppendDraft); // ### do we care if it's a template?
       op->SetDestinationFolderURI(destFolderUri.get());
       nsCOMPtr <nsIOutputStream> offlineStore;
       nsCOMPtr<nsIMsgPluggableStore> msgStore;
@@ -2127,18 +2127,18 @@ nsresult nsImapService::OfflineAppendFro
         nsCOMPtr <nsILocalFile> localFile = do_QueryInterface(aFile);
         if (NS_SUCCEEDED(rv))
           rv = NS_NewLocalFileInputStream(getter_AddRefs(inputStream), localFile);
         if (NS_SUCCEEDED(rv) && inputStream)
         {
           // now, copy the temp file to the offline store for the dest folder.
           PRInt32 inputBufferSize = 10240;
           nsMsgLineStreamBuffer *inputStreamBuffer = new nsMsgLineStreamBuffer(inputBufferSize, 
-                                                                               PR_TRUE,    // allocate new lines
-                                                                               PR_FALSE);  // leave CRLFs on the returned string
+                                                                               true,    // allocate new lines
+                                                                               false);  // leave CRLFs on the returned string
           PRInt64 fileSize;
           aFile->GetFileSize(&fileSize);
           PRUint32 bytesWritten;
           rv = NS_OK;
 //        rv = inputStream->Read(inputBuffer, inputBufferSize, &bytesRead);
 //        if (NS_SUCCEEDED(rv) && bytesRead > 0)
           msgParser->SetNewMsgHdr(newMsgHdr);
           msgParser->SetState(nsIMsgParseMailMsgState::ParseHeadersState);
@@ -2164,32 +2164,32 @@ nsresult nsImapService::OfflineAppendFro
           if (fakeHdr)
           {
             if (NS_SUCCEEDED(rv) && fakeHdr)
             {
               PRUint32 resultFlags;
               fakeHdr->SetMessageOffset(curOfflineStorePos);
               fakeHdr->OrFlags(nsMsgMessageFlags::Offline | nsMsgMessageFlags::Read, &resultFlags);
               fakeHdr->SetOfflineMessageSize(fileSize);
-              destDB->AddNewHdrToDB(fakeHdr, PR_TRUE /* notify */);
+              destDB->AddNewHdrToDB(fakeHdr, true /* notify */);
               aDstFolder->SetFlag(nsMsgFolderFlags::OfflineEvents);
             }
           }
           // tell the listener we're done.
           inputStream->Close();
           inputStream = nsnull;
           aListener->OnStopRunningUrl(aUrl, NS_OK);
           delete inputStreamBuffer;
         }
       }
     }
   }
           
   if (destDB)
-    destDB->Close(PR_TRUE);
+    destDB->Close(true);
   return rv;
 }
 
 /* append message from file url */
 /* imap://HOST>appendmsgfromfile>DESTINATIONMAILBOXPATH */
 /* imap://HOST>appenddraftfromfile>DESTINATIONMAILBOXPATH>UID>messageId */
 NS_IMETHODIMP nsImapService::AppendMessageFromFile(nsIEventTarget *aClientEventTarget,
                                                    nsIFile *aFile,
@@ -2553,25 +2553,25 @@ NS_IMETHODIMP nsImapService::GetProtocol
 #endif
   ;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapService::AllowPort(PRInt32 port, const char *scheme, bool *aRetVal)
 {
   // allow imap to run on any port
-  *aRetVal = PR_TRUE;
+  *aRetVal = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapService::GetDefaultDoBiff(bool *aDoBiff)
 {
   NS_ENSURE_ARG_POINTER(aDoBiff);
   // by default, do biff for IMAP servers
-  *aDoBiff = PR_TRUE;    
+  *aDoBiff = true;    
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapService::GetDefaultServerPort(bool isSecure, PRInt32 *aDefaultPort)
 {
   nsresult rv = NS_OK;
   
   // Return Secure IMAP Port if secure option chosen i.e., if isSecure is TRUE
@@ -2600,35 +2600,35 @@ nsresult nsImapService::GetServerFromUrl
   {
     rv = mailnewsUrl->GetFileName(folderName);
     NS_ENSURE_SUCCESS(rv, rv);
   }
   
   nsCOMPtr<nsIMsgAccountManager> accountManager = do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   
-  rv = accountManager->FindServerByURI(mailnewsUrl, PR_FALSE, aServer);
+  rv = accountManager->FindServerByURI(mailnewsUrl, false, aServer);
   
   // look for server with any user name, in case we're trying to subscribe
   // to a folder with some one else's user name like the following
   // "IMAP://userSharingFolder@server1/SharedFolderName"
   if (NS_FAILED(rv) || !aServer)
   {
     nsCAutoString turl;
     nsCOMPtr<nsIURL> url = do_CreateInstance(NS_STANDARDURL_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     
     mailnewsUrl->GetSpec(turl);
     rv = url->SetSpec(turl);
     NS_ENSURE_SUCCESS(rv, rv);
     
     url->SetUserPass(EmptyCString());
-    rv = accountManager->FindServerByURI(url, PR_FALSE, aServer);
+    rv = accountManager->FindServerByURI(url, false, aServer);
     if (*aServer)
-      aImapUrl->SetExternalLinkUrl(PR_TRUE);
+      aImapUrl->SetExternalLinkUrl(true);
   }
   
     // if we can't extract the imap server from this url then give up!!!
   NS_ENSURE_TRUE(*aServer, NS_ERROR_FAILURE);
   return rv;
 }
 
 NS_IMETHODIMP nsImapService::NewURI(const nsACString &aSpec,
@@ -2702,17 +2702,17 @@ NS_IMETHODIMP nsImapService::NewURI(cons
         }
       }
     }
 
     // if we are fetching a part, be sure to enable fetch parts on demand
     bool mimePartSelectorDetected = false;
     aImapUrl->GetMimePartSelectorDetected(&mimePartSelectorDetected);
     if (mimePartSelectorDetected)
-      aImapUrl->SetFetchPartsOnDemand(PR_TRUE);
+      aImapUrl->SetFetchPartsOnDemand(true);
 
     // we got an imap url, so be sure to return it...
     nsCOMPtr<nsIURI> imapUri = do_QueryInterface(aImapUrl);
     imapUri.swap(*aRetVal);
   }
 
   return rv;
 }
@@ -2846,22 +2846,22 @@ NS_IMETHODIMP nsImapService::NewChannel(
         {
           nsCOMPtr <nsIURI> subscribeURI;
           // now we have the real folder name to try to subscribe to. Let's try running
           // a subscribe url and returning that as the uri we've created.
           // We need to convert this to unicode because that's what subscribe wants :-(
           // It's already in mod-utf7.
           nsAutoString unicodeName;
           CopyASCIItoUTF16(fullFolderName, unicodeName);
-          rv = imapServer->SubscribeToFolder(unicodeName, PR_TRUE, getter_AddRefs(subscribeURI));
+          rv = imapServer->SubscribeToFolder(unicodeName, true, getter_AddRefs(subscribeURI));
           if (NS_SUCCEEDED(rv) && subscribeURI)
           {
             nsCOMPtr <nsIImapUrl> imapSubscribeUrl = do_QueryInterface(subscribeURI);
             if (imapSubscribeUrl)
-              imapSubscribeUrl->SetExternalLinkUrl(PR_TRUE);
+              imapSubscribeUrl->SetExternalLinkUrl(true);
             nsCOMPtr <nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(subscribeURI);
             if (mailnewsUrl)
             {
               nsCOMPtr<nsIMsgMailSession> mailSession = do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv);
               NS_ENSURE_SUCCESS(rv, rv);
               nsCOMPtr <nsIMsgWindow> msgWindow;
               rv = mailSession->GetTopmostMsgWindow(getter_AddRefs(msgWindow));
               if (NS_SUCCEEDED(rv) && msgWindow)
@@ -2963,66 +2963,66 @@ NS_IMETHODIMP nsImapService::GetServerII
 {
   *aServerIID = new nsIID(NS_GET_IID(nsIImapIncomingServer));
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapService::GetRequiresUsername(bool *aRequiresUsername)
 {
 	NS_ENSURE_ARG_POINTER(aRequiresUsername);
-	*aRequiresUsername = PR_TRUE;
+	*aRequiresUsername = true;
 	return NS_OK;
 }
 
 NS_IMETHODIMP nsImapService::GetPreflightPrettyNameWithEmailAddress(bool *aPreflightPrettyNameWithEmailAddress)
 {
 	NS_ENSURE_ARG_POINTER(aPreflightPrettyNameWithEmailAddress);
-	*aPreflightPrettyNameWithEmailAddress = PR_TRUE;
+	*aPreflightPrettyNameWithEmailAddress = true;
 	return NS_OK;
 }
 
 NS_IMETHODIMP nsImapService::GetCanLoginAtStartUp(bool *aCanLoginAtStartUp)
 {
   NS_ENSURE_ARG_POINTER(aCanLoginAtStartUp);
-  *aCanLoginAtStartUp = PR_TRUE;
+  *aCanLoginAtStartUp = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapService::GetCanDelete(bool *aCanDelete)
 {
   NS_ENSURE_ARG_POINTER(aCanDelete);
-  *aCanDelete = PR_TRUE;
+  *aCanDelete = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapService::GetCanDuplicate(bool *aCanDuplicate)
 {
   NS_ENSURE_ARG_POINTER(aCanDuplicate);
-  *aCanDuplicate = PR_TRUE;
+  *aCanDuplicate = true;
   return NS_OK;
 }        
 
 NS_IMETHODIMP nsImapService::GetCanGetMessages(bool *aCanGetMessages)
 {
   NS_ENSURE_ARG_POINTER(aCanGetMessages);
-  *aCanGetMessages = PR_TRUE;
+  *aCanGetMessages = true;
   return NS_OK;
 }        
 
 NS_IMETHODIMP nsImapService::GetCanGetIncomingMessages(bool *aCanGetIncomingMessages)
 {
   NS_ENSURE_ARG_POINTER(aCanGetIncomingMessages);
-  *aCanGetIncomingMessages = PR_TRUE;
+  *aCanGetIncomingMessages = true;
   return NS_OK;
 }    
 
 NS_IMETHODIMP nsImapService::GetShowComposeMsgLink(bool *showComposeMsgLink)
 {
   NS_ENSURE_ARG_POINTER(showComposeMsgLink);
-  *showComposeMsgLink = PR_TRUE;
+  *showComposeMsgLink = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapService::GetListOfFoldersWithPath(nsIImapIncomingServer *aServer, 
                                                       nsIMsgWindow *aMsgWindow, 
                                                       const nsACString &folderPath)
 {
   nsresult rv;
@@ -3195,17 +3195,17 @@ NS_IMETHODIMP nsImapService::IssueComman
 
   if (NS_SUCCEEDED(rv) && imapUrl)
   {
     // nsImapUrl::SetSpec() will set the imap action properly
     rv = imapUrl->SetImapAction(nsIImapUrl::nsImapUserDefinedMsgCommand);
 
     nsCOMPtr <nsIMsgMailNewsUrl> mailNewsUrl = do_QueryInterface(imapUrl);
     mailNewsUrl->SetMsgWindow(aMsgWindow);
-    mailNewsUrl->SetUpdatingFolder(PR_TRUE);
+    mailNewsUrl->SetUpdatingFolder(true);
     rv = SetImapUrlSink(anImapFolder, imapUrl);
 
     if (NS_SUCCEEDED(rv))
     {
       nsCString folderName;
       GetFolderName(anImapFolder, folderName);
       urlSpec.Append("/");
       urlSpec.Append(aCommand);
@@ -3244,17 +3244,17 @@ NS_IMETHODIMP nsImapService::FetchCustom
                             nsnull, urlSpec, hierarchyDelimiter);
   if (NS_SUCCEEDED(rv) && imapUrl)
   {
     // nsImapUrl::SetSpec() will set the imap action properly
     rv = imapUrl->SetImapAction(nsIImapUrl::nsImapUserDefinedFetchAttribute);
 
     nsCOMPtr <nsIMsgMailNewsUrl> mailNewsUrl = do_QueryInterface(imapUrl);
     mailNewsUrl->SetMsgWindow(aMsgWindow);
-    mailNewsUrl->SetUpdatingFolder(PR_TRUE);
+    mailNewsUrl->SetUpdatingFolder(true);
     rv = SetImapUrlSink(anImapFolder, imapUrl);
 
     if (NS_SUCCEEDED(rv))
     {
       nsCString folderName;
       GetFolderName(anImapFolder, folderName);
       urlSpec.Append("/customFetch>UID>");
       urlSpec.Append(hierarchyDelimiter);
@@ -3291,17 +3291,17 @@ NS_IMETHODIMP nsImapService::StoreCustom
 
   if (NS_SUCCEEDED(rv) && imapUrl)
   {
     // nsImapUrl::SetSpec() will set the imap action properly
     rv = imapUrl->SetImapAction(nsIImapUrl::nsImapMsgStoreCustomKeywords);
 
     nsCOMPtr <nsIMsgMailNewsUrl> mailNewsUrl = do_QueryInterface(imapUrl);
     mailNewsUrl->SetMsgWindow(aMsgWindow);
-    mailNewsUrl->SetUpdatingFolder(PR_TRUE);
+    mailNewsUrl->SetUpdatingFolder(true);
     rv = SetImapUrlSink(anImapFolder, imapUrl);
 
     if (NS_SUCCEEDED(rv))
     {
       nsCString folderName;
       GetFolderName(anImapFolder, folderName);
       urlSpec.Append("/customKeywords>UID>");
       urlSpec.Append(hierarchyDelimiter);
@@ -3337,25 +3337,25 @@ NS_IMETHODIMP nsImapService::DownloadMes
                             urlSpec, hierarchyDelimiter);
   if (NS_SUCCEEDED(rv) && imapUrl)
   {
     nsCOMPtr<nsIURI> runningURI;
     // need to pass in stream listener in order to get the channel created correctly
     nsCOMPtr<nsIImapMessageSink> imapMessageSink(do_QueryInterface(aFolder, &rv));
     rv = FetchMessage(imapUrl, nsImapUrl::nsImapMsgDownloadForOffline,aFolder,
                       imapMessageSink, aMsgWindow, nsnull, messageIds,
-                      PR_FALSE, EmptyCString(), getter_AddRefs(runningURI));
+                      false, EmptyCString(), getter_AddRefs(runningURI));
     if (runningURI && aUrlListener)
     {
       nsCOMPtr<nsIMsgMailNewsUrl> msgurl (do_QueryInterface(runningURI));
       nsCOMPtr<nsIImapUrl> imapUrl(do_QueryInterface(runningURI));
       if (msgurl)
         msgurl->RegisterListener(aUrlListener);
       if (imapUrl)
-        imapUrl->SetStoreResultsOffline(PR_TRUE);
+        imapUrl->SetStoreResultsOffline(true);
     }
   }
   return rv;
 }
 
 NS_IMETHODIMP nsImapService::MessageURIToMsgHdr(const char *uri, nsIMsgDBHdr **aRetVal)
 {
   NS_ENSURE_ARG_POINTER(uri);
@@ -3412,17 +3412,17 @@ NS_IMETHODIMP nsImapService::GetCacheSes
   nsresult rv = NS_OK;
   if (!mCacheSession)
   {
     nsCOMPtr<nsICacheService> serv = do_GetService(kCacheServiceCID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     
     rv = serv->CreateSession("IMAP-anywhere", nsICache::STORE_ANYWHERE, nsICache::STREAM_BASED, getter_AddRefs(mCacheSession));
     NS_ENSURE_SUCCESS(rv, rv);
-    rv = mCacheSession->SetDoomEntriesIfExpired(PR_FALSE);
+    rv = mCacheSession->SetDoomEntriesIfExpired(false);
   }
 
   NS_IF_ADDREF(*result = mCacheSession);
   return rv;
 }
 
 NS_IMETHODIMP nsImapService::HandleContent(const char *aContentType, 
                                            nsIInterfaceRequestor *aWindowContext, 
--- a/mailnews/imap/src/nsImapUndoTxn.cpp
+++ b/mailnews/imap/src/nsImapUndoTxn.cpp
@@ -48,17 +48,17 @@
 #include "nsIMsgDatabase.h"
 #include "nsMsgUtils.h"
 #include "nsISupportsArray.h"
 #include "nsThreadUtils.h"
 #include "nsServiceManagerUtils.h"
 #include "nsComponentManagerUtils.h"
 
 nsImapMoveCopyMsgTxn::nsImapMoveCopyMsgTxn() :
-    m_idsAreUids(PR_FALSE), m_isMove(PR_FALSE), m_srcIsPop3(PR_FALSE)
+    m_idsAreUids(false), m_isMove(false), m_srcIsPop3(false)
 {
 }
 
 nsresult
 nsImapMoveCopyMsgTxn::Init(nsIMsgFolder* srcFolder, nsTArray<nsMsgKey>* srcKeyArray, 
                            const char* srcMsgIdString, nsIMsgFolder* dstFolder,
                            bool idsAreUids, bool isMove,
                            nsIEventTarget* eventTarget)
@@ -90,27 +90,27 @@ nsImapMoveCopyMsgTxn::Init(nsIMsgFolder*
     nsMsgKey pseudoKey;
     rv = srcDB->GetMsgHdrForKey(m_srcKeyArray[i],
       getter_AddRefs(srcHdr));
     if (NS_SUCCEEDED(rv))
     {
       // ** jt -- only do this for mailbox protocol
       if (MsgLowerCaseEqualsLiteral(protocolType, "mailbox"))
       {
-        m_srcIsPop3 = PR_TRUE;
+        m_srcIsPop3 = true;
         PRUint32 msgSize;
         rv = srcHdr->GetMessageSize(&msgSize);
         if (NS_SUCCEEDED(rv))
           m_srcSizeArray.AppendElement(msgSize);
         if (isMove)
         {
           srcDB->GetNextPseudoMsgKey(&pseudoKey);
           pseudoKey--;
           m_dupKeyArray[i] = pseudoKey;
-          rv = srcDB->CopyHdrFromExistingHdr(pseudoKey, srcHdr, PR_FALSE,
+          rv = srcDB->CopyHdrFromExistingHdr(pseudoKey, srcHdr, false,
                                              getter_AddRefs(copySrcHdr));
           if (NS_SUCCEEDED(rv)) 
           {
             nsCOMPtr<nsISupports> supports = do_QueryInterface(copySrcHdr);
             m_srcHdrs->AppendElement(supports);
           }
         }
       }
@@ -184,20 +184,20 @@ nsImapMoveCopyMsgTxn::UndoTransaction(vo
           rv = imapService->AddMessageFlags(m_eventTarget, srcFolder,
                                             srcListener, nsnull,
                                             m_srcMsgIdString,
                                             kImapMsgDeletedFlag,
                                             m_idsAreUids);
         if (NS_FAILED(rv)) 
           return rv;
 
-        finishInOnStopRunningUrl = PR_TRUE;
+        finishInOnStopRunningUrl = true;
         if (deleteModel != nsMsgImapDeleteModels::IMAPDelete)
           rv = imapService->GetHeaders(m_eventTarget, srcFolder,
-                                srcListener, nsnull, m_srcMsgIdString, PR_TRUE);
+                                srcListener, nsnull, m_srcMsgIdString, true);
       }
     }
   }
   if (!finishInOnStopRunningUrl && !m_dstMsgIdString.IsEmpty())
   {
     nsCOMPtr<nsIMsgFolder> dstFolder = do_QueryReferent(m_dstFolder, &rv);
     if (NS_FAILED(rv) || !dstFolder)
       return rv;
@@ -294,17 +294,17 @@ nsImapMoveCopyMsgTxn::RedoTransaction(vo
                                            kImapMsgDeletedFlag,
                                            m_idsAreUids);
     NS_ENSURE_SUCCESS(rv, rv);
     nsMsgImapDeleteModel deleteModel;
     rv = GetImapDeleteModel(dstFolder, &deleteModel);
     if (NS_FAILED(rv) || deleteModel == nsMsgImapDeleteModels::MoveToTrash)
     {
       rv = imapService->GetHeaders(m_eventTarget, dstFolder, dstListener, 
-                                   nsnull, m_dstMsgIdString, PR_TRUE);
+                                   nsnull, m_dstMsgIdString, true);
     }
   }
   return rv;
 }
 
 nsresult
 nsImapMoveCopyMsgTxn::SetCopyResponseUid(const char* aMsgIdString)
 {
@@ -358,28 +358,28 @@ nsImapMoveCopyMsgTxn::UndoMailboxDelete(
         PRUint32 i;
         nsCOMPtr<nsIMsgDBHdr> oldHdr;
         nsCOMPtr<nsIMsgDBHdr> newHdr;
         for (i=0; i<count; i++)
         {
             oldHdr = do_QueryElementAt(m_srcHdrs, i);
             NS_ASSERTION(oldHdr, "fatal ... cannot get old msg header\n");
             rv = srcDB->CopyHdrFromExistingHdr(m_srcKeyArray[i],
-                                               oldHdr,PR_TRUE,
+                                               oldHdr,true,
                                                getter_AddRefs(newHdr));
             NS_ASSERTION(newHdr, "fatal ... cannot create new header\n");
 
             if (NS_SUCCEEDED(rv) && newHdr)
             {
                 if (i < m_srcSizeArray.Length())
                     newHdr->SetMessageSize(m_srcSizeArray[i]);
                 srcDB->UndoDelete(newHdr);
             }
         }
-        srcDB->SetSummaryValid(PR_TRUE);
+        srcDB->SetSummaryValid(true);
         return NS_OK; // always return NS_OK
     }
     else
     {
         rv = NS_ERROR_FAILURE;
     }
     return rv;
 }
@@ -393,17 +393,17 @@ nsImapMoveCopyMsgTxn::RedoMailboxDelete(
     {
         nsCOMPtr<nsIMsgDatabase> srcDB;
         nsCOMPtr<nsIMsgFolder> srcFolder = do_QueryReferent(m_srcFolder, &rv);
         if (NS_FAILED(rv) || !srcFolder) return rv;
         rv = srcFolder->GetMsgDatabase(getter_AddRefs(srcDB));
         if (NS_SUCCEEDED(rv))
         {
             srcDB->DeleteMessages(m_srcKeyArray.Length(), m_srcKeyArray.Elements(), nsnull);
-            srcDB->SetSummaryValid(PR_TRUE);
+            srcDB->SetSummaryValid(true);
         }
         return NS_OK; // always return NS_OK
     }
     else
     {
         rv = NS_ERROR_FAILURE;
     }
     return rv;
@@ -454,18 +454,18 @@ NS_IMETHODIMP nsImapMoveCopyMsgTxn::OnSt
       {
         // If subtracting the deleted flag didn't work, try
         // moving the message back from the target folder to the src folder
         if (!m_dstMsgIdString.IsEmpty())
           imapService->OnlineMessageCopy(m_eventTarget,
                                        dstFolder,
                                        m_dstMsgIdString,
                                        srcFolder,
-                                       PR_TRUE,
-                                       PR_TRUE,
+                                       true,
+                                       true,
                                        nsnull, /* listener */
                                        nsnull,
                                        nsnull,
                                        nsnull);
         else
         {
           // server doesn't support COPYUID, so we're going to update the dest
           // folder, and when that's done, use the db to find the messages
@@ -514,52 +514,52 @@ NS_IMETHODIMP nsImapMoveCopyMsgTxn::OnSt
           dstKeys.AppendElement(dstKey);
         }
       }
       if (dstKeys.Length())
       {
         nsCAutoString uids;
         nsImapMailFolder::AllocateUidStringFromKeys(dstKeys.Elements(), dstKeys.Length(), uids);
         rv = imapService->OnlineMessageCopy(m_eventTarget, dstFolder, uids, srcFolder,
-                                            PR_TRUE, PR_TRUE, nsnull,
+                                            true, true, nsnull,
                                             nsnull, nsnull, nsnull);
       }
     }
   }
   return NS_OK;
 }
 
 nsImapOfflineTxn::nsImapOfflineTxn(nsIMsgFolder* srcFolder, nsTArray<nsMsgKey>* srcKeyArray,
                                    const char *srcMsgIdString, nsIMsgFolder* dstFolder,
                                    bool isMove, nsOfflineImapOperationType opType,
                                    nsIMsgDBHdr *srcHdr,
                                    nsIEventTarget* eventTarget)
 {
-  Init(srcFolder, srcKeyArray, srcMsgIdString, dstFolder, PR_TRUE,
+  Init(srcFolder, srcKeyArray, srcMsgIdString, dstFolder, true,
        isMove, eventTarget);
 
   m_opType = opType; 
   m_flags = 0;
-  m_addFlags = PR_FALSE;
+  m_addFlags = false;
   m_header = srcHdr;
   if (opType == nsIMsgOfflineImapOperation::kDeletedMsg)
   {
     nsCOMPtr <nsIMsgDatabase> srcDB;
     nsCOMPtr <nsIDBFolderInfo> folderInfo;
 
     nsresult rv = srcFolder->GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), getter_AddRefs(srcDB));
     if (NS_SUCCEEDED(rv) && srcDB)
     {
       nsMsgKey pseudoKey;
       nsCOMPtr <nsIMsgDBHdr> copySrcHdr;
 
       srcDB->GetNextPseudoMsgKey(&pseudoKey);
       pseudoKey--;
       m_dupKeyArray[0] = pseudoKey;
-      rv = srcDB->CopyHdrFromExistingHdr(pseudoKey, srcHdr, PR_FALSE, getter_AddRefs(copySrcHdr));
+      rv = srcDB->CopyHdrFromExistingHdr(pseudoKey, srcHdr, false, getter_AddRefs(copySrcHdr));
       if (NS_SUCCEEDED(rv)) 
       {
         nsCOMPtr<nsISupports> supports = do_QueryInterface(copySrcHdr);
         m_srcHdrs->AppendElement(supports);
       }
     }
   }
 }
@@ -594,17 +594,17 @@ NS_IMETHODIMP nsImapOfflineTxn::UndoTran
   switch (m_opType)
   {
     case nsIMsgOfflineImapOperation::kMsgMoved:
     case nsIMsgOfflineImapOperation::kMsgCopy:
     case nsIMsgOfflineImapOperation::kAddedHeader:
     case nsIMsgOfflineImapOperation::kFlagsChanged:
     case nsIMsgOfflineImapOperation::kDeletedMsg:
     {
-      rv = srcDB->GetOfflineOpForKey(hdrKey, PR_FALSE, getter_AddRefs(op));
+      rv = srcDB->GetOfflineOpForKey(hdrKey, false, getter_AddRefs(op));
       bool offlineOpPlayedBack = true;
       if (NS_SUCCEEDED(rv) && op)
       {
         op->GetPlayingBack(&offlineOpPlayedBack);
         srcDB->RemoveOfflineOp(op);
         op = nsnull;
       }
       if (!WeAreOffline() && offlineOpPlayedBack)
@@ -618,39 +618,39 @@ NS_IMETHODIMP nsImapOfflineTxn::UndoTran
         break;
       nsMsgKey msgKey;
       m_header->GetMessageKey(&msgKey);
       if (m_opType == nsIMsgOfflineImapOperation::kAddedHeader)
       {
         nsCOMPtr <nsIMsgDBHdr> mailHdr;
         rv = srcDB->GetMsgHdrForKey(msgKey, getter_AddRefs(mailHdr));
         if (mailHdr)
-          srcDB->DeleteHeader(mailHdr, nsnull, PR_TRUE, PR_FALSE);
+          srcDB->DeleteHeader(mailHdr, nsnull, true, false);
       }
       else if (m_opType == nsIMsgOfflineImapOperation::kDeletedMsg)
       {
         nsCOMPtr<nsIMsgDBHdr> undeletedHdr;
         m_srcHdrs->QueryElementAt(0, NS_GET_IID(nsIMsgDBHdr), getter_AddRefs(undeletedHdr));
         if (undeletedHdr)
         {
           nsCOMPtr<nsIMsgDBHdr> newHdr;
-          srcDB->CopyHdrFromExistingHdr (msgKey, undeletedHdr, PR_TRUE, getter_AddRefs(newHdr));
+          srcDB->CopyHdrFromExistingHdr (msgKey, undeletedHdr, true, getter_AddRefs(newHdr));
         }
-        srcDB->Close(PR_TRUE);
+        srcDB->Close(true);
         srcFolder->SummaryChanged();
       }
       break;
     }
     case nsIMsgOfflineImapOperation::kMsgMarkedDeleted:
-      srcDB->MarkImapDeleted(hdrKey, PR_FALSE, nsnull);
+      srcDB->MarkImapDeleted(hdrKey, false, nsnull);
       break;
     default:
       break;
   }
-  srcDB->Close(PR_TRUE);
+  srcDB->Close(true);
   srcFolder->SummaryChanged();
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapOfflineTxn::RedoTransaction(void)
 {
   nsresult rv;
   
@@ -667,17 +667,17 @@ NS_IMETHODIMP nsImapOfflineTxn::RedoTran
 
   if (m_header)
     m_header->GetMessageKey(&hdrKey);
 
   switch (m_opType)
   {
   case nsIMsgOfflineImapOperation::kMsgMoved:
   case nsIMsgOfflineImapOperation::kMsgCopy:
-    rv = srcDB->GetOfflineOpForKey(hdrKey, PR_FALSE, getter_AddRefs(op));
+    rv = srcDB->GetOfflineOpForKey(hdrKey, false, getter_AddRefs(op));
     if (NS_SUCCEEDED(rv) && op)
     {
       nsCOMPtr<nsIMsgFolder> dstFolder = do_QueryReferent(m_dstFolder, &rv);
       if (dstFolder)
       {
         nsCString folderURI;
         dstFolder->GetURI(folderURI);
 
@@ -705,50 +705,50 @@ NS_IMETHODIMP nsImapOfflineTxn::RedoTran
     {
       nsCOMPtr <nsIMsgDBHdr> restoreHdr;
       nsMsgKey msgKey;
       m_header->GetMessageKey(&msgKey);
       nsCOMPtr<nsIMsgFolder> dstFolder = do_QueryReferent(m_dstFolder, &rv);
       rv = srcFolder->GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), getter_AddRefs(destDB));
       NS_ENSURE_SUCCESS(rv, rv);
       if (m_header)
-        destDB->CopyHdrFromExistingHdr (msgKey, m_header, PR_TRUE, getter_AddRefs(restoreHdr));
-      destDB->Close(PR_TRUE);
+        destDB->CopyHdrFromExistingHdr (msgKey, m_header, true, getter_AddRefs(restoreHdr));
+      destDB->Close(true);
       dstFolder->SummaryChanged();
-      rv = destDB->GetOfflineOpForKey(hdrKey, PR_TRUE, getter_AddRefs(op));
+      rv = destDB->GetOfflineOpForKey(hdrKey, true, getter_AddRefs(op));
       if (NS_SUCCEEDED(rv) && op)
       {
         nsCString folderURI;
         srcFolder->GetURI(folderURI);
         op->SetSourceFolderURI(folderURI.get());
       }
       dstFolder->SummaryChanged();
-      destDB->Close(PR_TRUE);
+      destDB->Close(true);
     }
     break;
   case nsIMsgOfflineImapOperation::kDeletedMsg:
-    srcDB->DeleteMessage(hdrKey, nsnull, PR_TRUE);
+    srcDB->DeleteMessage(hdrKey, nsnull, true);
     break;
   case nsIMsgOfflineImapOperation::kMsgMarkedDeleted:
-    srcDB->MarkImapDeleted(hdrKey, PR_TRUE, nsnull);
+    srcDB->MarkImapDeleted(hdrKey, true, nsnull);
     break;
   case nsIMsgOfflineImapOperation::kFlagsChanged:
-    rv = srcDB->GetOfflineOpForKey(hdrKey, PR_TRUE, getter_AddRefs(op));
+    rv = srcDB->GetOfflineOpForKey(hdrKey, true, getter_AddRefs(op));
     if (NS_SUCCEEDED(rv) && op)
     {
       imapMessageFlagsType newMsgFlags;
       op->GetNewFlags(&newMsgFlags);
       if (m_addFlags)
         op->SetFlagOperation(newMsgFlags | m_flags);
       else
         op->SetFlagOperation(newMsgFlags & ~m_flags);
     }
     break;
   default:
     break;
   }
-  srcDB->Close(PR_TRUE);
+  srcDB->Close(true);
   srcDB = nsnull;
   srcFolder->SummaryChanged();
   return NS_OK;
 }
 
 
--- a/mailnews/imap/src/nsImapUrl.cpp
+++ b/mailnews/imap/src/nsImapUrl.cpp
@@ -72,40 +72,40 @@ static NS_DEFINE_CID(kCImapHostSessionLi
 nsImapUrl::nsImapUrl() : mLock("nsImapUrl.mLock")
 {
   m_listOfMessageIds = nsnull;
   m_sourceCanonicalFolderPathSubString = nsnull;
   m_destinationCanonicalFolderPathSubString = nsnull;
   m_listOfMessageIds = nsnull;
   m_tokenPlaceHolder = nsnull;
   m_searchCriteriaString = nsnull;
-  m_idsAreUids = PR_FALSE;
-  m_mimePartSelectorDetected = PR_FALSE;
-  m_allowContentChange = PR_TRUE;  // assume we can do MPOD.
-  m_fetchPartsOnDemand = PR_FALSE; // but assume we're not doing it :-)
-  m_msgLoadingFromCache = PR_FALSE;
-  m_storeResultsOffline = PR_FALSE;
-  m_storeOfflineOnFallback = PR_FALSE;
-  m_localFetchOnly = PR_FALSE;
-  m_rerunningUrl = PR_FALSE;
-  m_moreHeadersToDownload = PR_FALSE;
-  m_externalLinkUrl = PR_TRUE; // we'll start this at true, and set it false in nsImapService::CreateStartOfImapUrl
+  m_idsAreUids = false;
+  m_mimePartSelectorDetected = false;
+  m_allowContentChange = true;  // assume we can do MPOD.
+  m_fetchPartsOnDemand = false; // but assume we're not doing it :-)
+  m_msgLoadingFromCache = false;
+  m_storeResultsOffline = false;
+  m_storeOfflineOnFallback = false;
+  m_localFetchOnly = false;
+  m_rerunningUrl = false;
+  m_moreHeadersToDownload = false;
+  m_externalLinkUrl = true; // we'll start this at true, and set it false in nsImapService::CreateStartOfImapUrl
   m_contentModified = IMAP_CONTENT_NOT_MODIFIED;
-  m_validUrl = PR_TRUE;  // assume the best.
+  m_validUrl = true;  // assume the best.
   m_flags = 0;
   m_extraStatus = ImapStatusNone;
   m_onlineSubDirSeparator = '/';
 
   // ** jt - the following are not ref counted
   m_copyState = nsnull;
   m_file = nsnull;
   m_imapMailFolderSink = nsnull;
   m_imapMessageSink = nsnull;
-  m_addDummyEnvelope = PR_FALSE;
-  m_canonicalLineEnding = PR_FALSE;
+  m_addDummyEnvelope = false;
+  m_canonicalLineEnding = false;
 }
 
 nsImapUrl::~nsImapUrl()
 {
   PR_FREEIF(m_listOfMessageIds);
   PR_FREEIF(m_destinationCanonicalFolderPathSubString);
   PR_FREEIF(m_sourceCanonicalFolderPathSubString);
   PR_FREEIF(m_searchCriteriaString);
@@ -238,17 +238,17 @@ NS_IMETHODIMP nsImapUrl::SetImapServerSi
 // End nsIImapUrl specific support
 ////////////////////////////////////////////////////////////////////////////////////
 
 NS_IMETHODIMP nsImapUrl::SetSpec(const nsACString &aSpec)
 {
   nsresult rv = nsMsgMailNewsUrl::SetSpec(aSpec);
   if (NS_SUCCEEDED(rv))
   {
-    m_validUrl = PR_TRUE;  // assume the best.
+    m_validUrl = true;  // assume the best.
     rv = ParseUrl();
   }
   return rv;
 }
 
 NS_IMETHODIMP nsImapUrl::SetQuery(const nsACString &aQuery)
 {
   nsresult rv = nsMsgMailNewsUrl::SetQuery(aQuery);
@@ -454,17 +454,17 @@ NS_IMETHODIMP nsImapUrl::GetMsgFlags(ima
 
 void nsImapUrl::ParseImapPart(char *imapPartOfUrl)
 {
   m_tokenPlaceHolder = imapPartOfUrl;
   m_urlidSubString = m_tokenPlaceHolder ? NS_strtok(IMAP_URL_TOKEN_SEPARATOR, &m_tokenPlaceHolder) : (char *)NULL;
 
   if (!m_urlidSubString)
   {
-    m_validUrl = PR_FALSE;
+    m_validUrl = false;
     return;
   }
 
   if (!PL_strcasecmp(m_urlidSubString, "fetch"))
   {
     m_imapAction  = nsImapMsgFetch;
     ParseUidChoice();
     PR_FREEIF(m_sourceCanonicalFolderPathSubString);
@@ -751,17 +751,17 @@ void nsImapUrl::ParseImapPart(char *imap
       {
         m_customAddFlags.Assign(flagsPtr);
         flagsPtr = m_tokenPlaceHolder ? NS_strtok(IMAP_URL_TOKEN_SEPARATOR, &m_tokenPlaceHolder) : (char *)nsnull;
       }
       m_customSubtractFlags.Assign(flagsPtr);
     }
     else
     {
-      m_validUrl = PR_FALSE;
+      m_validUrl = false;
     }
   }
 }
 
 
 // Returns NULL if nothing was done.
 // Otherwise, returns a newly allocated name.
 NS_IMETHODIMP nsImapUrl::AddOnlineDirectoryIfNecessary(const char *onlineMailboxName, char ** directory)
@@ -1060,17 +1060,17 @@ NS_IMETHODIMP nsImapUrl::CreateServerDes
   NS_ENSURE_ARG_POINTER(result);
   MutexAutoLock mon(mLock);
   nsresult rv = AllocateServerPath(m_destinationCanonicalFolderPathSubString,
                                    kOnlineHierarchySeparatorUnknown,
                                    result);
   return (*result) ? rv : NS_ERROR_OUT_OF_MEMORY;
 }
 
-// for enabling or disabling mime parts on demand. Setting this to PR_TRUE says we
+// for enabling or disabling mime parts on demand. Setting this to true says we
 // can use mime parts on demand, if we chose.
 NS_IMETHODIMP nsImapUrl::SetAllowContentChange(bool allowContentChange)
 {
   m_allowContentChange = allowContentChange;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapUrl::SetContentModified(nsImapContentModifiedType contentModified)
@@ -1296,17 +1296,17 @@ NS_IMETHODIMP nsImapUrl::IsUrlType(PRUin
         (m_imapAction == nsIImapUrl::nsImapOnlineToOfflineMove) ||
         (m_imapAction == nsIImapUrl::nsImapOfflineToOnlineMove));
       break;
     case nsIMsgMailNewsUrl::eDisplay:
       *isType = (m_imapAction == nsIImapUrl::nsImapMsgFetch ||
         m_imapAction == nsIImapUrl::nsImapMsgFetchPeek);
       break;
     default:
-      *isType = PR_FALSE;
+      *isType = false;
   };
 
   return NS_OK;
 
 }
 
 NS_IMETHODIMP
 nsImapUrl::GetOriginalSpec(char ** aSpec)
@@ -1344,17 +1344,17 @@ char *nsImapUrl::ReplaceCharsInCopiedStr
 ////////////////////////////////////////////////////////////////////////////////////
 
 void nsImapUrl::ParseFolderPath(char **resultingCanonicalPath)
 {
   char *resultPath = m_tokenPlaceHolder ? NS_strtok(IMAP_URL_TOKEN_SEPARATOR, &m_tokenPlaceHolder) : (char *)NULL;
 
   if (!resultPath)
   {
-    m_validUrl = PR_FALSE;
+    m_validUrl = false;
     return;
   }
   NS_ASSERTION(*resultingCanonicalPath == nsnull, "whoops, mem leak");
 
   char dirSeparator = *resultPath;
 
   nsCString unescapedResultingCanonicalPath;
   MsgUnescapeString(nsDependentCString(resultPath + 1), 0, unescapedResultingCanonicalPath);
@@ -1369,17 +1369,17 @@ void nsImapUrl::ParseFolderPath(char **r
   // of a top level imap box.  If there is an online subdir, we will automatically
   // use its separator.  If there is not an online subdir, we don't need a separator.
 }
 
 void nsImapUrl::ParseSearchCriteriaString()
 {
   if (m_tokenPlaceHolder)
   {
-    int quotedFlag = PR_FALSE;
+    int quotedFlag = false;
 
     //skip initial separator
     while (*m_tokenPlaceHolder == *IMAP_URL_TOKEN_SEPARATOR)
       m_tokenPlaceHolder++;
 
      char *saveTokenPlaceHolder = m_tokenPlaceHolder;
 
 //    m_searchCriteriaString = m_tokenPlaceHolder;
@@ -1404,25 +1404,25 @@ void nsImapUrl::ParseSearchCriteriaStrin
       m_tokenPlaceHolder = NULL;
 
     if (*m_searchCriteriaString == '\0')
       m_searchCriteriaString = (char *)NULL;
   }
   else
     m_searchCriteriaString = (char *)NULL;
   if (!m_searchCriteriaString)
-    m_validUrl = PR_FALSE;
+    m_validUrl = false;
 }
 
 
 void nsImapUrl::ParseUidChoice()
 {
   char *uidChoiceString = m_tokenPlaceHolder ? NS_strtok(IMAP_URL_TOKEN_SEPARATOR, &m_tokenPlaceHolder) : (char *)NULL;
   if (!uidChoiceString)
-    m_validUrl = PR_FALSE;
+    m_validUrl = false;
   else
     m_idsAreUids = strcmp(uidChoiceString, "UID") == 0;
 }
 
 void nsImapUrl::ParseMsgFlags()
 {
   char *flagsPtr = m_tokenPlaceHolder ? NS_strtok(IMAP_URL_TOKEN_SEPARATOR, &m_tokenPlaceHolder) : (char *)NULL;
   if (flagsPtr)
@@ -1434,17 +1434,17 @@ void nsImapUrl::ParseMsgFlags()
   else
     m_flags = 0;
 }
 
 void nsImapUrl::ParseListOfMessageIds()
 {
   m_listOfMessageIds = m_tokenPlaceHolder ? NS_strtok(IMAP_URL_TOKEN_SEPARATOR, &m_tokenPlaceHolder) : (char *)NULL;
   if (!m_listOfMessageIds)
-    m_validUrl = PR_FALSE;
+    m_validUrl = false;
   else
   {
     m_listOfMessageIds = strdup(m_listOfMessageIds);
     m_mimePartSelectorDetected = PL_strstr(m_listOfMessageIds, "&part=") != 0 || PL_strstr(m_listOfMessageIds, "?part=") != 0;
 
     // if we're asking for just the body, don't download the whole message. see
     // nsMsgQuote::QuoteMessage() for the "header=" settings when replying to msgs.
     if (!m_fetchPartsOnDemand)
--- a/mailnews/imap/src/nsImapUtils.cpp
+++ b/mailnews/imap/src/nsImapUtils.cpp
@@ -125,17 +125,17 @@ nsresult nsParseImapMessageURI(const cha
       keyStr = Substring(uriStr, keySeparator + 1, keyEndSeparator - (keySeparator + 1));
     else
       keyStr = Substring(uriStr, keySeparator + 1);
 
     *key = strtoul(keyStr.get(), nsnull, 10);
 
     if (part && keyEndSeparator != -1)
     {
-      PRInt32 partPos = MsgFind(uriStr, "part=", PR_FALSE, keyEndSeparator);
+      PRInt32 partPos = MsgFind(uriStr, "part=", false, keyEndSeparator);
       if (partPos != -1)
       {
         *part = ToNewCString(Substring(uriStr, keyEndSeparator));
       }
     }
   }
   return NS_OK;
 }
@@ -171,20 +171,20 @@ nsImapMailboxSpec::nsImapMailboxSpec()
   mNumOfRecentMessages = 0;
   mNextUID = 0;
   
   mBoxFlags = 0;
   mSupportedUserFlags = 0;
   
   mHierarchySeparator = '\0';
   
-  mFolderSelected = PR_FALSE;
-  mDiscoveredFromLsub = PR_FALSE;
+  mFolderSelected = false;
+  mDiscoveredFromLsub = false;
   
-  mOnlineVerified = PR_FALSE;
+  mOnlineVerified = false;
   mNamespaceForFolder = nsnull;
 }
 
 nsImapMailboxSpec::~nsImapMailboxSpec()
 {
 }
 
 NS_IMPL_GETSET(nsImapMailboxSpec, Folder_UIDVALIDITY, PRInt32, mFolder_UIDVALIDITY)
--- a/mailnews/imap/test/TestImapFlagAndUidState.cpp
+++ b/mailnews/imap/test/TestImapFlagAndUidState.cpp
@@ -163,17 +163,17 @@ int main(int argc, char** argv)
   // generating a uid string from 69,71, but only 70 and 71 are in
   // the flag state.
   struct msgState msgState3[] = {
     {10, kImapMsgSeenFlag, 0},
     {69, kImapMsgSeenFlag, 1},
     {70, kImapMsgSeenFlag, 2},
     {71, kImapMsgSeenFlag, 3}};
 
-  flagState->SetPartialUIDFetch(PR_FALSE);
+  flagState->SetPartialUIDFetch(false);
   numMsgs = sizeof(msgState3) / sizeof(msgState3[0]);
   for (PRInt32 i = 0; i < numMsgs; i++)
     flagState->AddUidFlagPair(msgState3[i].uid, msgState3[i].flag,
                               msgState3[i].index);
   flagState->ExpungeByIndex(2);
   nsCString uidString;
   PRUint32 msgUids[] = {69,71};
   PRUint32 msgCount = 2;
@@ -188,17 +188,17 @@ int main(int argc, char** argv)
   // This tests the middle message missing from the flag state.
   struct msgState msgState4[] = {
     {10, kImapMsgSeenFlag, 0},
     {69, kImapMsgSeenFlag, 1},
     {70, kImapMsgSeenFlag, 2},
     {71, kImapMsgSeenFlag, 3},
     {73, kImapMsgSeenFlag, 4}};
 
-  flagState->SetPartialUIDFetch(PR_FALSE);
+  flagState->SetPartialUIDFetch(false);
   numMsgs = sizeof(msgState4) / sizeof(msgState4[0]);
   for (PRInt32 i = 0; i < numMsgs; i++)
     flagState->AddUidFlagPair(msgState4[i].uid, msgState4[i].flag,
                               msgState4[i].index);
   flagState->ExpungeByIndex(4);
   PRUint32 msgUids2[] = {69,71,73};
   msgCount = 3;
   nsCString uidString2;
--- a/mailnews/import/applemail/src/nsAppleMailImport.cpp
+++ b/mailnews/import/applemail/src/nsAppleMailImport.cpp
@@ -114,17 +114,17 @@ NS_IMETHODIMP nsAppleMailImportModule::G
   NS_ENSURE_ARG_POINTER(aSupports);
   *aSupports = strdup(NS_IMPORT_MAIL_STR);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAppleMailImportModule::GetSupportsUpgrade(bool *aUpgrade)
 {
   NS_ENSURE_ARG_POINTER(aUpgrade);
-  *aUpgrade = PR_FALSE;
+  *aUpgrade = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAppleMailImportModule::GetImportInterface(const char *aImportType, nsISupports **aInterface)
 {
   NS_ENSURE_ARG_POINTER(aImportType);
   NS_ENSURE_ARG_POINTER(aInterface);
   *aInterface = nsnull;
@@ -183,26 +183,26 @@ NS_IMPL_THREADSAFE_ISUPPORTS1(nsAppleMai
 
 NS_IMETHODIMP nsAppleMailImportMail::GetDefaultLocation(nsIFile **aLocation, bool *aFound, bool *aUserVerify)
 {
   NS_ENSURE_ARG_POINTER(aFound);
   NS_ENSURE_ARG_POINTER(aLocation);
   NS_ENSURE_ARG_POINTER(aUserVerify);
 
   *aLocation = nsnull;
-  *aFound = PR_FALSE;
-  *aUserVerify = PR_TRUE;
+  *aFound = false;
+  *aUserVerify = true;
 
   // try to find current user's top-level Mail folder
   nsCOMPtr<nsILocalFile> mailFolder(do_CreateInstance(NS_LOCAL_FILE_CONTRACTID));
   if (mailFolder) {
     nsresult rv = mailFolder->InitWithNativePath(NS_LITERAL_CSTRING(DEFAULT_MAIL_FOLDER));
     if (NS_SUCCEEDED(rv)) {
-      *aFound = PR_TRUE;
-      *aUserVerify = PR_FALSE;
+      *aFound = true;
+      *aUserVerify = false;
       CallQueryInterface(mailFolder, aLocation);
     }
   }
 
   return NS_OK;
 }
 
 // this is the method that initiates all searching for mailboxes.
@@ -291,22 +291,22 @@ void nsAppleMailImportMail::FindAccountM
       // now let's see if it's an account folder. if so, we want to traverse it for .mbox children
       nsAutoString folderName;
       currentEntry->GetLeafName(folderName);
       bool isAccountFolder = false;
 
       if (StringBeginsWith(folderName, NS_LITERAL_STRING("POP-"))) {
         // cut off "POP-" prefix so we get a nice folder name
         folderName.Cut(0, 4);
-        isAccountFolder = PR_TRUE;
+        isAccountFolder = true;
       }
       else if (StringBeginsWith(folderName, NS_LITERAL_STRING("IMAP-"))) {
         // cut off "IMAP-" prefix so we get a nice folder name
         folderName.Cut(0, 5);
-        isAccountFolder = PR_TRUE;
+        isAccountFolder = true;
       }
 
       if (isAccountFolder) {
         IMPORT_LOG1("Found account: %s\n", NS_ConvertUTF16toUTF8(folderName).get());
 
         // create a mailbox for this account, so we get a parent for "Inbox", "Sent Messages", etc.
         nsCOMPtr<nsIImportMailboxDescriptor> desc;
         nsresult rv = aImportService->CreateNewMailboxDescriptor(getter_AddRefs(desc));
--- a/mailnews/import/eudora/src/nsEudoraAddress.cpp
+++ b/mailnews/import/eudora/src/nsEudoraAddress.cpp
@@ -496,17 +496,17 @@ bool CAliasData::Process( const char *pL
       cnt = nsEudoraAddress::CountAngle( pLine, max);
       if ((cnt > 2) && m_email.IsEmpty()) {
         m_email.Append( pLine + 1, cnt - 2);
       }
       pLine += cnt;
       max -= cnt;
       pStart = pLine;
       tCnt = 0;
-      endCollect = PR_TRUE;
+      endCollect = true;
     }
     else if (*pLine == '(') {
       if (tCnt && !endCollect) {
         str.Trim( kWhitespace);
         if (!str.IsEmpty())
           str.Append( " ", 1);
         str.Append( pStart, tCnt);
       }
@@ -534,33 +534,33 @@ bool CAliasData::Process( const char *pL
     if (!str.IsEmpty())
       str.Append( " ", 1);
     str.Append( pStart, tCnt);
   }
 
   str.Trim( kWhitespace);
 
   if (!m_realName.IsEmpty() && !m_email.IsEmpty())
-    return( PR_TRUE);
+    return( true);
 
   // now we should have a string with any remaining non-delimitted text
   // we assume that the last token is the email
   // anything before that is realName
   if (!m_email.IsEmpty()) {
     m_realName = str;
-    return( PR_TRUE);
+    return( true);
   }
 
   tCnt = str.RFindChar( ' ');
   if (tCnt == -1) {
     if (!str.IsEmpty()) {
       m_email = str;
-      return( PR_TRUE);
+      return( true);
     }
-    return( PR_FALSE);
+    return( false);
   }
 
   m_email = Substring(str, tCnt + 1);
   m_realName = StringHead(str, tCnt);
   m_realName.Trim( kWhitespace);
   m_email.Trim( kWhitespace);
 
   return( !m_email.IsEmpty());
@@ -626,19 +626,19 @@ void nsEudoraAddress::ResolveEntries( ns
         pData = (CAliasData *)list.ElementAt( i);
         // resolve the email to an existing alias!
         if ( !name.Equals(pData->m_email, nsCaseInsensitiveCStringComparator()) &&
              ((pEntry = ResolveAlias( pData->m_fullEntry)) != nsnull) ) {
             // This new entry has all of the entries for this puppie.
             // Resolve all of it's entries!
             numResolved++;  // Track the number of entries resolved
 
-            // We pass in PR_TRUE for the 5th parameter so that we know that we're
+            // We pass in true for the 5th parameter so that we know that we're
             // calling ourselves recursively.
-            ResolveEntries( pEntry->m_name, pEntry->m_list, result, addResolvedEntries, PR_TRUE, numResolved);
+            ResolveEntries( pEntry->m_name, pEntry->m_list, result, addResolvedEntries, true, numResolved);
         }
         else if (addResolvedEntries || !wasResolved) {
             // This is either an ordinary entry (i.e. just contains the info) or we were told
             // to add resolved alias entries.
             result.AppendElement( pData);
         }
     }
 }
@@ -667,23 +667,23 @@ void nsEudoraAddress::BuildABCards( PRUi
   nsVoidArray membersArray;// Remember group members.
   nsVoidArray groupsArray; // Remember groups.
 
   // First off, run through the list and build person cards - groups/lists have to be done later
   for (i = 0; i < max; i++) {
     PRInt32   numResolved = 0;
     pEntry = (CAliasEntry *) m_alias.ElementAt( i);
 
-    // PR_FALSE for 4th parameter tells ResolveEntries not to add resolved entries (avoids
+    // false for 4th parameter tells ResolveEntries not to add resolved entries (avoids
     // duplicates as mailing lists are being resolved to other cards - the other cards that
     // are found have already been added and don't need to be added again).
     //
-    // PR_FALSE for 5th parameter tells ResolveEntries that we're calling it - it's not being
+    // false for 5th parameter tells ResolveEntries that we're calling it - it's not being
     // called recursively by itself.
-    ResolveEntries( pEntry->m_name, pEntry->m_list, emailList, PR_FALSE, PR_FALSE, numResolved);
+    ResolveEntries( pEntry->m_name, pEntry->m_list, emailList, false, false, numResolved);
 
     // Treat it as a group if there's more than one email address or if we
     // needed to resolve one or more aliases. We treat single aliases to
     // other aliases as a mailing list because there's no better equivalent.
     if ( (emailList.Count() > 1) || (numResolved > 0) )
     {
       // Remember group members uniquely and add them to db later.
       RememberGroupMembers(membersArray, emailList);
@@ -708,22 +708,22 @@ void nsEudoraAddress::BuildABCards( PRUi
 
   // Now add the lists/groups (now that all cards have been added).
   max = groupsArray.Count();
   for (i = 0; i < max; i++)
   {
     PRInt32   numResolved = 0;
     pEntry = (CAliasEntry *) groupsArray.ElementAt(i);
 
-    // PR_FALSE for 4th parameter tells ResolveEntries to add resolved entries so that we
+    // false for 4th parameter tells ResolveEntries to add resolved entries so that we
     // can create the mailing list with references to all entries correctly.
     //
-    // PR_FALSE for 5th parameter tells ResolveEntries that we're calling it - it's not being
+    // false for 5th parameter tells ResolveEntries that we're calling it - it's not being
     // called recursively by itself.
-    ResolveEntries( pEntry->m_name, pEntry->m_list, emailList, PR_TRUE, PR_FALSE, numResolved);
+    ResolveEntries( pEntry->m_name, pEntry->m_list, emailList, true, false, numResolved);
     AddSingleList(pEntry, emailList, pDb);
     emailList.Clear();
   }
 }
 
 void nsEudoraAddress::ExtractNoteField( nsCString& note, nsCString& value, const char *pFieldName)
 {
   value.Truncate();
@@ -957,47 +957,47 @@ void nsEudoraAddress::AddSingleCard( CAl
 
     if ( (primaryLocation.IsEmpty() || primaryLocation.LowerCaseEqualsLiteral("home")) &&
          !mobile.IsEmpty() )
     {
       // Primary location field is either specified to be "home" or is not
       // specified and there is a home mobile number, so use that as the mobile number.
       ADD_FIELD_TO_DB_ROW(pDb, AddCellularNumber, newRow, mobile, uniStr);
 
-      isSecondaryMobileWorkNumber = PR_TRUE;
+      isSecondaryMobileWorkNumber = true;
     }
     else
     {
       // Primary location field is either specified to be "work" or there is no
       // home mobile number, so use work mobile number.
       ADD_FIELD_TO_DB_ROW(pDb, AddCellularNumber, newRow, secondaryMobile, uniStr);
 
       // Home mobile number (if any) is the secondary mobile number
       secondaryMobile = mobile;
-      isSecondaryMobileWorkNumber = PR_FALSE;
+      isSecondaryMobileWorkNumber = false;
     }
 
     if ( (primaryLocation.IsEmpty() || primaryLocation.LowerCaseEqualsLiteral("home")) &&
          !fax.IsEmpty() )
     {
       // Primary location field is either specified to be "home" or is not
       // specified and there is a home fax number, so use that as the fax number.
       ADD_FIELD_TO_DB_ROW(pDb, AddFaxNumber, newRow, fax, uniStr);
 
-      isSecondaryFaxWorkNumber = PR_TRUE;
+      isSecondaryFaxWorkNumber = true;
     }
     else
     {
       // Primary location field is either specified to be "work" or there is no
       // home fax number, so use work fax number.
       ADD_FIELD_TO_DB_ROW(pDb, AddFaxNumber, newRow, secondaryFax, uniStr);
 
       // Home fax number (if any) is the secondary fax number
       secondaryFax = fax;
-      isSecondaryFaxWorkNumber = PR_FALSE;
+      isSecondaryFaxWorkNumber = false;
     }
 
     ADD_FIELD_TO_DB_ROW(pDb, Add2ndEmail, newRow, additionalEmail, uniStr);
 
     // Extra info fields
     PRInt32         stringID;
     nsString        pFormat;
     nsString        pCustomData;
--- a/mailnews/import/eudora/src/nsEudoraCompose.cpp
+++ b/mailnews/import/eudora/src/nsEudoraCompose.cpp
@@ -122,17 +122,17 @@ static char *p_test_body =
 nsIMsgIdentity * nsEudoraCompose::s_pIdentity = nsnull;
 
 
 // First off, a listener
 class EudoraSendListener : public nsIMsgSendListener
 {
 public:
   EudoraSendListener() {
-    m_done = PR_FALSE;
+    m_done = false;
   }
 
   virtual ~EudoraSendListener() {}
 
   // nsISupports interface
   NS_DECL_ISUPPORTS
 
   /* void OnStartSending (in string aMsgID, in PRUint32 aMsgSize); */
@@ -142,30 +142,30 @@ public:
   NS_IMETHOD OnProgress(const char *aMsgID, PRUint32 aProgress, PRUint32 aProgressMax) {return NS_OK;}
 
   /* void OnStatus (in string aMsgID, in wstring aMsg); */
   NS_IMETHOD OnStatus(const char *aMsgID, const PRUnichar *aMsg) {return NS_OK;}
 
   /* void OnStopSending (in string aMsgID, in nsresult aStatus, in wstring aMsg, in nsIFile returnFile); */
   NS_IMETHOD OnStopSending(const char *aMsgID, nsresult aStatus, const PRUnichar *aMsg,
                nsIFile *returnFile) {
-    m_done = PR_TRUE;
+    m_done = true;
     m_location = returnFile;
     return NS_OK;
   }
 
     /* void OnSendNotPerformed */
     NS_IMETHOD OnSendNotPerformed(const char *aMsgID, nsresult aStatus) {return NS_OK;}
 
   /* void OnGetDraftFolderURI (); */
   NS_IMETHOD OnGetDraftFolderURI(const char *aFolderURI) {return NS_OK;}
 
   static nsresult CreateSendListener( nsIMsgSendListener **ppListener);
 
-  void Reset() { m_done = PR_FALSE;  m_location = nsnull;}
+  void Reset() { m_done = false;  m_location = nsnull;}
 
 public:
   bool m_done;
   nsCOMPtr <nsIFile> m_location;
 };
 
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(EudoraSendListener, nsIMsgSendListener)
@@ -198,17 +198,17 @@ nsEudoraCompose::nsEudoraCompose()
   else
     m_headerLen = 0;
   m_pBody = p_test_body;
   if (m_pBody)
     m_bodyLen = strlen( m_pBody);
   else
     m_bodyLen = 0;
 
-  m_readHeaders.m_convertCRs = PR_TRUE;
+  m_readHeaders.m_convertCRs = true;
 }
 
 
 nsEudoraCompose::~nsEudoraCompose()
 {
   NS_IF_RELEASE( m_pListener);
   NS_IF_RELEASE( m_pMsgFields);
 }
@@ -226,23 +226,23 @@ nsresult nsEudoraCompose::CreateIdentity
 
   rv = accMgr->CreateIdentity( &s_pIdentity);
   nsString name(NS_LITERAL_STRING("Import Identity"));
   if (s_pIdentity) {
     s_pIdentity->SetFullName(name);
     s_pIdentity->SetIdentityName(name);
     s_pIdentity->SetEmail(NS_LITERAL_CSTRING("import@import.service"));
 
-    // SetDoFcc to PR_FALSE to save time when CreateAndSendMessage operates.
+    // SetDoFcc to false to save time when CreateAndSendMessage operates.
     // Profiling revealed that GetFolderURIFromUserPrefs was taking up a significant chunk
-    // of time during the operation of CreateAndSendMessage. By calling SetDoFcc(PR_FALSE),
+    // of time during the operation of CreateAndSendMessage. By calling SetDoFcc(false),
     // we skip Fcc handling code inside of InitCompositionFields (called indirectly during
     // CreateAndSendMessage operation). There's no point in any Fcc code firing since the
     // message will never actually be sent anyway.
-    s_pIdentity->SetDoFcc(PR_FALSE);
+    s_pIdentity->SetDoFcc(false);
   }
   return( rv);
 }
 
 void nsEudoraCompose::ReleaseIdentity( void)
 {
   if (s_pIdentity) {
     nsresult rv = s_pIdentity->ClearAllValues();
@@ -268,17 +268,17 @@ nsresult nsEudoraCompose::CreateComponen
   NS_IF_RELEASE( m_pMsgFields);
   if (!m_pListener && NS_SUCCEEDED( rv))
     rv = EudoraSendListener::CreateSendListener( &m_pListener);
 
   if (NS_SUCCEEDED(rv)) {
       rv = CallCreateInstance( kMsgCompFieldsCID, &m_pMsgFields);
     if (NS_SUCCEEDED(rv) && m_pMsgFields) {
       // IMPORT_LOG0( "nsOutlookCompose - CreateComponents succeeded\n");
-      m_pMsgFields->SetForcePlainText( PR_FALSE);
+      m_pMsgFields->SetForcePlainText( false);
       return( NS_OK);
     }
   }
 
   return NS_ERROR_FAILURE;
 }
 
 void nsEudoraCompose::GetNthHeader( const char *pData, PRInt32 dataLen, PRInt32 n, nsCString& header, nsCString& val, bool unwrap)
@@ -456,17 +456,17 @@ void nsEudoraCompose::GetHeaderValue( co
   }
 
   val.Trim( kWhitespace);
 }
 
 
 void nsEudoraCompose::ExtractCharset( nsString& str)
 {
-  PRInt32 idx = MsgFind(str, "charset=", PR_TRUE, 0);
+  PRInt32 idx = MsgFind(str, "charset=", true, 0);
   if (idx != -1) {
     str.Cut(0, idx + 8);
     idx = str.FindChar( ';');
     if (idx != -1)
       str.SetLength(idx);
     str.Trim( kWhitespace);
     if ((str.CharAt( 0) == '"') && (str.Length() > 2)) {
       str.SetLength(str.Length() - 1);
@@ -518,17 +518,17 @@ nsresult nsEudoraCompose::GetLocalAttach
   ImportAttachment * pAttach;
 
   for (PRInt32 i = 0; i < count; i++) {
     nsCOMPtr<nsIMsgAttachedFile> a(do_CreateInstance(NS_MSGATTACHEDFILE_CONTRACTID, &rv));
     NS_ENSURE_SUCCESS(rv, rv);
     // nsMsgNewURL(&url, "file://C:/boxster.jpg");
     // a[i].orig_url = url;
 
-    // NS_PRECONDITION( PR_FALSE, "Forced Break");
+    // NS_PRECONDITION( false, "Forced Break");
 
     pAttach = (ImportAttachment *) m_pAttachments->ElementAt( i);
     nsCOMPtr<nsILocalFile> tmpFile = do_QueryInterface(pAttach->pAttachment);
     a->SetTmpFile(tmpFile);
     urlStr.Adopt(0);
 
     nsCOMPtr <nsIURI> uri;
     nsresult rv = NS_NewFileURI(getter_AddRefs(uri), pAttach->pAttachment);
@@ -539,17 +539,17 @@ nsresult nsEudoraCompose::GetLocalAttach
 
     nsCOMPtr<nsIURI> origUrl;
     rv = m_pIOService->NewURI( urlStr, nsnull, nsnull, getter_AddRefs(origUrl));
     NS_ENSURE_SUCCESS(rv, rv);
     a->SetOrigUrl(origUrl);
     a->SetType(nsDependentCString(pAttach->mimeType));
     a->SetRealName(nsDependentCString(pAttach->description));
     a->SetEncoding(NS_LITERAL_CSTRING(ENCODING_BINARY));
-    attachments->AppendElement(a, PR_FALSE);
+    attachments->AppendElement(a, false);
   }
   return NS_OK;
 }
 
 // Test a message send????
 nsresult nsEudoraCompose::SendTheMessage(nsIFile *pMailImportLocation, nsIFile **pMsg)
 {
   nsresult rv = CreateComponents();
@@ -724,40 +724,40 @@ bool SimpleBufferTonyRCopiedOnce::Specia
 {
   // Arg!!!!!  Mozilla can't handle plain CRs in any mail messages.  Particularly a
   // problem with Eudora since it doesn't give a rats a**
   *pWritten = len;
   PRInt32  sz = offset + len;
   if (offset) {
     if ((m_pBuffer[offset - 1] == 0x0D) && (*pData != 0x0A)) {
       sz++;
-      if (!Grow( sz)) return( PR_FALSE);
+      if (!Grow( sz)) return( false);
       m_pBuffer[offset] = 0x0A;
       offset++;
       (*pWritten)++;
     }
   }
   while (len > 0) {
     if ((*pData == 0x0D) && (*(pData + 1) != 0x0A)) {
       sz++;
-      if (!Grow( sz)) return( PR_FALSE);
+      if (!Grow( sz)) return( false);
       m_pBuffer[offset] = 0x0D;
       offset++;
       m_pBuffer[offset] = 0x0A;
       (*pWritten)++;
     }
     else {
       m_pBuffer[offset] = *pData;
     }
     offset++;
     pData++;
     len--;
   }
 
-  return( PR_TRUE);
+  return( true);
 }
 
 nsresult nsEudoraCompose::ReadHeaders( ReadFileState *pState, SimpleBufferTonyRCopiedOnce& copy, SimpleBufferTonyRCopiedOnce& header)
 {
   // This should be the headers...
   header.m_writeOffset = 0;
 
   nsresult rv;
@@ -964,20 +964,20 @@ static const char *gReplaceHeaders[kMaxR
   "Reply-to",
   "cc"
 };
 
 bool nsEudoraCompose::IsReplaceHeader( const char *pHeader)
 {
   for (int i = 0; i < kMaxReplaceHeaders; i++) {
     if (!PL_strcasecmp( pHeader, gReplaceHeaders[i]))
-      return( PR_TRUE);
+      return( true);
   }
 
-  return( PR_FALSE);
+  return( false);
 }
 
 PRInt32 nsEudoraCompose::IsSpecialHeader( const char *pHeader)
 {
   for (int i = 0; i < kMaxSpecialHeaders; i++) {
     if (!PL_strcasecmp( pHeader, gSpecialHeaders[i]))
       return( (PRInt32) i);
   }
@@ -1003,42 +1003,42 @@ nsresult nsEudoraCompose::WriteHeaders(n
   PRUint32 written;
   nsresult rv = NS_OK; // it's ok if we don't have the first header on the predefined lists.
   PRInt32 specialHeader;
   bool specials[kMaxSpecialHeaders];
   bool      hasDateHeader = false;
   int i;
 
   for (i = 0; i < kMaxSpecialHeaders; i++)
-    specials[i] = PR_FALSE;
+    specials[i] = false;
 
   // m_pHeaders - contains headers from a Eudora msg.
   // newHeaders - contains headers from a mozilla msg (more headers here).
   do {
-    GetNthHeader( m_pHeaders, m_headerLen, n, header, val, PR_FALSE);
-    // GetNthHeader( newHeaders.m_pBuffer, newHeaders.m_writeOffset, n, header, val, PR_FALSE);
+    GetNthHeader( m_pHeaders, m_headerLen, n, header, val, false);
+    // GetNthHeader( newHeaders.m_pBuffer, newHeaders.m_writeOffset, n, header, val, false);
     if (!header.IsEmpty()) {
       if ((specialHeader = IsSpecialHeader( header.get())) != -1) {
         header.Append( ':');
-        GetHeaderValue( newHeaders.m_pBuffer, newHeaders.m_writeOffset - 1, header.get(), val, PR_FALSE);
+        GetHeaderValue( newHeaders.m_pBuffer, newHeaders.m_writeOffset - 1, header.get(), val, false);
         header.SetLength( header.Length() - 1);
-        specials[specialHeader] = PR_TRUE;
+        specials[specialHeader] = true;
       }
       else if (IsReplaceHeader( header.get())) {
         replaceVal.Truncate();
         header.Append( ':');
-        GetHeaderValue( newHeaders.m_pBuffer, newHeaders.m_writeOffset - 1, header.get(), replaceVal, PR_FALSE);
+        GetHeaderValue( newHeaders.m_pBuffer, newHeaders.m_writeOffset - 1, header.get(), replaceVal, false);
         header.SetLength( header.Length() - 1);
         if (!replaceVal.IsEmpty())
           val = replaceVal;
       }
       if (!val.IsEmpty()) {
         // See if we're writing out a Date: header.
         if (header.LowerCaseEqualsLiteral("date"))
-          hasDateHeader = PR_TRUE;
+          hasDateHeader = true;
         rv = pDst->Write( header.get(), header.Length(), &written);
         if (NS_SUCCEEDED( rv))
           rv = pDst->Write( ": ", 2, &written);
         if (NS_SUCCEEDED( rv))
           rv = pDst->Write( val.get(), val.Length(), &written);
         if (NS_SUCCEEDED( rv))
           rv = pDst->Write( "\x0D\x0A", 2, &written);
 
@@ -1054,17 +1054,17 @@ nsresult nsEudoraCompose::WriteHeaders(n
     if (NS_SUCCEEDED( rv))
       rv = pDst->Write( "\x0D\x0A", 2, &written);
   }
 
   for (i = 0; (i < kMaxSpecialHeaders) && NS_SUCCEEDED( rv); i++) {
     if (!specials[i]) {
       header = gSpecialHeaders[i];
       header.Append( ':');
-      GetHeaderValue( newHeaders.m_pBuffer, newHeaders.m_writeOffset - 1, header.get(), val, PR_FALSE);
+      GetHeaderValue( newHeaders.m_pBuffer, newHeaders.m_writeOffset - 1, header.get(), val, false);
       header.SetLength( header.Length() - 1);
       if (!val.IsEmpty()) {
         rv = pDst->Write( header.get(), header.Length(), &written);
         if (NS_SUCCEEDED( rv))
           rv = pDst->Write( ": ", 2, &written);
         if (NS_SUCCEEDED( rv))
           rv = pDst->Write( val.get(), val.Length(), &written);
         if (NS_SUCCEEDED( rv))
--- a/mailnews/import/eudora/src/nsEudoraCompose.h
+++ b/mailnews/import/eudora/src/nsEudoraCompose.h
@@ -78,54 +78,54 @@ public:
   PRInt64    size;
   nsCOMPtr <nsIFile>  pFile;
         nsCOMPtr <nsIInputStream> pInputStream;
 } ReadFileState;
 
 class SimpleBufferTonyRCopiedOnce {
 public:
   SimpleBufferTonyRCopiedOnce() {m_pBuffer = nsnull; m_size = 0; m_growBy = 4096; m_writeOffset = 0;
-          m_bytesInBuf = 0; m_convertCRs = PR_FALSE;}
+          m_bytesInBuf = 0; m_convertCRs = false;}
   ~SimpleBufferTonyRCopiedOnce() { if (m_pBuffer) delete [] m_pBuffer;}
 
   bool Allocate( PRInt32 sz) {
     if (m_pBuffer) delete [] m_pBuffer;
     m_pBuffer = new char[sz];
-    if (m_pBuffer) { m_size = sz; return( PR_TRUE); }
-    else { m_size = 0; return( PR_FALSE);}
+    if (m_pBuffer) { m_size = sz; return( true); }
+    else { m_size = 0; return( false);}
   }
 
   bool Grow( PRInt32 newSize) { if (newSize > m_size) return( ReAllocate( newSize)); else return( true);}
   bool ReAllocate( PRInt32 newSize) {
-    if (newSize <= m_size) return( PR_TRUE);
+    if (newSize <= m_size) return( true);
     char *pOldBuffer = m_pBuffer;
     PRInt32  oldSize = m_size;
     m_pBuffer = nsnull;
     while (m_size < newSize) m_size += m_growBy;
     if (Allocate( m_size)) {
       if (pOldBuffer) { memcpy( m_pBuffer, pOldBuffer, oldSize); delete [] pOldBuffer;}
-      return( PR_TRUE);
+      return( true);
     }
-    else { m_pBuffer = pOldBuffer; m_size = oldSize; return( PR_FALSE);}
+    else { m_pBuffer = pOldBuffer; m_size = oldSize; return( false);}
   }
 
   bool Write( PRInt32 offset, const char *pData, PRInt32 len, PRInt32 *pWritten) {
     *pWritten = len;
-    if (!len) return( PR_TRUE);
-    if (!Grow( offset + len)) return( PR_FALSE);
+    if (!len) return( true);
+    if (!Grow( offset + len)) return( false);
     if (m_convertCRs)
       return( SpecialMemCpy( offset, pData, len, pWritten));
     memcpy( m_pBuffer + offset, pData, len);
-    return( PR_TRUE);
+    return( true);
   }
 
   bool Write( const char *pData, PRInt32 len) {
     PRInt32 written;
-    if (Write( m_writeOffset, pData, len, &written)) { m_writeOffset += written; return( PR_TRUE);}
-    else return( PR_FALSE);
+    if (Write( m_writeOffset, pData, len, &written)) { m_writeOffset += written; return( true);}
+    else return( false);
   }
 
   bool    SpecialMemCpy( PRInt32 offset, const char *pData, PRInt32 len, PRInt32 *pWritten);
 
   bool    m_convertCRs;
   char *  m_pBuffer;
   PRUint32  m_bytesInBuf;  // used when reading into this buffer
   PRInt32  m_size;      // allocated size of buffer
@@ -156,17 +156,17 @@ public:
 private:
   nsresult  CreateComponents( void);
 
   void    GetNthHeader( const char *pData, PRInt32 dataLen, PRInt32 n, nsCString& header, nsCString& val, bool unwrap);
   void    GetHeaderValue( const char *pData, PRInt32 dataLen, const char *pHeader, nsCString& val, bool unwrap = true);
   void    GetHeaderValue( const char *pData, PRInt32 dataLen, const char *pHeader, nsString& val) {
     val.Truncate();
     nsCString  hVal;
-    GetHeaderValue( pData, dataLen, pHeader, hVal, PR_TRUE);
+    GetHeaderValue( pData, dataLen, pHeader, hVal, true);
     NS_CopyNativeToUnicode( hVal, val);
   }
   void    ExtractCharset( nsString& str);
   void    ExtractType( nsString& str);
 
   nsresult GetLocalAttachments(nsIArray **aArray);
 
   nsresult  ReadHeaders( ReadFileState *pState, SimpleBufferTonyRCopiedOnce& copy, SimpleBufferTonyRCopiedOnce& header);
--- a/mailnews/import/eudora/src/nsEudoraEditor.cpp
+++ b/mailnews/import/eudora/src/nsEudoraEditor.cpp
@@ -140,45 +140,45 @@ nsresult nsEudoraEditor::GetEmbeddedObje
   // one that I know of, but then again I didn't realize that Eudora translators had
   // ever translated "Attachment Converted" as suggested by other Eudora importing code.
   for (PRInt32 i = 0; *sEudoraEmbeddedContentLines[i] != '\0'; i++)
   {
     // Search for "Embedded Content: " lines starting after last closing tag (if any)
     PRInt32   startEmbeddedContentLine = startLastClosingTag;
     PRInt32   lenEmbeddedContentTag = strlen(sEudoraEmbeddedContentLines[i]);
 
-    while ( (startEmbeddedContentLine = m_body.Find(sEudoraEmbeddedContentLines[i], PR_TRUE, startEmbeddedContentLine+1)) != kNotFound )
+    while ( (startEmbeddedContentLine = m_body.Find(sEudoraEmbeddedContentLines[i], true, startEmbeddedContentLine+1)) != kNotFound )
     {
       // Found this translation of "Embedded Content" - remember that so that we don't
       // bother looking for any other translations.
-      foundEmbeddedContentLines = PR_TRUE;
+      foundEmbeddedContentLines = true;
 
       // Extract the file name from the embedded content line
       PRInt32   startFileName = startEmbeddedContentLine + lenEmbeddedContentTag;
-      PRInt32   endFileName = m_body.Find(":", PR_FALSE, startFileName);
+      PRInt32   endFileName = m_body.Find(":", false, startFileName);
 
       // Create the file spec for the embedded image
       embeddedFolderSpec->Clone(getter_AddRefs(embeddedImageSpec));
       embeddedImageSpec->Append(Substring(m_body, startFileName, endFileName - startFileName));
 
       // Verify that the embedded image spec exists and is a file
       bool      isFile = false;
       bool      exists = false;
       if ( NS_FAILED(embeddedImageSpec->Exists( &exists)) || NS_FAILED(embeddedImageSpec->IsFile(&isFile)) )
         continue;
       if (!exists || !isFile)
         continue;
 
       // Extract CID hash from the embedded content line
       PRInt32     cidHashValue;
-      PRInt32     startCIDHash = m_body.Find(",", PR_FALSE, endFileName);
+      PRInt32     startCIDHash = m_body.Find(",", false, endFileName);
       if (startCIDHash != kNotFound)
       {
         startCIDHash++;
-        PRInt32   endCIDHash = m_body.Find(",", PR_FALSE, startCIDHash);
+        PRInt32   endCIDHash = m_body.Find(",", false, startCIDHash);
 
         if (endCIDHash != kNotFound)
         {
           nsString    cidHash;
           cidHash.Assign(Substring(m_body, startCIDHash, endCIDHash - startCIDHash));
 
           if ( !cidHash.IsEmpty() )
           {
@@ -204,17 +204,17 @@ nsresult nsEudoraEditor::GetEmbeddedObje
         new nsEudoraHTMLImageElement(srcUrl, cid);
 
       nsCOMPtr<nsIDOMHTMLImageElement>   imageNode;
       image->QueryInterface( NS_GET_IID(nsIDOMHTMLImageElement), getter_AddRefs(imageNode) );
 
       // Append the embedded image node to the list
       (*aNodeList)->AppendElement(imageNode);
 
-      PRInt32   endEmbeddedContentLine = m_body.Find("\r\n", PR_TRUE, startEmbeddedContentLine+1);
+      PRInt32   endEmbeddedContentLine = m_body.Find("\r\n", true, startEmbeddedContentLine+1);
       if (endEmbeddedContentLine != kNotFound)
       {
         // We recognized the "Embedded Content" line correctly and found the associated image.
         // Remove the Eudora specific line about it now.
         m_body.Cut(startEmbeddedContentLine, endEmbeddedContentLine - startEmbeddedContentLine + 2);
 
         // Backup by one to correct where we start looking for the next line
         startEmbeddedContentLine--;
@@ -304,17 +304,17 @@ bool nsEudoraEditor::GetEmbeddedImageCID
 
 bool nsEudoraEditor::HasEmbeddedContent()
 {
   // Simple quick test to see if there's any embedded content lines
   bool     bHasEmbeddedContent = false;
 
   for (PRInt32 i = 0; *sEudoraEmbeddedContentLines[i] != '\0'; i++)
   {
-    bHasEmbeddedContent = (m_body.Find(sEudoraEmbeddedContentLines[i], PR_TRUE, 0) != kNotFound);
+    bHasEmbeddedContent = (m_body.Find(sEudoraEmbeddedContentLines[i], true, 0) != kNotFound);
 
     if (bHasEmbeddedContent)
       break;
   }
 
   return bHasEmbeddedContent;
 }
 
--- a/mailnews/import/eudora/src/nsEudoraFilters.cpp
+++ b/mailnews/import/eudora/src/nsEudoraFilters.cpp
@@ -91,17 +91,17 @@ NS_IMPL_ISUPPORTS1(nsEudoraFilters, nsII
 
 NS_IMETHODIMP nsEudoraFilters::AutoLocate(PRUnichar **aDescription, nsIFile **aLocation, bool *_retval)
 {
   NS_ENSURE_ARG_POINTER(aDescription);
   NS_ENSURE_ARG_POINTER(aLocation);
   NS_ENSURE_ARG_POINTER(_retval);
 
   *aDescription = nsnull;
-  *_retval = PR_FALSE;
+  *_retval = false;
 
   nsresult rv;
   m_pLocation =  do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   *aDescription = nsEudoraStringBundle::GetStringByID( EUDORAIMPORT_NAME);
 
 #if defined(XP_WIN) || defined(XP_OS2)
@@ -123,17 +123,17 @@ NS_IMETHODIMP nsEudoraFilters::SetLocati
 }
 
 NS_IMETHODIMP nsEudoraFilters::Import(PRUnichar **aError, bool *_retval)
 {
   NS_ENSURE_ARG_POINTER(aError);
   NS_ENSURE_ARG_POINTER(_retval);
   nsresult rv;
 
-  *_retval = PR_FALSE;
+  *_retval = false;
   *aError = nsnull;
 
   // Get the settings file if it doesn't exist
   if (!m_pLocation)
   {
     m_pLocation =  do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 #if defined(XP_WIN) || defined(XP_OS2)
@@ -167,33 +167,33 @@ NS_IMETHODIMP nsEudoraFilters::Import(PR
 bool nsEudoraFilters::RealImport()
 {
   nsresult rv;
 
   rv = Init();
   if (NS_FAILED(rv))
   {
     IMPORT_LOG0( "*** Error initializing filter import process\n");
-    return PR_FALSE;
+    return false;
   }
 
   nsCOMPtr <nsIInputStream> inputStream;
   rv = NS_NewLocalFileInputStream(getter_AddRefs(inputStream), m_pLocation);
 
   if (NS_FAILED(rv))
   {
     IMPORT_LOG0( "*** Error opening filters file for reading\n");
-    return PR_FALSE;
+    return false;
   }
 
   rv = LoadServers();
   if (NS_FAILED(rv))
   {
     IMPORT_LOG0( "*** Error loading servers with filters\n");
-    return PR_FALSE;
+    return false;
   }
 
   nsCOMPtr<nsILineInputStream> lineStream(do_QueryInterface(inputStream, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCString     line;
   bool          more = true;
   nsCAutoString header;
@@ -225,41 +225,41 @@ bool nsEudoraFilters::RealImport()
 #ifdef XP_MACOSX
       else if (!strncmp(pLine, "id ", 3))
         ;// ids have no value to us, but we don't want them to produce a warning either
 #endif
       else if (!strncmp(pLine, "conjunction ", 12))
       {
         const char* cj = pLine + 12;
         if (!strcmp(cj, "and"))
-          m_isAnd = PR_TRUE;
+          m_isAnd = true;
         else if (!strcmp(cj, "unless"))
-          m_isUnless = PR_TRUE;
+          m_isUnless = true;
         else if (!strcmp(cj, "ignore"))
-          m_ignoreTerm = PR_TRUE;
+          m_ignoreTerm = true;
       }
       else if (!strncmp(pLine, "header ", 7))
         header = (pLine + 7);
       else if (!strncmp(pLine, "verb ", 5))
         verb = (pLine + 5);
       else if (!strncmp(pLine, "value ", 6))
       {
         if (!m_ignoreTerm)
         {
           rv = AddTerm(header.get(), verb.get(), pLine + 6, (m_isAnd || m_isUnless), m_isUnless);
           // For now, ignoring terms that can't be represented in TB filters
           if (rv == NS_ERROR_INVALID_ARG)
           {
             rv = NS_OK;
-            m_termNotGroked = PR_TRUE;
+            m_termNotGroked = true;
           }
         }
       }
       else if (!strcmp(pLine, "incoming"))
-        m_isIncoming = PR_TRUE;
+        m_isIncoming = true;
       else if (!strncmp(pLine, "transfer ", 9) ||
                !strncmp(pLine, "copy ", 5))
       {
         const char* pMailboxPath = strchr(pLine, ' ') + 1;
         bool isTransfer = (*pLine == 't');
         rv = AddMailboxAction(pMailboxPath, isTransfer);
         if (rv == NS_ERROR_INVALID_ARG)
         {
@@ -270,17 +270,17 @@ bool nsEudoraFilters::RealImport()
           m_errorLog += NS_LITERAL_STRING(": ");
           m_errorLog += nsEudoraStringBundle::FormatString(EUDORAIMPORT_FILTERS_WARN_MAILBOX_MISSING, unicodeMailboxPath.get());
           m_errorLog += NS_LITERAL_STRING("\n");
           rv = NS_OK;
         }
       }
       // Doing strncmp() here because Win Eudora puts a space after "stop" but Mac Eudora doesn't
       else if (!strncmp(pLine, "stop", 4))
-        m_hasStop = PR_TRUE;
+        m_hasStop = true;
       else if (!strncmp(pLine, "forward ", 8))
         rv = AddStringAction(nsMsgFilterAction::Forward, pLine + 8);
       else if (!strncmp(pLine, "reply ", 6))
         rv = AddStringAction(nsMsgFilterAction::Reply, pLine + 6);
       else if (!strncmp(pLine, "priority ", 9))
       {
         // Win Eudora's  priority values are 0 (highest) to 4 (lowest)
         // Mac Eudora's  priority values are 1 (highest) to 5 (lowest)
@@ -353,17 +353,17 @@ bool nsEudoraFilters::RealImport()
   if (!more && NS_SUCCEEDED(rv))
     rv = FinalizeFilter();
 
   inputStream->Close();
 
   if (more)
   {
     IMPORT_LOG0( "*** Error reading the filters, didn't reach the end\n");
-    return PR_FALSE;
+    return false;
   }
 
   rv = SaveFilters();
 
   return NS_SUCCEEDED(rv);
 }
 
 nsresult nsEudoraFilters::Init()
@@ -515,37 +515,37 @@ nsresult nsEudoraFilters::CreateNewFilte
     nsCOMPtr <nsIMsgFilterList> filterList;
     rv = server->GetFilterList(nsnull, getter_AddRefs(filterList));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsIMsgFilter> newFilter;
     rv = filterList->CreateFilter(unicodeName, getter_AddRefs(newFilter));
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = newFilter->SetEnabled(PR_FALSE);
+    rv = newFilter->SetEnabled(false);
     NS_ENSURE_SUCCESS(rv, rv);
 
     PRUint32 count;
     rv = filterList->GetFilterCount(&count);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = filterList->InsertFilterAt(count, newFilter);
     NS_ENSURE_SUCCESS(rv, rv);
 
     m_pFilterArray->AppendElement(newFilter);
   }
 
-  m_isAnd = PR_FALSE;
-  m_isUnless = PR_FALSE;
-  m_ignoreTerm = PR_FALSE;
-  m_isIncoming = PR_FALSE;
-  m_addedAction = PR_FALSE;
-  m_hasTransfer = PR_FALSE;
-  m_hasStop = PR_FALSE;
-  m_termNotGroked = PR_FALSE;
+  m_isAnd = false;
+  m_isUnless = false;
+  m_ignoreTerm = false;
+  m_isIncoming = false;
+  m_addedAction = false;
+  m_hasTransfer = false;
+  m_hasStop = false;
+  m_termNotGroked = false;
 
   return NS_OK;
 }
 
 nsresult nsEudoraFilters::FinalizeFilter()
 {
   nsresult rv = NS_OK;
 
@@ -555,17 +555,17 @@ nsresult nsEudoraFilters::FinalizeFilter
     AddAction(nsMsgFilterAction::StopExecution);
 
   // TB only does filtering on incoming messages.
   // Also, if you don't provide an action for a filter, TB will provide a default action of moving
   // the message to the first mailbox in the first set of mailboxes.  Not what we want, so
   // we disable the filter (gives the user a chance to add their own actions and enable).
   // Lastly, only enable if all terms were fully understood.
   if (m_isIncoming && m_addedAction && !m_termNotGroked)
-    rv = EnableFilter(PR_TRUE);
+    rv = EnableFilter(true);
 
   return rv;
 }
 
 nsresult nsEudoraFilters::EnableFilter(bool enable)
 {
   nsresult rv;
 
@@ -787,17 +787,17 @@ nsresult nsEudoraFilters::AddTerm(const 
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsIMsgSearchTerm> term;
     if (booleanAnd)
     {
       term = do_QueryElementAt(terms, 0, &rv);
       if (NS_SUCCEEDED(rv) && term)
       {
-        term->SetBooleanAnd(PR_TRUE);
+        term->SetBooleanAnd(true);
         term = nsnull;
       }
     }
 
     rv = filter->CreateTerm(getter_AddRefs(term));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsIMsgSearchValue> value;
@@ -877,17 +877,17 @@ nsresult nsEudoraFilters::AddAction(nsMs
         return NS_ERROR_FAILURE;
     }
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = filter->AppendAction(action);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
-  m_addedAction = PR_TRUE;
+  m_addedAction = true;
 
   return rv;
 }
 
 
 nsresult nsEudoraFilters::AddMailboxAction(const char* pMailboxPath, bool isTransfer)
 {
   nsresult rv;
@@ -913,17 +913,17 @@ nsresult nsEudoraFilters::AddMailboxActi
   if (NS_SUCCEEDED(rv))
     rv = folder->GetURI(folderURI);
   if (NS_FAILED(rv))
     return NS_ERROR_INVALID_ARG;
 
   rv = AddAction(isTransfer? (nsMsgRuleActionType)nsMsgFilterAction::MoveToFolder : (nsMsgRuleActionType)nsMsgFilterAction::CopyToFolder, 0, 0, 0, nsnull, folderURI.get());
 
   if (NS_SUCCEEDED(rv) && isTransfer)
-    m_hasTransfer = PR_TRUE;
+    m_hasTransfer = true;
 
   return rv;
 }
 
 nsresult nsEudoraFilters::GetMailboxFolder(const char* pNameHierarchy, nsIMsgFolder** ppFolder)
 {
   NS_ENSURE_ARG_POINTER(ppFolder);
 
--- a/mailnews/import/eudora/src/nsEudoraImport.cpp
+++ b/mailnews/import/eudora/src/nsEudoraImport.cpp
@@ -253,17 +253,17 @@ NS_IMETHODIMP nsEudoraImport::GetSupport
 }
 
 NS_IMETHODIMP nsEudoraImport::GetSupportsUpgrade( bool *pUpgrade)
 {
   NS_PRECONDITION(pUpgrade != nsnull, "null ptr");
   if (! pUpgrade)
     return NS_ERROR_NULL_POINTER;
 
-  *pUpgrade = PR_TRUE;
+  *pUpgrade = true;
   return( NS_OK);
 }
 
 
 NS_IMETHODIMP nsEudoraImport::GetImportInterface( const char *pImportType, nsISupports **ppInterface)
 {
   NS_PRECONDITION(pImportType != nsnull, "null ptr");
   if (! pImportType)
@@ -445,17 +445,17 @@ NS_IMETHODIMP ImportEudoraMailImpl::GetD
   NS_PRECONDITION(ppLoc != nsnull, "null ptr");
   NS_PRECONDITION(found != nsnull, "null ptr");
   NS_PRECONDITION(userVerify != nsnull, "null ptr");
   if (!ppLoc || !found || !userVerify)
     return NS_ERROR_NULL_POINTER;
 
   *ppLoc = nsnull;
   *found = m_eudora.FindMailFolder(ppLoc);
-  *userVerify = PR_TRUE;
+  *userVerify = true;
 
   return( NS_OK);
 }
 
 
 NS_IMETHODIMP ImportEudoraMailImpl::FindMailboxes( nsIFile *pLoc, nsISupportsArray **ppArray)
 {
   NS_PRECONDITION(pLoc != nsnull, "null ptr");
@@ -531,17 +531,17 @@ NS_IMETHODIMP ImportEudoraMailImpl::Impo
 
   nsString  success;
   nsString  error;
   if (!pSource || !pDestination || !fatalError)
   {
     IMPORT_LOG0( "*** Bad param passed to eudora mailbox import\n");
     nsEudoraStringBundle::GetStringByID( EUDORAIMPORT_MAILBOX_BADPARAM, error);
     if (fatalError)
-      *fatalError = PR_TRUE;
+      *fatalError = true;
     SetLogs( success, error, pErrorLog, pSuccessLog);
     return NS_ERROR_NULL_POINTER;
   }
 
   bool      abort = false;
   nsString  name;
   PRUnichar *  pName;
   if (NS_SUCCEEDED( pSource->GetDisplayName( &pName)))
@@ -647,17 +647,17 @@ NS_IMPL_THREADSAFE_ISUPPORTS1(ImportEudo
 NS_IMETHODIMP ImportEudoraAddressImpl::GetAutoFind(PRUnichar **description, bool *_retval)
 {
   NS_PRECONDITION(description != nsnull, "null ptr");
   NS_PRECONDITION(_retval != nsnull, "null ptr");
   if (! description || !_retval)
     return NS_ERROR_NULL_POINTER;
 
   nsString  str;
-  *_retval = PR_FALSE;
+  *_retval = false;
   nsEudoraStringBundle::GetStringByID( EUDORAIMPORT_NICKNAMES_NAME, str);
   *description = ToNewUnicode(str);
 
   return( NS_OK);
 }
 
 
 NS_IMETHODIMP ImportEudoraAddressImpl::GetDefaultLocation(nsIFile **ppLoc, bool *found, bool *userVerify)
@@ -665,17 +665,17 @@ NS_IMETHODIMP ImportEudoraAddressImpl::G
   NS_PRECONDITION(found != nsnull, "null ptr");
   NS_PRECONDITION(ppLoc != nsnull, "null ptr");
   NS_PRECONDITION(userVerify != nsnull, "null ptr");
   if (! found || !userVerify || !ppLoc)
     return NS_ERROR_NULL_POINTER;
 
   *ppLoc = nsnull;
   *found = m_eudora.FindAddressFolder(ppLoc);
-  *userVerify = PR_TRUE;
+  *userVerify = true;
 
   return( NS_OK);
 }
 
 
 
 NS_IMETHODIMP ImportEudoraAddressImpl::FindAddressBooks(nsIFile *pLoc, nsISupportsArray **ppArray)
 {
@@ -728,17 +728,17 @@ ImportEudoraAddressImpl::ImportAddressBo
     NS_PRECONDITION(fatalError != nsnull, "null ptr");
 
   nsString  success;
   nsString  error;
     if (!pSource || !pDestination || !fatalError) {
     IMPORT_LOG0( "*** Bad param passed to eudora address import\n");
     nsEudoraStringBundle::GetStringByID(EUDORAIMPORT_ADDRESS_BADPARAM, error);
     if (fatalError)
-      *fatalError = PR_TRUE;
+      *fatalError = true;
     ImportEudoraMailImpl::SetLogs( success, error, pErrorLog, pSuccessLog);
       return NS_ERROR_NULL_POINTER;
   }
 
     bool      abort = false;
     nsString  name;
     pSource->GetPreferredName(name);
 
--- a/mailnews/import/eudora/src/nsEudoraMac.cpp
+++ b/mailnews/import/eudora/src/nsEudoraMac.cpp
@@ -113,55 +113,55 @@ bool nsEudoraMac::FindEudoraLocation( ns
   return result;
 }
 
 bool nsEudoraMac::FindEudoraLocation( nsIFile **pFolder, bool findIni, const char *specialDirName )
 {
   nsCOMPtr <nsIFile> searchDir;
   nsresult rv = NS_GetSpecialDirectory( specialDirName, getter_AddRefs(searchDir) );
   if (NS_FAILED(rv))
-    return (PR_FALSE);
+    return (false);
 
   // Turn it into a mac file, so we can resolve aliases
   nsCOMPtr<nsILocalFileMac> macFile = do_QueryInterface(searchDir);
   if (!macFile)
-    return (PR_FALSE);
-  macFile->SetFollowLinks(PR_TRUE);
+    return (false);
+  macFile->SetFollowLinks(true);
 
   // It's always called "Eudora Folder", so add that to the path
   macFile->AppendNative( NS_LITERAL_CSTRING( "Eudora Folder"  ) );
 
   // If it's an alias, the "target" will be the real file.  Fetch this as a string
   // and set is back as the file
   nsCString path;
   macFile->GetNativeTarget(path);
   macFile->InitWithNativePath(path);
 
   // Resolve any unix-style symlinks (this won't do MacOS aliases, hence the machinations above)
   bool link = false;
   rv = searchDir->IsSymlink( &link);
   if (NS_SUCCEEDED( rv) && link)
   {
-    rv = macFile->SetFollowLinks(PR_TRUE);
+    rv = macFile->SetFollowLinks(true);
     if (NS_FAILED( rv))
-      return( PR_FALSE);
+      return( false);
   }
 
   // Check for existence and directoriness
   bool exists = false;
   rv = searchDir->Exists( &exists);
   bool isFolder = false;
   if (NS_SUCCEEDED( rv) && exists)
     rv = searchDir->IsDirectory( &isFolder);
   if (!exists || !isFolder)
-    return( PR_FALSE);
+    return( false);
 
   NS_IF_ADDREF(*pFolder = searchDir);
 
-  return PR_TRUE;
+  return true;
 }
 
 bool nsEudoraMac::VerifyEudoraLocation( nsIFile **pFolder, bool findIni )
 {
   bool result = false;
   bool foundPref = false;
 
 
@@ -197,17 +197,17 @@ bool nsEudoraMac::VerifyEudoraLocation( 
     {
       if ((type == 'TEXT') && (creator == 'CSOm'))
         count++;
       else if ((type == 'PREF') && (creator == 'CSOm'))
       {
         if (!foundPref)
         {
           prefFile = entry;
-          foundPref = PR_TRUE;
+          foundPref = true;
         }
         else
         {
           // does one of them end in ".bkup"?
           nsCString leafName;
           entry->GetNativeLeafName(leafName);
           bool isBk = false;
           isBk = StringEndsWith(leafName, NS_LITERAL_CSTRING(".bkup"));
@@ -229,27 +229,27 @@ bool nsEudoraMac::VerifyEudoraLocation( 
                 prefFile = entry;
             }
           }
         }
       }
     }
   }
   if (count >= 2)
-    result = PR_TRUE;
+    result = true;
 
   if (!findIni)
     return( result);
 
   if (!foundPref)
-    return( PR_FALSE);
+    return( false);
 
   NS_IF_ADDREF(*pFolder = prefFile);
 
-  return( PR_TRUE);
+  return( true);
 }
 
 
 nsresult nsEudoraMac::FindMailboxes( nsIFile *pRoot, nsISupportsArray **ppArray)
 {
   nsresult rv = NS_NewISupportsArray( ppArray);
   if (NS_FAILED( rv))
   {
@@ -302,18 +302,18 @@ nsresult nsEudoraMac::IterateMailDir( ns
     bool isFolder;
     bool isFile;
     nsCString fName;
     nsCString ext;
     nsCString name;
     OSType type;
     OSType creator;
 
-    isFolder = PR_FALSE;
-    isFile = PR_FALSE;
+    isFolder = false;
+    isFile = false;
     rv = entry->IsDirectory( &isFolder);
     rv = entry->IsFile( &isFile);
     rv = entry->GetNativeLeafName(fName);
     if (NS_SUCCEEDED( rv) && !fName.IsEmpty())
     {
       if (isFolder)
       {
         if (IsValidMailFolderName( fName))
@@ -431,38 +431,38 @@ bool nsEudoraMac::CreateTocFromResource(
   ResFileRefNum resFile = -1;
 
   {
     nsCOMPtr<nsILocalFileMac> macFile = do_QueryInterface(pMail);
 
     FSRef fsRef;
     nsresult rv = macFile->GetFSRef(&fsRef);
     if (NS_FAILED(rv))
-      return PR_FALSE;
+      return false;
 
     resFile = FSOpenResFile( &fsRef, fsRdPerm);
   }
 
   if (resFile == -1)
-    return( PR_FALSE);
+    return( false);
   Handle  resH = nil;
   short max = Count1Resources( 'TOCF');
   if (max)
     resH = Get1IndResource( 'TOCF', 1);
   bool     result = false;
   if (resH)
   {
     PRInt32 sz = (PRInt32) GetHandleSize( resH);
     if (sz)
     {
       // Create the new TOC file
       nsCOMPtr<nsIFile> tempDir;
       nsresult rv = NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(tempDir));
       if (NS_FAILED(rv))
-        return (PR_FALSE);
+        return (false);
 
       nsCOMPtr <nsIOutputStream> outputStream;
         rv = tempDir->Clone(pToc);
       if (NS_SUCCEEDED( rv))
         rv = (*pToc)->AppendNative( NS_LITERAL_CSTRING("temp.toc"));
       if (NS_SUCCEEDED( rv))
         rv = (*pToc)->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 00600);
       if (NS_SUCCEEDED( rv))
@@ -470,34 +470,34 @@ bool nsEudoraMac::CreateTocFromResource(
       if (NS_SUCCEEDED( rv))
       {
         HLock( resH);
         PRUint32 written = 0;
         rv = outputStream->Write( *resH, sz, &written);
         HUnlock( resH);
         outputStream->Close();
         if (NS_FAILED( rv) || (written != sz))
-          (*pToc)->Remove( PR_FALSE);
+          (*pToc)->Remove( false);
         else
-          result = PR_TRUE;
+          result = true;
       }
     }
     ReleaseResource( resH);
   }
   CloseResFile( resFile);
 
   return( result);
 }
 
 
 nsresult nsEudoraMac::FindTOCFile( nsIFile *pMailFile, nsIFile **ppTOCFile, bool *pDeleteToc)
 {
   nsresult    rv;
 
-  *pDeleteToc = PR_FALSE;
+  *pDeleteToc = false;
   *ppTOCFile = nsnull;
   nsCString leaf;
   rv = pMailFile->GetNativeLeafName(leaf);
   if (NS_FAILED( rv))
     return( rv);
   rv = pMailFile->GetParent( ppTOCFile);
   if (NS_FAILED( rv))
     return( rv);
@@ -525,17 +525,17 @@ nsresult nsEudoraMac::FindTOCFile( nsIFi
 
 
   if (exists && isFile && (type == 'TOCF') && (creator == 'CSOm'))
     return( NS_OK);
 
   // try and create the file from a resource.
   if (CreateTocFromResource( pMailFile, ppTOCFile))
   {
-    *pDeleteToc = PR_TRUE;
+    *pDeleteToc = true;
     return( NS_OK);
   }
   return( NS_ERROR_FAILURE);
 }
 
 // GetIndString isn't supported on 64-bit Mac OS X
 // This code is emulation for GetIndString.
 static StringPtr GetStringFromHandle(Handle aResource,
@@ -585,33 +585,33 @@ static StringPtr GetStringFromHandle(Han
 #define kReturnAddressID      5
 #define kFullNameID           77
 #define kLeaveMailOnServerID  18
 
 
 bool nsEudoraMac::GetSettingsFromResource( nsIFile *pSettings, short resId, nsCString **pStrs, bool *pIMAP)
 {
   nsresult rv;
-  *pIMAP = PR_FALSE;
+  *pIMAP = false;
   // Get settings from the resources...
   ResFileRefNum resFile = -1;
   {
     nsCOMPtr<nsILocalFileMac> macFile = do_QueryInterface(pSettings, &rv);
     if (NS_FAILED(rv))
-      return PR_FALSE;
+      return false;
 
     FSRef fsRef;
     rv = macFile->GetFSRef(&fsRef);
     if (NS_FAILED(rv))
-      return PR_FALSE;
+      return false;
 
     resFile = FSOpenResFile( &fsRef, fsRdPerm);
   }
   if (resFile == -1)
-    return( PR_FALSE);
+    return( false);
 
   UseResFile(resFile);
 
   // smtp server, STR# 1000, 4
   Handle  resH = Get1Resource( 'STR#', resId /* 1000 */);
   int    idx;
   if (resH)
   {
@@ -666,35 +666,35 @@ bool nsEudoraMac::GetSettingsFromResourc
         *(pStrs[5]) = "Y";
       else
         *(pStrs[5]) = "N";
     }
 
     ReleaseResource(resH);
     CloseResFile( resFile);
 
-    return( PR_TRUE);
+    return( true);
   }
   else
   {
     CloseResFile( resFile);
-    return( PR_FALSE);
+    return( false);
   }
 }
 
 bool nsEudoraMac::ImportSettings( nsIFile *pIniFile, nsIMsgAccount **localMailAccount)
 {
   nsresult  rv;
 
   nsCOMPtr<nsIMsgAccountManager> accMgr =
            do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
   if (NS_FAILED(rv))
   {
     IMPORT_LOG0( "*** Failed to create a account manager!\n");
-    return( PR_FALSE);
+    return( false);
   }
 
   short  baseResId = 1000;
   nsCString **pStrs = new nsCString *[kNumSettingStrs];
   int    i;
 
   for (i = 0; i < kNumSettingStrs; i++)
     pStrs[i] = new nsCString;
@@ -708,17 +708,17 @@ bool nsEudoraMac::ImportSettings( nsIFil
   bool    isIMAP = false;
 
   int        popCount = 0;
   int        accounts = 0;
   nsIMsgAccount *  pAccount;
 
   while (baseResId)
   {
-    isIMAP = PR_FALSE;
+    isIMAP = false;
     if (GetSettingsFromResource( pIniFile, baseResId, pStrs, &isIMAP))
     {
       pAccount = nsnull;
       if (!isIMAP)
       {
         // This is a POP account
         if (BuildPOPAccount( accMgr, pStrs, &pAccount, accName))
         {
@@ -792,17 +792,17 @@ bool nsEudoraMac::FindFiltersFile( nsIFi
 
 bool nsEudoraMac::BuildPOPAccount( nsIMsgAccountManager *accMgr, nsCString **pStrs, nsIMsgAccount **ppAccount, nsString& accName)
 {
   if (ppAccount)
     *ppAccount = nsnull;
 
 
   if (!pStrs[kPopServerStr]->Length() || !pStrs[kPopAccountNameStr]->Length())
-    return( PR_FALSE);
+    return( false);
 
   bool    result = false;
 
   // I now have a user name/server name pair, find out if it already exists?
   nsCOMPtr<nsIMsgIncomingServer> in;
   nsresult rv = accMgr->FindServer( *(pStrs[kPopAccountNameStr]), *(pStrs[kPopServerStr]), NS_LITERAL_CSTRING("pop3"), getter_AddRefs( in));
   if (NS_FAILED( rv) || (in == nsnull))
   {
@@ -824,37 +824,37 @@ bool nsEudoraMac::BuildPOPAccount( nsIMs
       if (NS_SUCCEEDED( rv) && account)
       {
         rv = account->SetIncomingServer( in);
 
         IMPORT_LOG0( "Created a new account and set the incoming server to the POP3 server.\n");
 
         nsCOMPtr<nsIPop3IncomingServer> pop3Server = do_QueryInterface(in, &rv);
         NS_ENSURE_SUCCESS(rv,rv);
-        pop3Server->SetLeaveMessagesOnServer(pStrs[kLeaveOnServerStr]->First() == 'Y' ? PR_TRUE : PR_FALSE);
+        pop3Server->SetLeaveMessagesOnServer(pStrs[kLeaveOnServerStr]->First() == 'Y' ? true : false);
 
         // Fiddle with the identities
         SetIdentities(accMgr, account, pStrs[kPopAccountNameStr]->get(), pStrs[kPopServerStr]->get(), pStrs);
-        result = PR_TRUE;
+        result = true;
         if (ppAccount)
           account->QueryInterface( NS_GET_IID(nsIMsgAccount), (void **)ppAccount);
       }
     }
   }
   else
-    result = PR_TRUE;
+    result = true;
 
   return( result);
 }
 
 
 bool nsEudoraMac::BuildIMAPAccount( nsIMsgAccountManager *accMgr, nsCString **pStrs, nsIMsgAccount **ppAccount, nsString& accName)
 {
   if (!pStrs[kPopServerStr]->Length() || !pStrs[kPopAccountNameStr]->Length())
-    return( PR_FALSE);
+    return( false);
 
   bool result = false;
 
   nsCOMPtr<nsIMsgIncomingServer>  in;
   nsresult rv = accMgr->FindServer(*(pStrs[kPopAccountNameStr]), *(pStrs[kPopServerStr]), NS_LITERAL_CSTRING("imap"), getter_AddRefs( in));
   if (NS_FAILED( rv) || (in == nsnull))
   {
     // Create the incoming server and an account for it?
@@ -875,24 +875,24 @@ bool nsEudoraMac::BuildIMAPAccount( nsIM
       if (NS_SUCCEEDED( rv) && account)
       {
         rv = account->SetIncomingServer( in);
 
         IMPORT_LOG0( "Created an account and set the IMAP server as the incoming server\n");
 
         // Fiddle with the identities
         SetIdentities(accMgr, account, pStrs[kPopAccountNameStr]->get(), pStrs[kPopServerStr]->get(), pStrs);
-        result = PR_TRUE;
+        result = true;
         if (ppAccount)
           account->QueryInterface( NS_GET_IID(nsIMsgAccount), (void **)ppAccount);
       }
     }
   }
   else
-    result = PR_TRUE;
+    result = true;
 
   return( result);
 }
 
 
 void nsEudoraMac::SetIdentities(nsIMsgAccountManager *accMgr, nsIMsgAccount *acc, const char *userName, const char *serverName, nsCString **pStrs)
 {
   nsresult rv;
@@ -1087,63 +1087,63 @@ const char *cBadFolderNames[kNumBadFolde
   "Signature Folder",
   "Spool Folder",
   "Stationery Folder"
 };
 
 bool nsEudoraMac::IsValidMailFolderName( nsCString& name)
 {
   if (m_depth > 1)
-    return( PR_TRUE);
+    return( true);
 
   for (int i = 0; i < kNumBadFolderNames; i++)
   {
     if (name.Equals( cBadFolderNames[i], nsCaseInsensitiveCStringComparator()))
-      return( PR_FALSE);
+      return( false);
   }
 
-  return( PR_TRUE);
+  return( true);
 }
 
 
 bool nsEudoraMac::IsValidMailboxName( nsCString& fName)
 {
   if (m_depth > 1)
-    return( PR_TRUE);
+    return( true);
   if (fName.LowerCaseEqualsLiteral("eudora nicknames"))
-    return( PR_FALSE);
-  return( PR_TRUE);
+    return( false);
+  return( true);
 }
 
 
 bool nsEudoraMac::IsValidMailboxFile( nsIFile *pFile)
 {
   PRInt64  size = 0;
   nsresult rv = pFile->GetFileSize( &size);
   if (size)
   {
     if (size < 10)
-      return( PR_FALSE);
+      return( false);
     nsCOMPtr <nsIInputStream> inputStream;
     rv = NS_NewLocalFileInputStream(getter_AddRefs(inputStream), pFile);
     if (NS_FAILED( rv))
-      return( PR_FALSE);
+      return( false);
     PRUint32  read = 0;
     char  buffer[6];
     char *  pBuf = buffer;
     rv = inputStream->Read( pBuf, 5, &read);
     inputStream->Close();
     if (NS_FAILED( rv) || (read != 5))
-      return( PR_FALSE);
+      return( false);
     buffer[5] = 0;
     if (strcmp( buffer, "From "))
-      return( PR_FALSE);
+      return( false);
   }
 
-  return( PR_TRUE);
+  return( true);
 }
 
 
 
 
 bool nsEudoraMac::FindAddressFolder( nsIFile **pFolder)
 {
   return( FindEudoraLocation( pFolder));
@@ -1210,17 +1210,17 @@ nsresult nsEudoraMac::FindAddressBooks( 
       return( rv);
     }
   }
 
   // Now try the directory of address books!
   rv = file->InitWithFile(localRoot);
   if (NS_SUCCEEDED( rv))
     rv = file->AppendNative(NS_LITERAL_CSTRING("Nicknames Folder"));
-  exists = PR_FALSE;
+  exists = false;
   bool    isDir = false;
   if (NS_SUCCEEDED( rv))
     rv = file->Exists( &exists);
   if (NS_SUCCEEDED( rv) && exists)
     rv = file->IsDirectory( &isDir);
 
   if (!isDir)
     return( NS_OK);
@@ -1240,17 +1240,17 @@ nsresult nsEudoraMac::FindAddressBooks( 
   {
     nsCOMPtr<nsISupports> aSupport;
     rv = directoryEnumerator->GetNext(getter_AddRefs(aSupport));
     nsCOMPtr<nsILocalFile> entry(do_QueryInterface(aSupport, &rv));
     directoryEnumerator->HasMoreElements(&hasMore);
 
     if (NS_SUCCEEDED( rv))
     {
-      isFile = PR_FALSE;
+      isFile = false;
       rv = entry->IsFile( &isFile);
       rv = entry->GetLeafName(displayName);
       if (NS_SUCCEEDED( rv) && !displayName.IsEmpty() && isFile)
       {
         if (NS_SUCCEEDED( rv))
         {
           type = 0;
           creator = 0;
--- a/mailnews/import/eudora/src/nsEudoraMailbox.cpp
+++ b/mailnews/import/eudora/src/nsEudoraMailbox.cpp
@@ -212,24 +212,24 @@ nsresult nsEudoraMailbox::CreateTempFile
   return (*ppFile)->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 00600);
 }
 
 nsresult nsEudoraMailbox::DeleteFile( nsIFile *pFile)
 {
   bool      result;
   nsresult  rv = NS_OK;
 
-  result = PR_FALSE;
+  result = false;
   pFile->Exists( &result);
   if (result) {
-    result = PR_FALSE;
+    result = false;
     pFile->IsFile( &result);
     if (result) {
 #ifndef DONT_DELETE_EUDORA_TEMP_FILES
-        rv = pFile->Remove(PR_FALSE);
+        rv = pFile->Remove(false);
 #endif
     }
   }
   return( rv);
 }
 
 
 #define kComposeErrorStr  "X-Eudora-Compose-Error: *****" "\x0D\x0A"
@@ -257,33 +257,33 @@ nsresult nsEudoraMailbox::ImportMailbox(
 
   NS_ADDREF( pSrc);
 
   // First, get the index file for this mailbox
   rv = FindTOCFile( pSrc, getter_AddRefs( tocFile), &deleteToc);
   if (NS_SUCCEEDED( rv) && tocFile)
         {
     IMPORT_LOG0( "Reading euroda toc file: ");
-    DUMP_FILENAME( tocFile, PR_TRUE);
+    DUMP_FILENAME( tocFile, true);
 
                 rv = MsgNewBufferedFileOutputStream(getter_AddRefs(mailOutputStream), pDst);
                 NS_ENSURE_SUCCESS(rv, rv);
     // Read the toc and import the messages
     rv = ImportMailboxUsingTOC( pBytes, pAbort, srcInputStream, tocFile, mailOutputStream, pMsgCount);
 
     // clean up
     if (deleteToc)
       DeleteFile( tocFile);
 
     // If we were able to import with the TOC, then we don't need to bother
     // importing without the TOC.
     if ( NS_SUCCEEDED(rv) ) {
-      importWithoutToc = PR_FALSE;
-      IMPORT_LOG0( "Imported mailbox: "); DUMP_FILENAME( pSrc, PR_FALSE);
-      IMPORT_LOG0( "  Using TOC: "); DUMP_FILENAME(tocFile, PR_TRUE);
+      importWithoutToc = false;
+      IMPORT_LOG0( "Imported mailbox: "); DUMP_FILENAME( pSrc, false);
+      IMPORT_LOG0( "  Using TOC: "); DUMP_FILENAME(tocFile, true);
     }
     else {
       IMPORT_LOG0( "*** Error importing with TOC - will import without TOC.\n");
     }
   }
 
   // pSrc must be Released before returning
 
@@ -296,18 +296,18 @@ nsresult nsEudoraMailbox::ImportMailbox(
 
     rv = pSrc->GetFileSize( &m_mailSize);
 
     SimpleBufferTonyRCopiedOnce    readBuffer;
     SimpleBufferTonyRCopiedOnce    headers;
     SimpleBufferTonyRCopiedOnce    body;
     SimpleBufferTonyRCopiedOnce    copy;
 
-    headers.m_convertCRs = PR_TRUE;
-    body.m_convertCRs = PR_TRUE;
+    headers.m_convertCRs = true;
+    body.m_convertCRs = true;
 
     copy.Allocate( kCopyBufferSize);
     readBuffer.Allocate( kMailReadBufferSize);
     ReadFileState      state;
     state.offset = 0;
     state.size = m_mailSize;
     state.pFile = pSrc;
 
@@ -382,17 +382,17 @@ nsresult nsEudoraMailbox::ImportMailboxU
   SimpleBufferTonyRCopiedOnce copy;
   PRInt32 tocOffset = kMsgFirstOffset;
   EudoraTOCEntry tocEntry;
 
   copy.Allocate( kCopyBufferSize);
   readBuffer.Allocate(kMailReadBufferSize);
 
   IMPORT_LOG0( "Importing mailbox using TOC: ");
-  DUMP_FILENAME( tocFile, PR_TRUE);
+  DUMP_FILENAME( tocFile, true);
 
   nsCOMPtr <nsISeekableStream> tocSeekableStream = do_QueryInterface(tocInputStream);
   nsCOMPtr <nsISeekableStream> mailboxSeekableStream = do_QueryInterface(pInputStream);
   while (!*pAbort && (tocOffset < (PRInt32)tocSize)) {
     if ( NS_FAILED(rv = tocSeekableStream->Seek(nsISeekableStream::NS_SEEK_SET, tocOffset)) )
       break;
 
     if ( NS_FAILED(rv = ReadTOCEntry(tocInputStream, tocEntry)) )
@@ -434,17 +434,17 @@ nsresult nsEudoraMailbox::ImportMailboxU
   if ( NS_SUCCEEDED(rv) ) {
     IMPORT_LOG0( " finished\n");
   }
   else {
     // We failed somewhere important enough that we kept the error.
     // Bail on all that we imported since we'll be importing everything
     // again using just the mailbox.
     IMPORT_LOG0( "*** Error importing mailbox using TOC: ");
-//    DUMP_FILENAME(pMail, PR_TRUE);
+//    DUMP_FILENAME(pMail, true);
 
     // Reset pBytes back to where it was before we imported this mailbox.
     // This will likely result in a funky progress bar which will move
     // backwards, but that's probably the best we can do to keep the
     // progress accurate since we'll be re-importing the same mailbox.
     if (pBytes)
       *pBytes = saveBytes;
 
@@ -512,22 +512,22 @@ nsresult nsEudoraMailbox::ReadTOCEntry(n
   READ_TOC_FIELD(tocEntry.m_nMood);
 
   // Get the junk score byte
   READ_TOC_FIELD(cJunkInfo);
   if (cJunkInfo & 0x80)
   {
     // If the high bit is set note that this message was manually junked
     // and unset the high bit.
-    tocEntry.m_bManuallyJunked = PR_TRUE;
+    tocEntry.m_bManuallyJunked = true;
     cJunkInfo &= 0x7F;
   }
   else
   {
-    tocEntry.m_bManuallyJunked = PR_FALSE;
+    tocEntry.m_bManuallyJunked = false;
   }
   tocEntry.m_ucJunkScore = cJunkInfo;
 
   READ_TOC_FIELD(ulJunkPluginID);
 #endif
 
   return NS_OK;
 }
@@ -559,17 +559,17 @@ nsresult nsEudoraMailbox::ImportMessage(
         nsCOMPtr <nsIFile> compositionFile;
   rv = compose.SendTheMessage(m_mailImportLocation, getter_AddRefs(compositionFile));
   if (NS_SUCCEEDED( rv)) {
     nsCString            fromLine(eudoraFromLine);
     SimpleBufferTonyRCopiedOnce    copy;
 
     copy.Allocate( kCopyBufferSize);
 
-    /* IMPORT_LOG0( "Composed message in file: "); DUMP_FILENAME( compositionFile, PR_TRUE); */
+    /* IMPORT_LOG0( "Composed message in file: "); DUMP_FILENAME( compositionFile, true); */
     // copy the resulting file into the destination file!
     rv = compose.CopyComposedMessage( fromLine, compositionFile, pDst, copy);
     DeleteFile(compositionFile);
     if (NS_FAILED( rv)) {
       IMPORT_LOG0( "*** Error copying composed message to destination mailbox\n");
     }
     if (pMsgCount)
       (*pMsgCount)++;
@@ -929,22 +929,22 @@ static const char *TagContentType[] = {
   // Determine if this line contains an eudora special tag
 bool    nsEudoraMailbox::IsEudoraTag( const char *pChar, PRInt32 maxLen, bool &insideEudoraTags, nsCString &bodyType, PRInt32 &tagLength)
 {
   PRInt32  idx = 0;
   while ((tagLength = eudoraTagLen[idx]) != 0) {
     if (maxLen >= tagLength && !strncmp( eudoraTag[idx], pChar, tagLength)) {
       insideEudoraTags = (pChar[1] != '/');
       bodyType = TagContentType[idx];
-      return PR_TRUE;
+      return true;
     }
     idx++;
   }
 
-  return PR_FALSE;
+  return false;
 }
 
   // Determine if this line meets Eudora standards for a separator line
   // This logic is based on Eudora 1.3.1's strict requirements for what
   // makes a valid separator line.  This may need to be relaxed for newer
   // versions of Eudora.
   // A sample from line:
   // From john@uxc.cso.uiuc.edu Wed Jan 14 12:36:18 1989
@@ -1053,22 +1053,22 @@ PRInt32  nsEudoraMailbox::IsEudoraFromSe
       else if ((tokLen == 3) && ((result = IsMonthStr( pTok)) != 0)) {
         if (month)
           return( -1);
         month = result;
       }
       else if ((tokLen == 6) && !PL_strncasecmp( pTok, "remote", 6)) {
         if (remote || from)
           return( -1);
-        remote = PR_TRUE;
+        remote = true;
       }
       else if ((tokLen == 4) && !PL_strncasecmp( pTok, "from", 4)) {
         if (!remote || from)
           return( -1);
-        from = PR_TRUE;
+        from = true;
       }
       else if ((tokLen == 4) && ((num > 1900) || !strncmp( pTok, "0000", 4))) {
         if (year)
           return( -1);
         year = (int)num;
         if (!year)
           year = 1900;
       }
@@ -1091,17 +1091,17 @@ PRInt32  nsEudoraMailbox::IsEudoraFromSe
             if ((pTok[result] < '0') || (pTok[result] > '9')) {
               break;
             }
           }
         }
         if (result == tokLen) {
           if (tym)
             return( -1);
-          tym = PR_TRUE;
+          tym = true;
           // for future use, get the time value
           memcpy( tymStr, pTok, tokLen);
           if (tokLen == 5) {
             tymStr[5] = ':';
             tymStr[6] = '0';
             tymStr[7] = '0';
           }
           tymStr[8] = 0;
@@ -1308,31 +1308,31 @@ nsresult nsEudoraMailbox::ExamineAttachm
 
 bool nsEudoraMailbox::AddAttachment( nsCString& fileName)
 {
   IMPORT_LOG1( "Found attachment: %s\n", fileName.get());
 
   nsresult rv;
   nsCOMPtr <nsILocalFile>  pFile = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
   if (NS_FAILED( rv))
-    return( PR_FALSE);
+    return( false);
 
   nsCString mimeType;
   nsCString attachmentName;
   if (NS_FAILED( GetAttachmentInfo( fileName.get(), pFile, mimeType, attachmentName)))
-    return( PR_FALSE);
+    return( false);
 
   ImportAttachment *a = new ImportAttachment;
   a->mimeType = ToNewCString(mimeType);
   a->description = !attachmentName.IsEmpty() ? ToNewCString(attachmentName) : strdup( "Attached File");
   a->pAttachment = pFile;
 
   m_attachments.AppendElement( a);
 
-  return( PR_TRUE);
+  return( true);
 }
 
 nsresult nsEudoraMailbox::FillMailBuffer( ReadFileState *pState, SimpleBufferTonyRCopiedOnce& read)
 {
   if (read.m_writeOffset >= read.m_bytesInBuf) {
     read.m_writeOffset = 0;
     read.m_bytesInBuf = 0;
   }
--- a/mailnews/import/eudora/src/nsEudoraSettings.cpp
+++ b/mailnews/import/eudora/src/nsEudoraSettings.cpp
@@ -85,17 +85,17 @@ NS_IMETHODIMP nsEudoraSettings::AutoLoca
 {
     NS_PRECONDITION(description != nsnull, "null ptr");
     NS_PRECONDITION(_retval != nsnull, "null ptr");
     NS_PRECONDITION(location != nsnull, "null ptr");
   if (!description || !_retval || !location)
     return( NS_ERROR_NULL_POINTER);
 
   *description = nsnull;
-  *_retval = PR_FALSE;
+  *_retval = false;
 
   nsresult  rv;
         m_pLocation =  do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv);
         NS_ENSURE_SUCCESS(rv, rv);
   *description = nsEudoraStringBundle::GetStringByID( EUDORAIMPORT_NAME);
 
 #if defined(XP_WIN) || defined(XP_OS2)
   *_retval = nsEudoraWin32::FindSettingsFile( getter_AddRefs(m_pLocation));
@@ -110,17 +110,17 @@ NS_IMETHODIMP nsEudoraSettings::SetLocat
   m_pLocation = location;
   return( NS_OK);
 }
 
 NS_IMETHODIMP nsEudoraSettings::Import(nsIMsgAccount **localMailAccount, bool *_retval)
 {
   NS_PRECONDITION( _retval != nsnull, "null ptr");
 
-  *_retval = PR_FALSE;
+  *_retval = false;
 
   // Get the settings file if it doesn't exist
   if (!m_pLocation) {
 #if defined(XP_WIN) || defined(XP_OS2)
     nsresult  rv;
                 m_pLocation =  do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv);
     if (NS_SUCCEEDED(rv)) {
       if (!nsEudoraWin32::FindSettingsFile(getter_AddRefs(m_pLocation))) {
--- a/mailnews/import/eudora/src/nsEudoraWin32.cpp
+++ b/mailnews/import/eudora/src/nsEudoraWin32.cpp
@@ -300,33 +300,33 @@ nsresult nsEudoraWin32::IterateMailDir( 
         else
         {
           ext.Truncate();
           name = fName;
         }
         ToLowerCase(ext);
         if (ext.EqualsLiteral(".fol"))
         {
-          isFolder = PR_FALSE;
+          isFolder = false;
           entry->IsDirectory( &isFolder);
           if (isFolder)
           {
             // add the folder
             rv = FoundMailFolder( entry, name.get(), pArray, pImport);
             if (NS_SUCCEEDED( rv))
             {
               rv = ScanMailDir( entry, pArray, pImport);
               if (NS_FAILED( rv))
                 IMPORT_LOG0( "*** Error scanning mail directory\n");
             }
           }
         }
         else if (ext.EqualsLiteral(".mbx"))
         {
-          isFile = PR_FALSE;
+          isFile = false;
           entry->IsFile( &isFile);
           if (isFile)
             rv = FoundMailbox( entry, name.get(), pArray, pImport);
         }
       }
     }
   }
   return( rv);
@@ -423,32 +423,32 @@ nsresult nsEudoraWin32::ScanDescmap( nsI
 
     if (!fName.IsEmpty() && !name.IsEmpty() && (type.Length() == 1))
     {
       rv = entry->SetNativeLeafName(fName);
       if (NS_SUCCEEDED( rv))
       {
         if (type.CharAt( 0) == 'F')
         {
-          isFolder = PR_FALSE;
+          isFolder = false;
           entry->IsDirectory( &isFolder);
           if (isFolder)
           {
             rv = FoundMailFolder( entry, name.get(), pArray, pImport);
             if (NS_SUCCEEDED( rv))
             {
               rv = ScanMailDir( entry, pArray, pImport);
               if (NS_FAILED( rv))
                 IMPORT_LOG0( "*** Error scanning mail directory\n");
             }
           }
         }
         else if ((type.CharAt( 0) == 'M') || (type.CharAt( 0) == 'S'))
         {
-          isFile = PR_FALSE;
+          isFile = false;
           entry->IsFile( &isFile);
           if (isFile)
             FoundMailbox( entry, name.get(), pArray, pImport);
         }
       }
     }
   }
 
@@ -539,17 +539,17 @@ nsresult nsEudoraWin32::FoundMailFolder(
 }
 
 
 nsresult nsEudoraWin32::FindTOCFile( nsIFile *pMailFile, nsIFile **ppTOCFile, bool *pDeleteToc)
 {
   nsresult    rv;
   nsCAutoString  leaf;
 
-  *pDeleteToc = PR_FALSE;
+  *pDeleteToc = false;
   *ppTOCFile = nsnull;
   rv = pMailFile->GetNativeLeafName(leaf);
   if (NS_FAILED( rv))
     return( rv);
   rv = pMailFile->GetParent( ppTOCFile);
   if (NS_FAILED( rv))
     return( rv);
 
@@ -583,26 +583,26 @@ bool nsEudoraWin32::ImportSettings( nsIF
   bool      result = false;
   nsresult  rv;
 
   nsCOMPtr<nsIMsgAccountManager> accMgr =
            do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
   if (NS_FAILED(rv))
   {
     IMPORT_LOG0( "*** Failed to create a account manager!\n");
-    return( PR_FALSE);
+    return( false);
   }
 
   // Eudora info is arranged by key, 1 for the default, then persona's for additional
   // accounts.
   // Start with the first one, then do each persona
   nsCString iniPath;
   pIniFile->GetNativePath(iniPath);
   if (iniPath.IsEmpty())
-    return( PR_FALSE);
+    return( false);
   UINT       valInt;
   SimpleBufferTonyRCopiedOnce  section;
   DWORD      sSize;
   DWORD      sOffset = 0;
   DWORD      start;
   nsCString  sectionName("Settings");
   int        popCount = 0;
   int        accounts = 0;
@@ -698,77 +698,77 @@ bool nsEudoraWin32::FindFiltersFile( nsI
   }
 
   return result;
 }
 
 bool nsEudoraWin32::GetMailboxNameHierarchy( const nsACString& pEudoraLocation, const char* pEudoraFilePath, nsCString& nameHierarchy)
 {
   if (pEudoraLocation.IsEmpty() || !pEudoraFilePath || !*pEudoraFilePath)
-    return PR_FALSE;
+    return false;
 
   nsresult rv;
   nsCOMPtr <nsILocalFile> descMap = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID);
 
   rv = descMap->InitWithNativePath(pEudoraLocation);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
   rv = descMap->AppendNative(NS_LITERAL_CSTRING("descmap.pce"));
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   nsCOMPtr <nsIInputStream> inputStream;
   rv = NS_NewLocalFileInputStream(getter_AddRefs(inputStream), descMap);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   nsCOMPtr<nsILineInputStream> lineStream(do_QueryInterface(inputStream, &rv));
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   PRInt32 pathLength;
   const char* backslash = strchr(pEudoraFilePath, '\\');
   if (backslash)
     pathLength = backslash - pEudoraFilePath;
   else
     pathLength = strlen(pEudoraFilePath);
 
   bool more = true;
   nsCAutoString buf;
   while (more)
   {
     rv = lineStream->ReadLine(buf, &more);
-    NS_ENSURE_SUCCESS(rv, PR_FALSE);
+    NS_ENSURE_SUCCESS(rv, false);
 
     PRInt32 iNameEnd = buf.FindChar(',');
     if (iNameEnd < 0)
       continue;
     const nsACString& name = Substring(buf, 0, iNameEnd);
     PRInt32 iPathEnd = buf.FindChar(',', iNameEnd + 1);
     if (iPathEnd < 0)
       continue;
     const nsACString& path = Substring(buf, iNameEnd + 1, iPathEnd - iNameEnd - 1);
     const char type = buf[iPathEnd + 1];
     if (strnicmp(path.BeginReading(), pEudoraFilePath, pathLength) == 0 && path.Length() == pathLength)
     {
       nameHierarchy += "\\";
       nameHierarchy += name;
       if (pEudoraFilePath[pathLength] == 0)
-        return PR_TRUE;
+        return true;
       if (type != 'F')
       {
         // Something went wrong.  We've matched a mailbox, but the
         // hierarchical name says we've got more folders to traverse.
-        return PR_FALSE;
+        return false;
       }
 
       nsCString newLocation(pEudoraLocation);
       newLocation += '\\';
       newLocation += path;
       return GetMailboxNameHierarchy(newLocation, pEudoraFilePath + pathLength + 1, nameHierarchy);
     }
   }
 
-  return PR_FALSE;
+  return false;
 }
 
 // maximium size of settings strings
 #define  kIniValueSize    384
 
 
 void nsEudoraWin32::GetServerAndUserName( const char *pSection, const char *pIni, nsCString& serverName, nsCString& userName, char *pBuff)
 {
@@ -836,17 +836,17 @@ bool nsEudoraWin32::BuildPOPAccount( nsI
 
   char valBuff[kIniValueSize];
   nsCString serverName;
   nsCString userName;
 
   GetServerAndUserName( pSection, pIni, serverName, userName, valBuff);
 
   if (serverName.IsEmpty() || userName.IsEmpty())
-    return( PR_FALSE);
+    return( false);
 
   bool result = false;
 
   // I now have a user name/server name pair, find out if it already exists?
   nsCOMPtr<nsIMsgIncomingServer> in;
   nsresult rv = accMgr->FindServer( userName, serverName, NS_LITERAL_CSTRING("pop3"), getter_AddRefs(in));
   if (NS_FAILED(rv) || !in)
   {
@@ -872,42 +872,42 @@ bool nsEudoraWin32::BuildPOPAccount( nsI
       {
         rv = account->SetIncomingServer( in);
 
         IMPORT_LOG0( "Created a new account and set the incoming server to the POP3 server.\n");
 
         nsCOMPtr<nsIPop3IncomingServer> pop3Server = do_QueryInterface(in, &rv);
         NS_ENSURE_SUCCESS(rv,rv);
         UINT valInt = ::GetPrivateProfileInt(pSection, "LeaveMailOnServer", 0, pIni);
-        pop3Server->SetLeaveMessagesOnServer(valInt ? PR_TRUE : PR_FALSE);
+        pop3Server->SetLeaveMessagesOnServer(valInt ? true : false);
 
         // Fiddle with the identities
         SetIdentities(accMgr, account, pSection, pIni, userName.get(), serverName.get(), valBuff);
-        result = PR_TRUE;
+        result = true;
         if (ppAccount)
           account->QueryInterface( NS_GET_IID(nsIMsgAccount), (void **)ppAccount);
       }
     }
   }
   else
-    result = PR_TRUE;
+    result = true;
 
   return( result);
 }
 
 bool nsEudoraWin32::BuildIMAPAccount( nsIMsgAccountManager *accMgr, const char *pSection, const char *pIni, nsIMsgAccount **ppAccount)
 {
   char valBuff[kIniValueSize];
   nsCString serverName;
   nsCString userName;
 
   GetServerAndUserName( pSection, pIni, serverName, userName, valBuff);
 
   if (serverName.IsEmpty() || userName.IsEmpty())
-    return( PR_FALSE);
+    return( false);
 
   bool result = false;
 
   nsCOMPtr<nsIMsgIncomingServer> in;
   nsresult rv = accMgr->FindServer( userName, serverName, NS_LITERAL_CSTRING("imap"), getter_AddRefs(in));
   if (NS_FAILED( rv) || (in == nsnull))
   {
     // Create the incoming server and an account for it?
@@ -931,24 +931,24 @@ bool nsEudoraWin32::BuildIMAPAccount( ns
       if (NS_SUCCEEDED( rv) && account)
       {
         rv = account->SetIncomingServer(in);
 
         IMPORT_LOG0( "Created an account and set the IMAP server as the incoming server\n");
 
         // Fiddle with the identities
         SetIdentities(accMgr, account, pSection, pIni, userName.get(), serverName.get(), valBuff);
-        result = PR_TRUE;
+        result = true;
         if (ppAccount)
           account->QueryInterface( NS_GET_IID(nsIMsgAccount), (void **)ppAccount);
       }
     }
   }
   else
-    result = PR_TRUE;
+    result = true;
 
   return( result);
 }
 
 void nsEudoraWin32::SetIdentities(nsIMsgAccountManager *accMgr, nsIMsgAccount *acc, const char *pSection, const char *pIniFile, const char *userName, const char *serverName, char *pBuff)
 {
   nsCAutoString realName;
   nsCAutoString email;
@@ -1156,33 +1156,33 @@ bool nsEudoraWin32::FindMimeIniFile( nsI
         else
         {
           ext.Truncate();
           name = fName;
         }
         ToLowerCase(ext);
         if (ext.EqualsLiteral(".ini"))
         {
-          isFile = PR_FALSE;
+          isFile = false;
           entry->IsFile( &isFile);
           if (isFile)
           {
             if (found)
             {
               // which one of these files is newer?
               PRInt64  modDate1, modDate2;
               entry->GetLastModifiedTime( &modDate2);
               pFile->GetLastModifiedTime( &modDate1);
               if (modDate2 > modDate1)
                                   pLocalFile->InitWithFile( entry);
             }
             else
             {
               pLocalFile->InitWithFile( entry);
-              found = PR_TRUE;
+              found = true;
             }
           }
         }
       }
     }
   }
   return found;
 }
@@ -1383,49 +1383,49 @@ nsresult nsEudoraWin32::FindAddressBooks
     // Stop if we already checked the second default name possibility or
     // if we found the default address book name.
     if (checkedBoth || (exists && isFile))
       break;
 
     // Check for alternate file extension ".nnt" which Windows Eudora uses as an option
     // to hide from simple minded viruses that scan ".txt" files for addresses.
     rv = file->SetNativeLeafName(NS_LITERAL_CSTRING("nndbase.nnt"));
-    checkedBoth = PR_TRUE;
+    checkedBoth = true;
   } while (NS_SUCCEEDED(rv));
 
   if (exists && isFile)
   {
     if (NS_FAILED( rv = FoundAddressBook( file, displayName.get(), *ppArray, impSvc)))
       return( rv);
   }
 
   // Try the default directory
   rv =   rv = file->InitWithFile( localRoot);
   if (NS_FAILED( rv))
     return( rv);
   rv = file->AppendNative(NS_LITERAL_CSTRING("Nickname"));
   bool isDir = false;
-  exists = PR_FALSE;
+  exists = false;
   if (NS_SUCCEEDED( rv))
     rv = file->Exists( &exists);
   if (NS_SUCCEEDED( rv) && exists)
     rv = file->IsDirectory( &isDir);
   if (exists && isDir)
   {
     if (NS_FAILED( rv = ScanAddressDir(file, *ppArray, impSvc)))
       return( rv);
   }
 
   // Try the ini file to find other directories!
   rv =   rv = file->InitWithFile( localRoot);
   if (NS_FAILED( rv))
     return( rv);
   rv = file->AppendNative(NS_LITERAL_CSTRING("eudora.ini"));
-  exists = PR_FALSE;
-  isFile = PR_FALSE;
+  exists = false;
+  isFile = false;
   if (NS_SUCCEEDED( rv))
     rv = file->Exists( &exists);
   if (NS_SUCCEEDED( rv) && exists)
     rv = file->IsFile( &isFile);
 
   if (!isFile || !exists)
   {
     rv = file->InitWithFile( localRoot);
@@ -1455,36 +1455,36 @@ nsresult nsEudoraWin32::FindAddressBooks
   nsCString  currentDir;
   while ((idx = dirs.FindChar( ';')) != -1)
   {
     currentDir = StringHead(dirs, idx);
     currentDir.Trim( kWhitespace);
     if (!currentDir.IsEmpty())
     {
       rv = file->InitWithNativePath(currentDir);
-      exists = PR_FALSE;
-      isDir = PR_FALSE;
+      exists = false;
+      isDir = false;
       if (NS_SUCCEEDED( rv))
         rv = file->Exists( &exists);
       if (NS_SUCCEEDED( rv) && exists)
         rv = file->IsDirectory( &isDir);
       if (exists && isDir)
       {
         if (NS_FAILED( rv = ScanAddressDir(file, *ppArray, impSvc)))
           return( rv);
       }
     }
     dirs = Substring(dirs, idx + 1);
     dirs.Trim( kWhitespace);
   }
   if (!dirs.IsEmpty())
   {
     rv = file->InitWithNativePath(dirs);
-    exists = PR_FALSE;
-    isDir = PR_FALSE;
+    exists = false;
+    isDir = false;
     if (NS_SUCCEEDED( rv))
       rv = file->Exists( &exists);
     if (NS_SUCCEEDED( rv) && exists)
       rv = file->IsDirectory( &isDir);
     if (exists && isDir)
     {
       if (NS_FAILED( rv = ScanAddressDir(file, *ppArray, impSvc)))
         return( rv);
@@ -1534,17 +1534,17 @@ nsresult nsEudoraWin32::ScanAddressDir( 
         else
         {
           ext.Truncate();
           name = fName;
         }
         ToLowerCase(ext);
         if (ext.EqualsLiteral(".txt"))
         {
-          isFile = PR_FALSE;
+          isFile = false;
           entry->IsFile( &isFile);
           if (isFile)
           {
             rv = FoundAddressBook( entry, nsnull, pArray, impSvc);
             if (NS_FAILED( rv))
               return( rv);
           }
         }
--- a/mailnews/import/oexpress/WabObject.cpp
+++ b/mailnews/import/oexpress/WabObject.cpp
@@ -79,26 +79,26 @@ static const SizedSPropTagArray(iemailMa
 typedef struct {
   bool      multiLine;
   ULONG    tag;
   char *    pLDIF;
 } AddrImportField;
 
 #define  kExtraUserFields  10
 AddrImportField    extraUserFields[kExtraUserFields] = {
-  {PR_TRUE, PR_COMMENT, "description:"},
-  {PR_FALSE, PR_BUSINESS_TELEPHONE_NUMBER, "telephonenumber:"},
-  {PR_FALSE, PR_HOME_TELEPHONE_NUMBER, "homephone:"},
-  {PR_FALSE, PR_COMPANY_NAME, "o:"},
-  {PR_FALSE, PR_TITLE, "title:"},
-  {PR_FALSE, PR_BUSINESS_FAX_NUMBER, "facsimiletelephonenumber:"},
-  {PR_FALSE, PR_LOCALITY, "locality:"},
-  {PR_FALSE, PR_STATE_OR_PROVINCE, "st:"},
-  {PR_TRUE, PR_STREET_ADDRESS, "streetaddress:"},
-  {PR_FALSE, PR_POSTAL_CODE, "postalcode:"}
+  {true, PR_COMMENT, "description:"},
+  {false, PR_BUSINESS_TELEPHONE_NUMBER, "telephonenumber:"},
+  {false, PR_HOME_TELEPHONE_NUMBER, "homephone:"},
+  {false, PR_COMPANY_NAME, "o:"},
+  {false, PR_TITLE, "title:"},
+  {false, PR_BUSINESS_FAX_NUMBER, "facsimiletelephonenumber:"},
+  {false, PR_LOCALITY, "locality:"},
+  {false, PR_STATE_OR_PROVINCE, "st:"},
+  {true, PR_STREET_ADDRESS, "streetaddress:"},
+  {false, PR_POSTAL_CODE, "postalcode:"}
 };
 
 #define  kWhitespace  " \t\b\r\n"
 
 #define TR_OUTPUT_EOL  "\r\n"
 
 #define  kLDIFPerson    "objectclass: top" TR_OUTPUT_EOL "objectclass: person" TR_OUTPUT_EOL
 #define kLDIFGroup    "objectclass: top" TR_OUTPUT_EOL "objectclass: groupOfNames" TR_OUTPUT_EOL
@@ -112,17 +112,17 @@ AddrImportField    extraUserFields[kExtr
 //          if no file name is specified, opens the default
 //
 CWAB::CWAB(nsILocalFile *file)
 {
     // Here we load the WAB Object and initialize it
     m_pUniBuff = NULL;
   m_uniBuffLen = 0;
 
-  m_bInitialized = PR_FALSE;
+  m_bInitialized = false;
   m_lpAdrBook = NULL;
   m_lpWABObject = NULL;
   m_hinstWAB = NULL;
 
     {
         TCHAR  szWABDllPath[MAX_PATH];
         DWORD  dwType = 0;
         ULONG  cbData = sizeof(szWABDllPath);
@@ -617,17 +617,17 @@ void CWAB::GetValueString( LPSPropValue 
 
     case PT_BINARY:
     break;
 
     default:
         break;
     }
 
-  val.Trim( kWhitespace, PR_TRUE, PR_TRUE);
+  val.Trim( kWhitespace, true, true);
 }
 
 
 void CWAB::GetValueTime(LPSPropValue pVal, PRTime& val)
 {
   if (!pVal)
     return;
 
--- a/mailnews/import/oexpress/nsOE5File.cpp
+++ b/mailnews/import/oexpress/nsOE5File.cpp
@@ -90,95 +90,95 @@ void nsOE5File::FileTimeToPRTime(const F
 
 bool nsOE5File::VerifyLocalMailFile( nsIFile *pFile)
 {
   char    sig[kSignatureSize];
 
   nsCOMPtr <nsIInputStream> inputStream;
 
   if (NS_FAILED(NS_NewLocalFileInputStream(getter_AddRefs(inputStream), pFile)))
-    return PR_FALSE;
+    return false;
 
   if (!ReadBytes( inputStream, sig, 0, kSignatureSize))
-    return PR_FALSE;
+    return false;
 
   bool    result = true;
 
   for (int i = 0; (i < kSignatureSize) && result; i++) {
     if (sig[i] != gSig[i])
-      result = PR_FALSE;
+      result = false;
   }
 
   char  storeName[14];
   if (!ReadBytes( inputStream, storeName, 0x24C1, 12))
-    result = PR_FALSE;
+    result = false;
 
   storeName[12] = 0;
 
   if (PL_strcasecmp( "LocalStore", storeName))
-    result = PR_FALSE;
+    result = false;
 
   return result;
 }
 
 bool nsOE5File::IsLocalMailFile( nsIFile *pFile)
 {
   nsresult  rv;
   bool      isFile = false;
 
   rv = pFile->IsFile( &isFile);
   if (NS_FAILED( rv) || !isFile)
-    return( PR_FALSE);
+    return( false);
 
   bool result = VerifyLocalMailFile( pFile);
 
   return( result);
 }
 
 bool nsOE5File::ReadIndex( nsIInputStream *pInputStream, PRUint32 **ppIndex, PRUint32 *pSize)
 {
   *ppIndex = nsnull;
   *pSize = 0;
 
   char    signature[4];
   if (!ReadBytes( pInputStream, signature, 0, 4))
-    return( PR_FALSE);
+    return( false);
 
   for (int i = 0; i < 4; i++) {
     if (signature[i] != gSig[i]) {
       IMPORT_LOG0( "*** Outlook 5.0 dbx file signature doesn't match\n");
-      return( PR_FALSE);
+      return( false);
     }
   }
 
   PRUint32  offset = 0x00e4;
   PRUint32  indexStart = 0;
   if (!ReadBytes( pInputStream, &indexStart, offset, 4)) {
     IMPORT_LOG0( "*** Unable to read offset to index start\n");
-    return( PR_FALSE);
+    return( false);
   }
 
   PRUint32Array array;
   array.count = 0;
   array.alloc = kIndexGrowBy;
   array.pIndex = new PRUint32[kIndexGrowBy];
 
   PRUint32 next = ReadMsgIndex( pInputStream, indexStart, &array);
   while (next) {
     next = ReadMsgIndex( pInputStream, next, &array);
   }
 
   if (array.count) {
     *pSize = array.count;
     *ppIndex = array.pIndex;
-    return( PR_TRUE);
+    return( true);
   }
 
   delete [] array.pIndex;
-  return( PR_FALSE);
+  return( false);
 }
 
 
 PRUint32 nsOE5File::ReadMsgIndex( nsIInputStream *pInputStream, PRUint32 offset, PRUint32Array *pArray)
 {
   // Record is:
     // 4 byte marker
     // 4 byte unknown
@@ -488,26 +488,26 @@ nsresult nsOE5File::ImportMailbox( PRUin
       if (pCount)
         *pCount = msgCount;
       if (pBytesDone)
         *pBytesDone = didBytes;
     }
     else {
       // Error reading message, should this be logged???
       IMPORT_LOG2( "Error reading message from %s at 0x%lx\n", NS_LossyConvertUTF16toASCII(name.get()), pIndex[i]);
-      *pAbort = PR_TRUE;
+      *pAbort = true;
     }
   }
 
   delete [] pBuffer;
   delete [] pFlags;
   delete [] pTime;
 
   if (NS_FAILED(rv))
-    *pAbort = PR_TRUE;
+    *pAbort = true;
 
   return( rv);
 }
 
 
 /*
   A message index record consists of:
   4 byte marker - matches record offset
@@ -620,21 +620,21 @@ void nsOE5File::ConvertIndex( nsIInputSt
 bool nsOE5File::ReadBytes( nsIInputStream *stream, void *pBuffer, PRUint32 offset, PRUint32 bytes)
 {
   nsresult  rv;
 
   nsCOMPtr <nsISeekableStream> seekableStream = do_QueryInterface(stream);
   if (offset != kDontSeek) {
     rv = seekableStream->Seek(nsISeekableStream::NS_SEEK_SET, offset);
     if (NS_FAILED( rv))
-      return( PR_FALSE);
+      return( false);
   }
 
   if (!bytes)
-    return( PR_TRUE);
+    return( true);
 
   PRUint32  cntRead;
   char *  pReadTo = (char *)pBuffer;
   rv = stream->Read(pReadTo, bytes, &cntRead);
   return NS_SUCCEEDED(rv) && cntRead == bytes;
 
 }
 
--- a/mailnews/import/oexpress/nsOEAddressIterator.cpp
+++ b/mailnews/import/oexpress/nsOEAddressIterator.cpp
@@ -236,17 +236,17 @@ nsresult nsOEAddressIterator::EnumList( 
             nsCOMPtr <nsIAbCard> userCard;
             nsCOMPtr <nsIAbCard> newCard;
             userCard = do_CreateInstance(NS_ABMDBCARD_CONTRACTID, &rv);
             NS_ENSURE_SUCCESS(rv, rv);
             m_database->InitCardFromRow(userCard,cardRow);
 
             m_database->AddListCardColumnsToRow(userCard, listRow, ++numListElems,
                                                 getter_AddRefs(newCard),
-                                                PR_TRUE, nsnull, nsnull);
+                                                true, nsnull, nsnull);
           }
     m_pWab->FreeProperty( pProp);
           m_pWab->ReleaseUser( pUser);
         }
       }
       m_pWab->FreeProws(lpRowAB );    
     }
   } while (SUCCEEDED(hr) && cNumRows && lpRowAB);
@@ -426,10 +426,10 @@ bool nsOEAddressIterator::BuildCard( con
           }
         }
       }
       // call fieldMap SetFieldValue based on the table of fields
       
       NS_RELEASE( pFieldMap);
     }
   }
-  return( PR_TRUE);
+  return( true);
 }
--- a/mailnews/import/oexpress/nsOEImport.cpp
+++ b/mailnews/import/oexpress/nsOEImport.cpp
@@ -221,17 +221,17 @@ NS_IMETHODIMP nsOEImport::GetSupports( c
 
 
 NS_IMETHODIMP nsOEImport::GetSupportsUpgrade( bool *pUpgrade)
 {
   NS_PRECONDITION(pUpgrade != nsnull, "null ptr");
   if (! pUpgrade)
     return NS_ERROR_NULL_POINTER;
 
-  *pUpgrade = PR_TRUE;
+  *pUpgrade = true;
   return( NS_OK);
 }
 
 NS_IMETHODIMP nsOEImport::GetImportInterface( const char *pImportType, nsISupports **ppInterface)
 {
   NS_ENSURE_ARG_POINTER(pImportType);
   NS_ENSURE_ARG_POINTER(ppInterface);
 
@@ -342,24 +342,24 @@ NS_IMETHODIMP ImportOEMailImpl::GetDefau
 
   // use scanboxes to find the location.
   nsresult rv;
   nsCOMPtr <nsILocalFile> file = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
   if (NS_FAILED(rv))
     return rv;
 
   if (nsOEScanBoxes::FindMail(file)) {
-    *found = PR_TRUE;
+    *found = true;
     NS_IF_ADDREF(*ppLoc = file);
   }
   else {
-    *found = PR_FALSE;
+    *found = false;
     *ppLoc = nsnull;
   }
-  *userVerify = PR_TRUE;
+  *userVerify = true;
   return( NS_OK);
 }
 
 
 NS_IMETHODIMP ImportOEMailImpl::FindMailboxes( nsIFile *pLoc, nsISupportsArray **ppArray)
 {
     NS_PRECONDITION(pLoc != nsnull, "null ptr");
     NS_PRECONDITION(ppArray != nsnull, "null ptr");
@@ -430,17 +430,17 @@ NS_IMETHODIMP ImportOEMailImpl::ImportMa
   NS_PRECONDITION(pDestination != nsnull, "null ptr");
   NS_PRECONDITION(fatalError != nsnull, "null ptr");
 
   nsString success;
   nsString error;
   if (!pSource || !pDestination || !fatalError) {
     nsOEStringBundle::GetStringByID( OEIMPORT_MAILBOX_BADPARAM, error);
     if (fatalError)
-      *fatalError = PR_TRUE;
+      *fatalError = true;
     SetLogs( success, error, pErrorLog, pSuccessLog);
     return NS_ERROR_NULL_POINTER;
   }
 
   bool abort = false;
   nsString name;
   nsString pName;
   if (NS_SUCCEEDED( pSource->GetDisplayName( getter_Copies(pName))))
@@ -524,17 +524,17 @@ NS_IMPL_THREADSAFE_ISUPPORTS1(ImportOEAd
 
 NS_IMETHODIMP ImportOEAddressImpl::GetAutoFind(PRUnichar **description, bool *_retval)
 {
   NS_PRECONDITION(description != nsnull, "null ptr");
   NS_PRECONDITION(_retval != nsnull, "null ptr");
   if (! description || !_retval)
     return NS_ERROR_NULL_POINTER;
 
-  *_retval = PR_TRUE;
+  *_retval = true;
   nsString str;
   str.Append(nsOEStringBundle::GetStringByID(OEIMPORT_AUTOFIND));
   *description = ToNewUnicode(str);
   return( NS_OK);
 }
 
 
 
@@ -611,17 +611,17 @@ NS_IMETHODIMP ImportOEAddressImpl::Impor
   IMPORT_LOG0( "IMPORTING OUTLOOK EXPRESS ADDRESS BOOK\n");
 
   nsString success;
   nsString error;
   if (!source || !destination || !fatalError)
   {
     nsOEStringBundle::GetStringByID( OEIMPORT_ADDRESS_BADPARAM, error);
     if (fatalError)
-      *fatalError = PR_TRUE;
+      *fatalError = true;
     ImportOEMailImpl::SetLogs( success, error, errorLog, successLog);
     return NS_ERROR_NULL_POINTER;
   }
 
   m_doneSoFar = 0;
   nsOEAddressIterator * pIter = new nsOEAddressIterator( m_pWab, destination);
   HRESULT hr = m_pWab->IterateWABContents( pIter, &m_doneSoFar);
   delete pIter;
--- a/mailnews/import/oexpress/nsOEMailbox.cpp
+++ b/mailnews/import/oexpress/nsOEMailbox.cpp
@@ -119,27 +119,27 @@ bool CImportMailbox::ImportMailbox( PRUi
   bool    done = false;
   nsresult rv;
   nsCOMPtr <nsILocalFile> localInFile = do_QueryInterface(inFile, &rv);
   nsCOMPtr <nsILocalFile> idxFile = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
   if (NS_SUCCEEDED(rv))
     rv  = idxFile->InitWithFile(localInFile);
   if (NS_FAILED(rv)) {
     IMPORT_LOG0( "New file spec failed!\n");
-    return( PR_FALSE);
+    return( false);
   }
 
   if (GetIndexFile(idxFile)) {
 
     IMPORT_LOG1( "Using index file for: %S\n", name.get());
 
     CIndexScanner *pIdxScanner = new CIndexScanner( name, idxFile, inFile, outFile);
     if (pIdxScanner->Initialize()) {
       if (pIdxScanner->DoWork( pAbort, pDone, pCount)) {
-        done = PR_TRUE;
+        done = true;
       }
       else {
         IMPORT_LOG0( "CIndexScanner::DoWork() failed\n");
       }
     }
     else {
       IMPORT_LOG0( "CIndexScanner::Initialize() failed\n");
     }
@@ -152,17 +152,17 @@ bool CImportMailbox::ImportMailbox( PRUi
 
     /*
     something went wrong with the index file, just scan the mailbox
     file itself.
   */
   CMbxScanner *pMbx = new CMbxScanner( name, inFile, outFile);
   if (pMbx->Initialize()) {
     if (pMbx->DoWork( pAbort, pDone, pCount)) {
-      done = PR_TRUE;
+      done = true;
     }
     else {
       IMPORT_LOG0( "CMbxScanner::DoWork() failed\n");
     }
   }
   else {
     IMPORT_LOG0( "CMbxScanner::Initialize() failed\n");
   }
@@ -171,20 +171,20 @@ bool CImportMailbox::ImportMailbox( PRUi
   return( done);
 }
 
 
 bool CImportMailbox::GetIndexFile( nsIFile* file)
 {
   nsCString pLeaf;
   if (NS_FAILED( file->GetNativeLeafName(pLeaf)))
-    return( PR_FALSE);
+    return( false);
   PRInt32  len = pLeaf.Length();
   if (len < 5)
-    return( PR_FALSE);
+    return( false);
 
   pLeaf.Replace(len - 3, 3, NS_LITERAL_CSTRING("idx"));
 
   IMPORT_LOG1( "Looking for index leaf name: %s\n", pLeaf);
 
   nsresult  rv;
   rv = file->SetNativeLeafName( pLeaf);
 
@@ -206,17 +206,17 @@ CMbxScanner::CMbxScanner( nsString& name
 {
   m_msgCount = 0;
   m_name = name;
   m_mbxFile = mbxFile;
   m_dstFile = dstFile;
   m_pInBuffer = nsnull;
   m_pOutBuffer = nsnull;
   m_bufSz = 0;
-  m_fatalError = PR_FALSE;
+  m_fatalError = false;
   m_didBytes = 0;
   m_mbxFileSize = 0;
   m_mbxOffset = 0;
 }
 
 CMbxScanner::~CMbxScanner()
 {
   CleanUp();
@@ -233,62 +233,62 @@ void CMbxScanner::ReportReadError( nsIFi
 }
 
 bool CMbxScanner::Initialize( void)
 {
   m_bufSz = (kBufferKB * 1024);
   m_pInBuffer = new PRUint8[m_bufSz];
   m_pOutBuffer = new PRUint8[m_bufSz];
   if (!m_pInBuffer || !m_pOutBuffer) {
-    return( PR_FALSE);
+    return( false);
   }
 
   m_mbxFile->GetFileSize( &m_mbxFileSize);
   // open the mailbox file...
   if (NS_FAILED( NS_NewLocalFileInputStream(getter_AddRefs(m_mbxFileInputStream), m_mbxFile))) {
     CleanUp();
-    return( PR_FALSE);
+    return( false);
   }
 
   if (NS_FAILED(MsgNewBufferedFileOutputStream(getter_AddRefs(m_dstFileOutputStream), m_dstFile, -1, 0600))) {
     CleanUp();
-    return( PR_FALSE);
+    return( false);
   }
 
-  return( PR_TRUE);
+  return( true);
 }
 
 
 #define  kMbxHeaderSize    0x0054
 #define kMbxMessageHeaderSz  16
 
 bool CMbxScanner::DoWork( bool *pAbort, PRUint32 *pDone, PRUint32 *pCount)
 {
   m_mbxOffset = kMbxHeaderSize;
   m_didBytes = kMbxHeaderSize;
 
   while (!(*pAbort) && ((m_mbxOffset + kMbxMessageHeaderSz) < m_mbxFileSize)) {
     PRUint32    msgSz;
     if (!WriteMailItem( 0, m_mbxOffset, 0, &msgSz)) {
       if (!WasErrorFatal())
         ReportReadError( m_mbxFile);
-      return( PR_FALSE);
+      return( false);
     }
     m_mbxOffset += msgSz;
     m_didBytes += msgSz;
     m_msgCount++;
     if (pDone)
       *pDone = m_didBytes;
     if (pCount)
       *pCount = m_msgCount;
   }
 
   CleanUp();
 
-  return( PR_TRUE);
+  return( true);
 }
 
 
 void CMbxScanner::CleanUp( void)
 {
   m_mbxFileInputStream->Close();
   m_dstFileOutputStream->Close();
 
@@ -310,30 +310,30 @@ bool CMbxScanner::WriteMailItem( PRUint3
   PRUint32    cntRead;
   PRInt8 *  pChar = (PRInt8 *) values;
 
   nsCOMPtr <nsISeekableStream> seekableStream = do_QueryInterface(m_mbxFileInputStream);
   rv = seekableStream->Seek(nsISeekableStream::NS_SEEK_SET,  offset);
 
   if (NS_FAILED( rv)) {
     IMPORT_LOG1( "Mbx seek error: 0x%lx\n", offset);
-    return( PR_FALSE);
+    return( false);
   }
   rv = m_mbxFileInputStream->Read( (char *) pChar, cnt, &cntRead);
   if (NS_FAILED( rv) || (cntRead != cnt)) {
     IMPORT_LOG1( "Mbx read error at: 0x%lx\n", offset);
-    return( PR_FALSE);
+    return( false);
   }
   if (values[0] != 0x7F007F00) {
     IMPORT_LOG2( "Mbx tag field doesn't match: 0x%lx, at offset: 0x%lx\n", values[0], offset);
-    return( PR_FALSE);
+    return( false);
   }
   if (size && (values[2] != size)) {
     IMPORT_LOG3( "Mbx size doesn't match idx, mbx: %ld, idx: %ld, at offset: 0x%lx\n", values[2], size, offset);
-    return( PR_FALSE);
+    return( false);
   }
 
   if (pTotalMsgSize != nsnull)
     *pTotalMsgSize = values[2];
 
   // everything looks kosher...
   // the actual message text follows and is values[3] bytes long...
   return( CopyMbxFileBytes(flags,  values[3]));
@@ -346,17 +346,17 @@ bool CMbxScanner::IsFromLineKey( PRUint8
 
 
 #define IS_ANY_SPACE( _ch) ((_ch == ' ') || (_ch == '\t') || (_ch == 10) || (_ch == 13))
 
 
 bool CMbxScanner::CopyMbxFileBytes(PRUint32 flags, PRUint32 numBytes)
 {
   if (!numBytes)
-    return( PR_TRUE);
+    return( true);
 
   PRUint32  cnt;
   PRUint8   last[2] = {0, 0};
   PRUint32  inIdx = 0;
   bool      first = true;
   PRUint8 * pIn;
   PRUint8 * pStart;
   PRInt32   fromLen = strlen( m_pFromLine);
@@ -369,17 +369,17 @@ bool CMbxScanner::CopyMbxFileBytes(PRUin
       cnt = m_bufSz - inIdx;
     else
       cnt = numBytes;
     // Read some of the message from the file...
     pChar = m_pInBuffer + inIdx;
     rv = m_mbxFileInputStream->Read( (char *) pChar, (PRInt32)cnt, &cntRead);
     if (NS_FAILED( rv) || (cntRead != (PRInt32)cnt)) {
       ReportReadError( m_mbxFile);
-      return( PR_FALSE);
+      return( false);
     }
     // Keep track of the last 2 bytes of the message for terminating EOL logic
     if (cnt < 2) {
       last[0] = last[1];
       last[1] = m_pInBuffer[cnt - 1];
     }
     else {
       last[0] = m_pInBuffer[cnt - 2];
@@ -397,40 +397,40 @@ bool CMbxScanner::CopyMbxFileBytes(PRUin
           inIdx++;
         while ((inIdx < cnt) && (IS_ANY_SPACE( m_pInBuffer[inIdx])))
           inIdx++;
         if (inIdx >= cnt) {
           // This should not occurr - it means the message starts
           // with a From separator line that is longer than our
           // file buffer!  In this bizarre case, just skip this message
           // since it is probably bogus anyway.
-          return( PR_TRUE);
+          return( true);
         }
 
       }
       // Begin every message with a From separator
       rv = m_dstFileOutputStream->Write( m_pFromLine, fromLen, &cntRead);
       if (NS_FAILED( rv) || (cntRead != fromLen)) {
         ReportWriteError( m_dstFile);
-        return( PR_FALSE);
+        return( false);
       }
       char statusLine[50];
       PRUint32 msgFlags = flags; // need to convert from OE flags to mozilla flags
       PR_snprintf(statusLine, sizeof(statusLine), X_MOZILLA_STATUS_FORMAT MSG_LINEBREAK, msgFlags & 0xFFFF);
       rv = m_dstFileOutputStream->Write(statusLine, strlen(statusLine), &cntRead);
       if (NS_SUCCEEDED(rv) && cntRead == fromLen)
       {
         PR_snprintf(statusLine, sizeof(statusLine), X_MOZILLA_STATUS2_FORMAT MSG_LINEBREAK, msgFlags & 0xFFFF0000);
         rv = m_dstFileOutputStream->Write(statusLine, strlen(statusLine), &cntRead);
       }
       if (NS_FAILED( rv) || (cntRead != fromLen)) {
         ReportWriteError( m_dstFile);
-        return( PR_FALSE);
+        return( false);
       }
-      first = PR_FALSE;
+      first = false;
     }
 
     // Handle generic data, escape any lines that begin with "From "
     pIn = m_pInBuffer + inIdx;
     numBytes -= cnt;
     m_didBytes += cnt;
     pStart = pIn;
     cnt -= inIdx;
@@ -445,34 +445,34 @@ bool CMbxScanner::CopyMbxFileBytes(PRUin
           if ((pIn[1] == 0x0A) && (IsFromLineKey( pIn + 2, cnt))) {
             inIdx += 2;
             // Match, escape it
             rv = m_dstFileOutputStream->Write( (const char *)pStart, (PRInt32)inIdx, &cntRead);
             if (NS_SUCCEEDED( rv) && (cntRead == (PRInt32)inIdx))
               rv = m_dstFileOutputStream->Write( ">", 1, &cntRead);
             if (NS_FAILED( rv) || (cntRead != 1)) {
               ReportWriteError( m_dstFile);
-              return( PR_FALSE);
+              return( false);
             }
             cnt -= 2;
             pIn += 2;
             inIdx = 0;
             pStart = pIn;
             continue;
           }
         }
       } // == 0x0D
       cnt--;
       inIdx++;
       pIn++;
     }
     rv = m_dstFileOutputStream->Write( (const char *)pStart, (PRInt32)inIdx, &cntRead);
     if (NS_FAILED( rv) || (cntRead != (PRInt32)inIdx)) {
       ReportWriteError( m_dstFile);
-      return( PR_FALSE);
+      return( false);
     }
     if (cnt) {
       inIdx = cnt;
       memcpy( m_pInBuffer, pIn, cnt);
     }
     else
       inIdx = 0;
   }
@@ -480,21 +480,21 @@ bool CMbxScanner::CopyMbxFileBytes(PRUin
   // I used to check for an eol before writing one but
   // it turns out that adding a proper EOL before the next
   // separator never really hurts so better to be safe
   // and always do it.
   //  if ((last[0] != 0x0D) || (last[1] != 0x0A)) {
   rv = m_dstFileOutputStream->Write( "\x0D\x0A", 2, &cntRead);
   if (NS_FAILED( rv) || (cntRead != 2)) {
     ReportWriteError( m_dstFile);
-    return( PR_FALSE);
+    return( false);
   }
   //  }
 
-  return( PR_TRUE);
+  return( true);
 }
 
 
 CIndexScanner::CIndexScanner( nsString& name, nsIFile * idxFile, nsIFile * mbxFile, nsIFile * dstFile)
 : CMbxScanner( name, mbxFile, dstFile)
 {
   m_idxFile = idxFile;
   m_curItemIndex = 0;
@@ -504,63 +504,63 @@ CIndexScanner::CIndexScanner( nsString& 
 CIndexScanner::~CIndexScanner()
 {
   CleanUp();
 }
 
 bool CIndexScanner::Initialize( void)
 {
   if (!CMbxScanner::Initialize())
-    return( PR_FALSE);
+    return( false);
 
 
   nsresult   rv = NS_NewLocalFileInputStream(getter_AddRefs(m_idxFileInputStream), m_idxFile);
   if (NS_FAILED( rv)) {
     CleanUp();
-    return( PR_FALSE);
+    return( false);
   }
 
-  return( PR_TRUE);
+  return( true);
 }
 
 bool CIndexScanner::ValidateIdxFile( void)
 {
   PRInt8      id[4];
   PRInt32      cnt = 4;
   nsresult    rv;
   PRUint32      cntRead;
   PRInt8 *    pReadTo;
 
   pReadTo = id;
   rv = m_idxFileInputStream->Read( (char *) pReadTo, cnt, &cntRead);
   if (NS_FAILED( rv) || (cntRead != cnt))
-    return( PR_FALSE);
+    return( false);
   if ((id[0] != 'J') || (id[1] != 'M') || (id[2] != 'F') || (id[3] != '9'))
-    return( PR_FALSE);
+    return( false);
   cnt = 4;
   PRUint32    subId;
   pReadTo = (PRInt8 *) &subId;
   rv = m_idxFileInputStream->Read((char *) pReadTo, cnt, &cntRead);
   if (NS_FAILED( rv) || (cntRead != cnt))
-    return( PR_FALSE);
+    return( false);
   if (subId != 0x00010004) {
     IMPORT_LOG1( "Idx file subid doesn't match: 0x%lx\n", subId);
-    return( PR_FALSE);
+    return( false);
   }
 
   pReadTo = (PRInt8 *) &m_numMessages;
   rv = m_idxFileInputStream->Read( (char *) pReadTo, cnt, &cntRead);
   if (NS_FAILED( rv) || (cntRead != cnt))
-    return( PR_FALSE);
+    return( false);
 
   IMPORT_LOG1( "Idx file num messages: %ld\n", m_numMessages);
 
   m_didBytes += 80;
   m_idxOffset = 80;
-  return( PR_TRUE);
+  return( true);
 }
 
 /*
 Idx file...
 Header is 80 bytes, JMF9, subId? 0x00010004, numMessages, fileSize, 1, 0x00010010
 Entries start at byte 80
 4 byte numbers
 Flags? maybe
@@ -582,25 +582,25 @@ bool CIndexScanner::GetMailItem( PRUint3
   PRInt32    cnt = kNumIdxLongsToRead * sizeof( PRUint32);
   PRInt8 *  pReadTo = (PRInt8 *) values;
   PRUint32    cntRead;
   nsresult  rv;
 
   nsCOMPtr <nsISeekableStream> seekableStream = do_QueryInterface(m_idxFileInputStream);
   rv = seekableStream->Seek(nsISeekableStream::NS_SEEK_SET, m_idxOffset);
   if (NS_FAILED( rv))
-    return( PR_FALSE);
+    return( false);
 
   rv = m_idxFileInputStream->Read( (char *) pReadTo, cnt, &cntRead);
   if (NS_FAILED( rv) || (cntRead != cnt))
-    return( PR_FALSE);
+    return( false);
 
   if (values[3] != m_idxOffset) {
     IMPORT_LOG2( "Self pointer invalid: m_idxOffset=0x%lx, self=0x%lx\n", m_idxOffset, values[3]);
-    return( PR_FALSE);
+    return( false);
   }
 
   // So... what do we have here???
 #ifdef DEBUG_SUBJECT_AND_FLAGS
   IMPORT_LOG2( "Number: %ld, msg offset: 0x%lx, ", values[2], values[5]);
   IMPORT_LOG2( "msg length: %ld, Flags: 0x%lx\n", values[6], values[0]);
   seekableStream->Seek(nsISeekableStream::NS_SEEK_SET, m_idxOffset + 212);
   PRUint32  subSz = 0;
@@ -617,38 +617,38 @@ bool CIndexScanner::GetMailItem( PRUint3
 #endif
 
   m_idxOffset += values[4];
   m_didBytes += values[4];
 
   *pFlags = values[0];
   *pOffset = values[5];
   *pSize = values[6];
-  return( PR_TRUE);
+  return( true);
 }
 
 #define  kOEDeletedFlag    0x0001
 
 bool CIndexScanner::DoWork( bool *pAbort, PRUint32 *pDone, PRUint32 *pCount)
 {
   m_didBytes = 0;
   if (!ValidateIdxFile())
-    return( PR_FALSE);
+    return( false);
 
   bool    failed = false;
   while ((m_curItemIndex < m_numMessages) && !failed && !(*pAbort)) {
     PRUint32  flags, offset, size;
     if (!GetMailItem( &flags, &offset, &size)) {
       CleanUp();
-      return( PR_FALSE);
+      return( false);
     }
     m_curItemIndex++;
     if (!(flags & kOEDeletedFlag)) {
       if (!WriteMailItem( flags, offset, size))
-        failed = PR_TRUE;
+        failed = true;
       else {
         m_msgCount++;
       }
     }
     m_didBytes += size;
     if (pDone)
       *pDone = m_didBytes;
     if (pCount)
--- a/mailnews/import/oexpress/nsOEScanBoxes.cpp
+++ b/mailnews/import/oexpress/nsOEScanBoxes.cpp
@@ -118,17 +118,17 @@ bool nsOEScanBoxes::Find50Mail( nsIFile 
           localWhere->InitWithNativePath(nsDependentCString((const char *)pBytes));
 
           IMPORT_LOG1( "Setting native path: %s\n", pBytes);
 
           nsOERegUtil::FreeValueBytes( pBytes);
           bool    isDir = false;
           rv = pWhere->IsDirectory( &isDir);
           if (isDir && NS_SUCCEEDED( rv))
-            success = PR_TRUE;
+            success = true;
         }
         ::RegCloseKey( sKey);
       }
     }
   }
 
   return( success);
 }
@@ -136,27 +136,27 @@ bool nsOEScanBoxes::Find50Mail( nsIFile 
 bool nsOEScanBoxes::FindMail( nsIFile *pWhere)
 {
   nsresult   rv;
   bool      success = false;
   HKEY    sKey;
         nsCOMPtr <nsILocalFile> localWhere = do_QueryInterface(pWhere);
 
   if (Find50Mail( pWhere))
-    return( PR_TRUE);
+    return( true);
 
   if (::RegOpenKeyEx( HKEY_CURRENT_USER, "Software\\Microsoft\\Outlook Express", 0, KEY_QUERY_VALUE, &sKey) == ERROR_SUCCESS) {
     LPBYTE  pBytes = nsOERegUtil::GetValueBytes( sKey, "Store Root");
     if (pBytes) {
       localWhere->InitWithNativePath(nsDependentCString((const char *) pBytes));
       pWhere->AppendNative(NS_LITERAL_CSTRING("Mail"));
       bool    isDir = false;
       rv = pWhere->IsDirectory( &isDir);
       if (isDir && NS_SUCCEEDED( rv))
-        success = PR_TRUE;
+        success = true;
       delete [] pBytes;
     }
     ::RegCloseKey( sKey);
   }
 
   return( success);
 }
 
@@ -226,62 +226,62 @@ bool nsOEScanBoxes::FindMailBoxes( nsIFi
 {
   Reset();
 
   nsresult  rv;
   bool      isFile = false;
 
   rv = descFile->IsFile( &isFile);
   if (NS_FAILED( rv) || !isFile)
-    return( PR_FALSE);
+    return( false);
 
         nsCOMPtr <nsIInputStream> descInputStream;
 
         rv = NS_NewLocalFileInputStream(getter_AddRefs(descInputStream), descFile);
   if (NS_FAILED( rv))
-    return( PR_FALSE);
+    return( false);
 
   IMPORT_LOG0( "Reading the folders.nch file\n");
 
   PRUint32    curRec;
   if (!ReadLong( descInputStream, curRec, 20)) {
-    return( PR_FALSE);
+    return( false);
   }
 
   // Now for each record
   bool        done = false;
   PRUint32    equal;
   PRUint32    size;
   PRUint32    previous;
   PRUint32    next;
   MailboxEntry *  pEntry;
   bool        failed;
 
   while (!done) {
 
-    if (!ReadLong( descInputStream, equal, curRec)) return( PR_FALSE);
+    if (!ReadLong( descInputStream, equal, curRec)) return( false);
     if (curRec != equal) {
       IMPORT_LOG1( "Record start invalid: %ld\n", curRec);
       break;
     }
-    if (!ReadLong( descInputStream, size, curRec + 4)) return( PR_FALSE);
-    if (!ReadLong( descInputStream, previous, curRec + 8)) return( PR_FALSE);
-    if (!ReadLong( descInputStream, next, curRec + 12)) return( PR_FALSE);
-    failed = PR_FALSE;
+    if (!ReadLong( descInputStream, size, curRec + 4)) return( false);
+    if (!ReadLong( descInputStream, previous, curRec + 8)) return( false);
+    if (!ReadLong( descInputStream, next, curRec + 12)) return( false);
+    failed = false;
     pEntry = new MailboxEntry;
-    if (!ReadLong( descInputStream, pEntry->index, curRec + 16)) failed = PR_TRUE;
-    if (!ReadString( descInputStream, pEntry->mailName, curRec + 20)) failed = PR_TRUE;
-    if (!ReadString( descInputStream, pEntry->fileName, curRec + 279)) failed = PR_TRUE;
-    if (!ReadLong( descInputStream, pEntry->parent, curRec + 539)) failed = PR_TRUE;
-    if (!ReadLong( descInputStream, pEntry->child, curRec + 543)) failed = PR_TRUE;
-    if (!ReadLong( descInputStream, pEntry->sibling, curRec + 547)) failed = PR_TRUE;
-    if (!ReadLong( descInputStream, pEntry->type, curRec + 551)) failed = PR_TRUE;
+    if (!ReadLong( descInputStream, pEntry->index, curRec + 16)) failed = true;
+    if (!ReadString( descInputStream, pEntry->mailName, curRec + 20)) failed = true;
+    if (!ReadString( descInputStream, pEntry->fileName, curRec + 279)) failed = true;
+    if (!ReadLong( descInputStream, pEntry->parent, curRec + 539)) failed = true;
+    if (!ReadLong( descInputStream, pEntry->child, curRec + 543)) failed = true;
+    if (!ReadLong( descInputStream, pEntry->sibling, curRec + 547)) failed = true;
+    if (!ReadLong( descInputStream, pEntry->type, curRec + 551)) failed = true;
     if (failed) {
       delete pEntry;
-      return( PR_FALSE);
+      return( false);
     }
 
     #ifdef _TRACE_MAILBOX_ENTRIES
     IMPORT_LOG0( "------------\n");
     IMPORT_LOG2( "    Offset: %lx, index: %ld\n", curRec, pEntry->index);
     IMPORT_LOG2( "      previous: %lx, next: %lx\n", previous, next);
     IMPORT_LOG2( "      Name: %S, File: %s\n", (PRUnichar *) pEntry->mailName, (const char *) pEntry->fileName);
     IMPORT_LOG3( "      Parent: %ld, Child: %ld, Sibling: %ld\n", pEntry->parent, pEntry->child, pEntry->sibling);
@@ -289,52 +289,52 @@ bool nsOEScanBoxes::FindMailBoxes( nsIFi
 
     if (!StringEndsWith(pEntry->fileName, NS_LITERAL_CSTRING(".mbx")))
       pEntry->fileName.Append( ".mbx");
 
     m_entryArray.AppendElement( pEntry);
 
     curRec = next;
     if (!next)
-      done = PR_TRUE;
+      done = true;
   }
 
   MailboxEntry *pZero = GetIndexEntry( 0);
   if (pZero)
     m_pFirst = GetIndexEntry( pZero->child);
 
   IMPORT_LOG1( "Read the folders.nch file, found %ld mailboxes\n", (long) m_entryArray.Count());
 
-  return( PR_TRUE);
+  return( true);
 }
 
 bool nsOEScanBoxes::Find50MailBoxes( nsIFile* descFile)
 {
   Reset();
 
   nsresult  rv;
   bool      isFile = false;
 
   rv = descFile->IsFile( &isFile);
   if (NS_FAILED( rv) || !isFile)
-    return( PR_FALSE);
+    return( false);
 
         nsCOMPtr <nsIInputStream> descInputStream;
 
         rv = NS_NewLocalFileInputStream(getter_AddRefs(descInputStream), descFile);
   if (NS_FAILED( rv))
-    return( PR_FALSE);
+    return( false);
 
   IMPORT_LOG0( "Reading the folders.dbx file\n");
 
   PRUint32 *    pIndex;
   PRUint32    indexSize = 0;
   if (!nsOE5File::ReadIndex( descInputStream, &pIndex, &indexSize)) {
     IMPORT_LOG0( "*** NOT USING FOLDERS.DBX!!!\n");
-    return( PR_FALSE);
+    return( false);
   }
 
   PRUint32  marker;
   PRUint32  size;
   char  *  pBytes;
   PRUint32    cntRead;
   PRInt32    recordId;
   PRInt32    strOffset;
@@ -425,17 +425,17 @@ bool nsOEScanBoxes::Find50MailBoxes( nsI
           data = 0;
       }
       if (data == localStoreId) {
         // Create an entry for this bugger
         pEntry = NewMailboxEntry(id, parent, (const char *) (pBytes + strOffset), pFileName);
         if (pEntry)
         {
           AddChildEntry( pEntry, localStoreId);
-          pEntry->processed =  PR_TRUE;
+          pEntry->processed =  true;
           // See if we have any child folders that need to be added/processed.
           ProcessPendingChildEntries(id, localStoreId, m_pendingChildArray);
           // Clean up the pending list.
           RemoveProcessedChildEntries();
         }
       }
       else
       {
@@ -456,50 +456,50 @@ bool nsOEScanBoxes::Find50MailBoxes( nsI
 
     delete [] pBytes;
   }
 
 
   delete [] pIndex;
 
   if (m_entryArray.Count())
-    return( PR_TRUE);
+    return( true);
   else
-    return( PR_FALSE);
+    return( false);
 }
 
 nsOEScanBoxes::MailboxEntry *nsOEScanBoxes::NewMailboxEntry(PRUint32 id, PRUint32 parent, const char *prettyName, char *pFileName)
 {
   MailboxEntry *pEntry = new MailboxEntry();
   if (!pEntry)
     return nsnull;
 
   pEntry->index = id;
   pEntry->parent = parent;
   pEntry->child = 0;
   pEntry->type = 0;
   pEntry->sibling = -1;
-  pEntry->processed =  PR_FALSE;
+  pEntry->processed =  false;
   NS_CopyNativeToUnicode(nsDependentCString(prettyName), pEntry->mailName);
   if (pFileName)
     pEntry->fileName = pFileName;
   return pEntry;
 }
 
 void nsOEScanBoxes::ProcessPendingChildEntries(PRUint32 parent, PRUint32 rootIndex, nsVoidArray  &childArray)
 {
   PRInt32 i, max;
   MailboxEntry *pEntry;
   for (i = 0, max = childArray.Count(); i < max; i++)
   {
     pEntry = (MailboxEntry *) childArray.ElementAt(i);
     if ((!pEntry->processed) && (pEntry->parent == parent))
     {
       AddChildEntry(pEntry, rootIndex);
-      pEntry->processed =  PR_TRUE; // indicate it's been processed.
+      pEntry->processed =  true; // indicate it's been processed.
       // See if there are unprocessed child folders for this child in the
       // array as well (ie, both child and grand-child are on the list).
       ProcessPendingChildEntries(pEntry->index, rootIndex, childArray);
     }
   }
 }
 
 void nsOEScanBoxes::RemoveProcessedChildEntries()
@@ -585,17 +585,17 @@ bool nsOEScanBoxes::Scan50MailboxDir( ns
 
   while (hasMore && NS_SUCCEEDED(rv))
   {
     nsCOMPtr<nsISupports> aSupport;
     rv = directoryEnumerator->GetNext(getter_AddRefs(aSupport));
     nsCOMPtr<nsILocalFile> entry(do_QueryInterface(aSupport, &rv));
     directoryEnumerator->HasMoreElements(&hasMore);
 
-    isFile = PR_FALSE;
+    isFile = false;
     rv = entry->IsFile( &isFile);
     if (NS_SUCCEEDED( rv) && isFile) {
       pLeaf = nsnull;
       rv = entry->GetNativeLeafName( fName);
       if (NS_SUCCEEDED( rv)  &&
         (StringEndsWith(fName, NS_LITERAL_CSTRING(".dbx")))) {
           // This is a *.dbx file in the mail directory
           if (nsOE5File::IsLocalMailFile(entry)) {
@@ -613,20 +613,20 @@ bool nsOEScanBoxes::Scan50MailboxDir( ns
           }
       }
     }
   }
 
   if (m_entryArray.Count() > 0) {
     pEntry = (MailboxEntry *)m_entryArray.ElementAt( m_entryArray.Count() - 1);
     pEntry->sibling = -1;
-    return( PR_TRUE);
+    return( true);
   }
 
-  return( PR_FALSE);
+  return( false);
 }
 
 
 void nsOEScanBoxes::ScanMailboxDir( nsIFile * srcDir)
 {
   if (Scan50MailboxDir( srcDir))
     return;
 
@@ -652,17 +652,17 @@ void nsOEScanBoxes::ScanMailboxDir( nsIF
 
   while (hasMore && NS_SUCCEEDED(rv))
   {
     nsCOMPtr<nsISupports> aSupport;
     rv = directoryEnumerator->GetNext(getter_AddRefs(aSupport));
     nsCOMPtr<nsILocalFile> entry(do_QueryInterface(aSupport, &rv));
     directoryEnumerator->HasMoreElements(&hasMore);
 
-    isFile = PR_FALSE;
+    isFile = false;
     rv = entry->IsFile( &isFile);
     if (NS_SUCCEEDED( rv) && isFile)
     {
       rv = entry->GetNativeLeafName(pLeaf);
       if (NS_SUCCEEDED( rv) && !pLeaf.IsEmpty() &&
         ((sLen = pLeaf.Length()) > 4) &&
         (!PL_strcasecmp( pLeaf.get() + sLen - 3, "mbx")))
       {
@@ -719,22 +719,22 @@ PRUint32 nsOEScanBoxes::CountMailboxes( 
   return( count);
 }
 
 bool nsOEScanBoxes::GetMailboxList( nsIFile * root, nsISupportsArray **pArray)
 {
   nsresult rv = NS_NewISupportsArray( pArray);
   if (NS_FAILED( rv)) {
     IMPORT_LOG0( "FAILED to allocate the nsISupportsArray\n");
-    return( PR_FALSE);
+    return( false);
   }
 
   BuildMailboxList( nsnull, root, 1, *pArray);
 
-  return( PR_TRUE);
+  return( true);
 }
 
 void nsOEScanBoxes::BuildMailboxList( MailboxEntry *pBox, nsIFile * root, PRInt32 depth, nsISupportsArray *pArray)
 {
   if (pBox == nsnull) {
     if (m_pFirst != nsnull) {
       pBox = m_pFirst;
 
@@ -818,87 +818,87 @@ nsOEScanBoxes::MailboxEntry * nsOEScanBo
 // -------------------------------------------------------
 // File utility routines
 // -------------------------------------------------------
 
 bool nsOEScanBoxes::ReadLong( nsIInputStream * stream, PRInt32& val, PRUint32 offset)
 {
   nsresult  rv;
         nsCOMPtr <nsISeekableStream> seekStream = do_QueryInterface(stream, &rv);
-        NS_ENSURE_SUCCESS(rv, PR_FALSE);
+        NS_ENSURE_SUCCESS(rv, false);
   rv = seekStream->Seek(nsISeekableStream::NS_SEEK_SET, offset);
   if (NS_FAILED( rv))
-    return( PR_FALSE);
+    return( false);
 
   PRUint32  cntRead;
   char * pReadTo = (char *)&val;
   rv = stream->Read(pReadTo, sizeof( val), &cntRead);
 
   if (NS_FAILED( rv) || (cntRead != sizeof( val)))
-    return( PR_FALSE);
-  return( PR_TRUE);
+    return( false);
+  return( true);
 }
 
 bool nsOEScanBoxes::ReadLong( nsIInputStream * stream, PRUint32& val, PRUint32 offset)
 {
   nsresult  rv;
         nsCOMPtr <nsISeekableStream> seekStream = do_QueryInterface(stream, &rv);
-        NS_ENSURE_SUCCESS(rv, PR_FALSE);
+        NS_ENSURE_SUCCESS(rv, false);
   rv = seekStream->Seek(nsISeekableStream::NS_SEEK_SET, offset);
   if (NS_FAILED( rv))
-    return( PR_FALSE);
+    return( false);
 
   PRUint32  cntRead;
   char * pReadTo = (char *)&val;
   rv = stream->Read(pReadTo, sizeof( val), &cntRead);
 
   if (NS_FAILED( rv) || (cntRead != sizeof( val)))
-    return( PR_FALSE);
-  return( PR_TRUE);
+    return( false);
+  return( true);
 }
 
 // It appears as though the strings for file name and mailbox
 // name are at least 254 chars - verified - they are probably 255
 // but why bother going that far!  If a file name is that long then
 // the heck with it.
 #define  kOutlookExpressStringLength  252
 bool nsOEScanBoxes::ReadString( nsIInputStream * stream, nsString& str, PRUint32 offset)
 {
   nsresult rv;
   nsCOMPtr <nsISeekableStream> seekStream = do_QueryInterface(stream, &rv);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
   rv = seekStream->Seek(nsISeekableStream::NS_SEEK_SET, offset);
   if (NS_FAILED( rv))
-    return( PR_FALSE);
+    return( false);
 
 
   PRUint32 cntRead;
   char buffer[kOutlookExpressStringLength];
   char * pReadTo = buffer;
   rv = stream->Read( pReadTo, kOutlookExpressStringLength, &cntRead);
 
   if (NS_FAILED( rv) || (cntRead != kOutlookExpressStringLength))
-    return( PR_FALSE);
+    return( false);
   buffer[kOutlookExpressStringLength - 1] = 0;
   str.AssignASCII(buffer);
-  return( PR_TRUE);
+  return( true);
 }
 
 bool nsOEScanBoxes::ReadString( nsIInputStream * stream, nsCString& str, PRUint32 offset)
 {
   nsresult  rv;
         nsCOMPtr <nsISeekableStream> seekStream = do_QueryInterface(stream, &rv);
-        NS_ENSURE_SUCCESS(rv, PR_FALSE);
+        NS_ENSURE_SUCCESS(rv, false);
   rv = seekStream->Seek(nsISeekableStream::NS_SEEK_SET, offset);
   if (NS_FAILED( rv))
-    return( PR_FALSE);
+    return( false);
 
   PRUint32  cntRead;
   char  buffer[kOutlookExpressStringLength];
   char *  pReadTo = buffer;
   rv = stream->Read( pReadTo, kOutlookExpressStringLength, &cntRead);
 
   if (NS_FAILED( rv) || (cntRead != kOutlookExpressStringLength))
-    return( PR_FALSE);
+    return( false);
   buffer[kOutlookExpressStringLength - 1] = 0;
   str = buffer;
-  return( PR_TRUE);
+  return( true);
 }
--- a/mailnews/import/oexpress/nsOESettings.cpp
+++ b/mailnews/import/oexpress/nsOESettings.cpp
@@ -118,37 +118,37 @@ NS_IMPL_ISUPPORTS1(nsOESettings, nsIImpo
 NS_IMETHODIMP nsOESettings::AutoLocate(PRUnichar **description, nsIFile **location, bool *_retval)
 {
   NS_PRECONDITION(description != nsnull, "null ptr");
   NS_PRECONDITION(_retval != nsnull, "null ptr");
   if (!description || !_retval)
     return( NS_ERROR_NULL_POINTER);
 
   *description = nsOEStringBundle::GetStringByID( OEIMPORT_NAME);
-  *_retval = PR_FALSE;
+  *_retval = false;
 
   if (location)
     *location = nsnull;
   HKEY  key;
   key = OESettings::Find50Key();
   if (key != nsnull) {
-    *_retval = PR_TRUE;
+    *_retval = true;
     ::RegCloseKey( key);
   }
   else {
     key = OESettings::Find40Key();
     if (key != nsnull) {
-      *_retval = PR_TRUE;
+      *_retval = true;
       ::RegCloseKey( key);
     }
   }
   if (*_retval) {
     key = OESettings::FindAccountsKey();
     if (key == nsnull) {
-      *_retval = PR_FALSE;
+      *_retval = false;
     }
     else {
       ::RegCloseKey( key);
     }
   }
 
   return( NS_OK);
 }
@@ -158,21 +158,21 @@ NS_IMETHODIMP nsOESettings::SetLocation(
   return( NS_OK);
 }
 
 NS_IMETHODIMP nsOESettings::Import(nsIMsgAccount **localMailAccount, bool *_retval)
 {
   NS_PRECONDITION( _retval != nsnull, "null ptr");
 
   if (OESettings::DoImport( localMailAccount)) {
-    *_retval = PR_TRUE;
+    *_retval = true;
     IMPORT_LOG0( "Settings import appears successful\n");
   }
   else {
-    *_retval = PR_FALSE;
+    *_retval = false;
     IMPORT_LOG0( "Settings import returned FALSE\n");
   }
 
   return( NS_OK);
 }
 
 HKEY OESettings::FindAccountsKey( void)
 {
@@ -231,27 +231,27 @@ HKEY OESettings::Find40Key( void)
   return( nsnull);
 }
 
 bool OESettings::DoImport( nsIMsgAccount **ppAccount)
 {
   HKEY  hKey = FindAccountsKey();
   if (hKey == nsnull) {
     IMPORT_LOG0( "*** Error finding Outlook Express registry account keys\n");
-    return( PR_FALSE);
+    return( false);
   }
 
   nsresult  rv;
 
   nsCOMPtr<nsIMsgAccountManager> accMgr =
            do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
     if (NS_FAILED(rv)) {
     IMPORT_LOG0( "*** Failed to create a account manager!\n");
     ::RegCloseKey( hKey);
-    return( PR_FALSE);
+    return( false);
   }
 
   HKEY    subKey;
   nsCString  defMailName;
   // OE has default mail account here when it has been
   // set up by transfer or has multiple identities
   // look below for orig code that looked in new OE installs
   if (::RegOpenKeyEx(HKEY_CURRENT_USER, "Identities", 0,
@@ -300,26 +300,26 @@ bool OESettings::DoImport( nsIMsgAccount
   HKEY    subSubKey;
 
   subKey = Find50Key();
   if (!subKey )
     subKey = Find40Key();
   // above key not critical
 
   checkNewMailTime = 30;
-  checkNewMail = PR_FALSE;
+  checkNewMail = false;
   if (subKey){
     if (::RegOpenKeyEx(subKey, "Mail", 0, KEY_QUERY_VALUE,
                        &subSubKey) == ERROR_SUCCESS) {
       ::RegCloseKey( subKey);
       BYTE *  pBytes = nsOERegUtil::GetValueBytes( subSubKey, "Poll For Mail");
       ::RegCloseKey( subSubKey);
       if (pBytes) {
         if (*(PRInt32 *)pBytes != -1){
-          checkNewMail = PR_TRUE;
+          checkNewMail = true;
           checkNewMailTime = *(PRInt32 *)pBytes / 60000;
         }
         nsOERegUtil::FreeValueBytes( pBytes);
       }
     }
   }
 
   // Iterate the accounts looking for POP3 & IMAP accounts...
@@ -404,17 +404,17 @@ bool OESettings::DoIMAPServer( nsIMsgAcc
 {
   PRInt32 authMethod;
   if (ppAccount)
     *ppAccount = nsnull;
 
   char * pUserName;
   pUserName = (char *)nsOERegUtil::GetValueBytes(hKey, "IMAP User Name");
   if (!pUserName)
-    return( PR_FALSE);
+    return( false);
 
   bool result = false;
 
   // I now have a user name/server name pair, find out if it already exists?
   nsCOMPtr<nsIMsgIncomingServer> in;
   nsresult rv = pMgr->FindServer(nsDependentCString(pUserName),
                                  nsDependentCString(pServerName),
                                  NS_LITERAL_CSTRING("imap"),
@@ -476,55 +476,55 @@ bool OESettings::DoIMAPServer( nsIMsgAcc
       nsCOMPtr<nsIMsgAccount> account;
       rv = pMgr->CreateAccount(getter_AddRefs( account));
       if (NS_SUCCEEDED( rv) && account) {
         rv = account->SetIncomingServer(in);
 
         IMPORT_LOG0("Created an account and set the IMAP server as the incoming server\n");
 
         // Fiddle with the identities
-        SetIdentities(pMgr, account, hKey, pUserName, authMethod, PR_FALSE);
-        result = PR_TRUE;
+        SetIdentities(pMgr, account, hKey, pUserName, authMethod, false);
+        result = true;
         if (ppAccount)
           account->QueryInterface(NS_GET_IID(nsIMsgAccount), (void **)ppAccount);
       }
     }
   }
   else if (NS_SUCCEEDED(rv) && in) {
     // for an existing server we create another identity,
     //  TB lists under 'manage identities'
     nsCOMPtr<nsIMsgAccount> account;
     rv = pMgr->FindAccountForServer(in, getter_AddRefs( account));
     if (NS_SUCCEEDED( rv) && account) {
       IMPORT_LOG0("Created an identity and added to existing IMAP incoming server\n");
       // Fiddle with the identities
       in->GetAuthMethod(&authMethod);
-      SetIdentities(pMgr, account, hKey, pUserName, authMethod, PR_FALSE);
-      result = PR_TRUE;
+      SetIdentities(pMgr, account, hKey, pUserName, authMethod, false);
+      result = true;
       if (ppAccount)
         account->QueryInterface(NS_GET_IID(nsIMsgAccount),
                                  (void **)ppAccount);
     }
   }
   else
-    result = PR_TRUE;
+    result = true;
   nsOERegUtil::FreeValueBytes((BYTE *) pUserName);
   return( result);
 }
 
 bool OESettings::DoPOP3Server( nsIMsgAccountManager *pMgr, HKEY hKey, char *pServerName, nsIMsgAccount **ppAccount)
 {
   PRInt32 authMethod;    // Secure Password Authentication
   if (ppAccount)
     *ppAccount = nsnull;
 
   char * pUserName;
   pUserName = (char *)nsOERegUtil::GetValueBytes( hKey, "POP3 User Name");
   if (!pUserName)
-    return( PR_FALSE);
+    return( false);
 
   bool result = false;
 
   // I now have a user name/server name pair, find out if it already exists?
   nsCOMPtr<nsIMsgIncomingServer> in;
   nsresult rv = pMgr->FindServer(nsDependentCString(pUserName),
                                  nsDependentCString(pServerName),
                                  NS_LITERAL_CSTRING("pop3"),
@@ -573,17 +573,17 @@ bool OESettings::DoPOP3Server( nsIMsgAcc
         pMgr->GetLocalFoldersServer(getter_AddRefs(localFoldersServer));
 
         if (!localFoldersServer)
         {
           // If Local Folders does not exist already, create it
 
           if (NS_FAILED(pMgr->CreateLocalMailAccount())) {
             IMPORT_LOG0("*** Failed to create Local Folders!\n");
-            return PR_FALSE;
+            return false;
           }
 
           pMgr->GetLocalFoldersServer(getter_AddRefs(localFoldersServer));
         }
 
         // now get the account for this server
         nsCOMPtr<nsIMsgAccount> localFoldersAccount;
         pMgr->FindAccountForServer(localFoldersServer, getter_AddRefs(localFoldersAccount));
@@ -598,17 +598,17 @@ bool OESettings::DoPOP3Server( nsIMsgAcc
         if (pBytesTemp)
         {
         // OE:0=='Include this account when receiving mail or synchronizing'==
         // TB:1==AM:Server:advanced:Include this server when getting new mail
           pop3Server->SetDeferGetNewMail(*pBytesTemp == 0);
           nsOERegUtil::FreeValueBytes(pBytesTemp);
         }
         else
-          pop3Server->SetDeferGetNewMail(PR_FALSE);
+          pop3Server->SetDeferGetNewMail(false);
         pBytesTemp = nsOERegUtil::GetValueBytes(hKey, "Leave Mail On Server");
         if (pBytesTemp)
         {
           pop3Server->SetLeaveMessagesOnServer(*pBytesTemp == 1);
           nsOERegUtil::FreeValueBytes(pBytesTemp);
         }
         pBytesTemp = nsOERegUtil::GetValueBytes(hKey, "Remove When Deleted");
         if (pBytesTemp)
@@ -638,18 +638,18 @@ bool OESettings::DoPOP3Server( nsIMsgAcc
       // We have a server, create an account.
       nsCOMPtr<nsIMsgAccount>  account;
       rv = pMgr->CreateAccount(getter_AddRefs( account));
       if (NS_SUCCEEDED( rv) && account) {
         rv = account->SetIncomingServer(in);
         IMPORT_LOG0("Created a new account and set the incoming server to the POP3 server.\n");
 
         // Fiddle with the identities
-        SetIdentities(pMgr, account, hKey, pUserName, authMethod, PR_FALSE);
-        result = PR_TRUE;
+        SetIdentities(pMgr, account, hKey, pUserName, authMethod, false);
+        result = true;
         if (ppAccount)
           account->QueryInterface(NS_GET_IID(nsIMsgAccount),
                                    (void **)ppAccount);
       }
     }
   } 
   else if (NS_SUCCEEDED(rv) && in) {
     IMPORT_LOG2("Existing POP3 server named: %s, userName: %s\n",
@@ -657,24 +657,24 @@ bool OESettings::DoPOP3Server( nsIMsgAcc
     // for an existing server we create another identity,
     // TB listed under 'manage identities'
     nsCOMPtr<nsIMsgAccount>  account;
     rv = pMgr->FindAccountForServer(in, getter_AddRefs( account));
     if (NS_SUCCEEDED(rv) && account) {
       IMPORT_LOG0("Created identity and added to existing POP3 incoming server.\n");
       // Fiddle with the identities
       in->GetAuthMethod(&authMethod);
-      SetIdentities(pMgr, account, hKey, pUserName, authMethod, PR_FALSE);
-      result = PR_TRUE;
+      SetIdentities(pMgr, account, hKey, pUserName, authMethod, false);
+      result = true;
       if (ppAccount)
         account->QueryInterface(NS_GET_IID(nsIMsgAccount), (void **)ppAccount);
     }
   }
   else
-    result = PR_TRUE;
+    result = true;
   nsOERegUtil::FreeValueBytes((BYTE *) pUserName);
   return result;
 }
 
 bool OESettings::DoNNTPServer( nsIMsgAccountManager *pMgr, HKEY hKey,
                                 char *pServerName, nsIMsgAccount **ppAccount)
 {
   if (ppAccount)
@@ -703,17 +703,17 @@ bool OESettings::DoNNTPServer( nsIMsgAcc
       BYTE * pBytesTemp = nsOERegUtil::GetValueBytes(hKey, "NNTP Port");
       if (pBytesTemp && *(PRInt32 *)pBytesTemp != 119)
         in->SetPort(*(PRInt32 *) pBytesTemp);
       nsOERegUtil::FreeValueBytes(pBytesTemp);
 
       // do nntpincomingserver stuff
       nsCOMPtr<nsINntpIncomingServer> nntpServer = do_QueryInterface(in);
       if (nntpServer && pUserName && *pUserName) {
-        nntpServer->SetPushAuth(PR_TRUE);
+        nntpServer->SetPushAuth(true);
         in->SetUsername(nsDependentCString(pUserName));
       }
 
       IMPORT_LOG2("Created NNTP server named: %s, userName: %s\n",
                    pServerName, pUserName? pUserName : "");
 
       nsString prettyName;
       if (NS_SUCCEEDED(GetAccountName(hKey, pServerName, prettyName)))
@@ -723,39 +723,39 @@ bool OESettings::DoNNTPServer( nsIMsgAcc
       nsCOMPtr<nsIMsgAccount> account;
       rv = pMgr->CreateAccount(getter_AddRefs( account));
       if (NS_SUCCEEDED(rv) && account) {
         rv = account->SetIncomingServer(in);
 
         IMPORT_LOG0("Created an account and set the NNTP server as the incoming server\n");
 
         // Fiddle with the identities
-        SetIdentities(pMgr, account, hKey, pUserName, 0, PR_TRUE);
-        result = PR_TRUE;
+        SetIdentities(pMgr, account, hKey, pUserName, 0, true);
+        result = true;
         if (ppAccount)
           account->QueryInterface(NS_GET_IID(nsIMsgAccount), (void **)ppAccount);
       }
     }
   }
   else if (NS_SUCCEEDED(rv) && in) {
     // for the existing server...
     nsCOMPtr<nsIMsgAccount> account;
     rv = pMgr->FindAccountForServer(in, getter_AddRefs( account));
     if (NS_SUCCEEDED( rv) && account) {
       IMPORT_LOG0("Using existing account and set the NNTP server as the incoming server\n");
       // Fiddle with the identities
-      SetIdentities(pMgr, account, hKey, pUserName, 0, PR_TRUE);
-      result = PR_TRUE;
+      SetIdentities(pMgr, account, hKey, pUserName, 0, true);
+      result = true;
       if (ppAccount)
         account->QueryInterface(NS_GET_IID(nsIMsgAccount),
                                  (void **)ppAccount);
     }
   }
   else
-    result = PR_TRUE;
+    result = true;
   nsOERegUtil::FreeValueBytes((BYTE *) pUserName);
   return result;
 }
 
 void OESettings::SetIdentities(nsIMsgAccountManager *pMgr, nsIMsgAccount *pAcc,
                                HKEY hKey, char *pIncomgUserName,
                                PRInt32 authMethodIncoming, bool isNNTP )
 {
--- a/mailnews/import/outlook/src/MapiApi.cpp
+++ b/mailnews/import/outlook/src/MapiApi.cpp
@@ -42,17 +42,17 @@
 #include "rtfMailDecoder.h"
 
 #include "prprf.h"
 #include "nsMemory.h"
 #include "nsMsgUtils.h"
 #include "nsUnicharUtils.h"
 
 int      CMapiApi::m_clients = 0;
-BOOL    CMapiApi::m_initialized = PR_FALSE;
+BOOL    CMapiApi::m_initialized = false;
 nsVoidArray  *CMapiApi::m_pStores = NULL;
 LPMAPISESSION CMapiApi::m_lpSession = NULL;
 LPMDB    CMapiApi::m_lpMdb = NULL;
 HRESULT    CMapiApi::m_lastError;
 PRUnichar *  CMapiApi::m_pUniBuff = NULL;
 int      CMapiApi::m_uniBuffLen = 0;
 /*
 Type: 1, name: Calendar, class: IPF.Appointment
--- a/mailnews/import/outlook/src/MapiMessage.cpp
+++ b/mailnews/import/outlook/src/MapiMessage.cpp
@@ -588,17 +588,17 @@ const char* CpToCharset(unsigned int cp)
     else // cp > cptocharset[mid].cp
       begin = mid + 1;
   }
   return 0; // not found
 }
 
 // We don't use nsMsgI18Ncheck_data_in_charset_range because it returns true
 // even if there's no such charset:
-// 1. result initialized by PR_TRUE and returned if, eg, GetUnicodeEncoderRaw fail
+// 1. result initialized by true and returned if, eg, GetUnicodeEncoderRaw fail
 // 2. it uses GetUnicodeEncoderRaw(), not GetUnicodeEncoder() (to normalize the
 //    charset string) (see nsMsgI18N.cpp)
 // This function returns true only if the unicode (utf-16) text can be
 // losslessly represented in specified charset
 bool CMapiMessage::CheckBodyInCharsetRange(const char* charset)
 {
   if (m_body.IsEmpty())
     return true;
@@ -889,17 +889,17 @@ bool CMapiMessage::CopyMsgAttachToFile(L
     return false;
 
   nsCOMPtr<nsIOutputStream> destOutputStream;
   nsresult rv = MsgNewBufferedFileOutputStream(getter_AddRefs(destOutputStream), *tmp_file, -1, 0600);
   if (NS_SUCCEEDED(rv))
     rv = nsOutlookMail::ImportMessage(lpMsg, destOutputStream, nsIMsgSend::nsMsgSaveAsDraft);
 
   if (NS_FAILED(rv)) {
-    (*tmp_file)->Remove(PR_FALSE);
+    (*tmp_file)->Remove(false);
     (*tmp_file)->Release();
     *tmp_file = 0;
   }
 
   return NS_SUCCEEDED(rv);
 }
 
 bool CMapiMessage::CopyBinAttachToFile(LPATTACH lpAttach,
@@ -949,17 +949,17 @@ bool CMapiMessage::CopyBinAttachToFile(L
       }
     }
   }
 
   if (lpAttachStream)
     lpAttachStream->Release();
   lpStreamFile->Release();
   if (!bResult)
-    _tmp_file->Remove(PR_FALSE);
+    _tmp_file->Remove(false);
   else
     CallQueryInterface(_tmp_file, tmp_file);
 
   return bResult;
 }
 
 bool CMapiMessage::GetURL(nsIFile *aFile, nsIURI **url)
 {
@@ -1153,17 +1153,17 @@ bool CMapiMessage::AddAttachment(DWORD a
 
   lpAttach->Release();
   return( bResult);
 }
 
 void CMapiMessage::ClearAttachment(attach_data* data)
 {
   if (data->delete_file && data->tmp_file)
-    data->tmp_file->Remove(PR_FALSE);
+    data->tmp_file->Remove(false);
 
   if (data->type)
     NS_Free(data->type);
   if (data->encoding)
     NS_Free(data->encoding);
   if (data->real_name)
     NS_Free(data->real_name);
   if (data->cid)
@@ -1217,17 +1217,17 @@ nsresult CMapiMessage::GetAttachments(ns
        it != m_stdattachments.end(); it++) {
     nsCOMPtr<nsIMsgAttachedFile> a(do_CreateInstance(NS_MSGATTACHEDFILE_CONTRACTID, &rv));
     NS_ENSURE_SUCCESS(rv, rv);
     a->SetOrigUrl((*it)->orig_url);
     a->SetTmpFile((*it)->tmp_file);
     a->SetEncoding(nsDependentCString((*it)->encoding));
     a->SetRealName(nsDependentCString((*it)->real_name));
     a->SetType(nsDependentCString((*it)->type));
-    attachments->AppendElement(a, PR_FALSE);
+    attachments->AppendElement(a, false);
   }
   return rv;
 }
 
 bool CMapiMessage::GetEmbeddedAttachmentInfo(unsigned int i, nsIURI **uri,
                                              const char **cid,
                                              const char **name) const
 {
--- a/mailnews/import/outlook/src/nsOutlookCompose.cpp
+++ b/mailnews/import/outlook/src/nsOutlookCompose.cpp
@@ -142,17 +142,17 @@ private:
 
 //////////////////////////////////////////////////////////////////////////////////////////////////
 
 // First off, a listener
 class OutlookSendListener : public nsIMsgSendListener
 {
 public:
   OutlookSendListener() {
-    m_done = PR_FALSE;
+    m_done = false;
     m_location = nsnull;
   }
 
   virtual ~OutlookSendListener() { NS_IF_RELEASE( m_location); }
 
   // nsISupports interface
   NS_DECL_ISUPPORTS
 
@@ -163,29 +163,29 @@ public:
   NS_IMETHOD OnProgress(const char *aMsgID, PRUint32 aProgress, PRUint32 aProgressMax) {return NS_OK;}
 
   /* void OnStatus (in string aMsgID, in wstring aMsg); */
   NS_IMETHOD OnStatus(const char *aMsgID, const PRUnichar *aMsg) {return NS_OK;}
 
   /* void OnStopSending (in string aMsgID, in nsresult aStatus, in wstring aMsg, in nsIFile returnFile); */
   NS_IMETHOD OnStopSending(const char *aMsgID, nsresult aStatus, const PRUnichar *aMsg,
                nsIFile *returnFile) {
-    m_done = PR_TRUE;
+    m_done = true;
     NS_IF_ADDREF(m_location = returnFile);
     return NS_OK;
   }
 
    /* void OnSendNotPerformed */
    NS_IMETHOD OnSendNotPerformed(const char *aMsgID, nsresult aStatus) {return NS_OK;}
 
   /* void OnGetDraftFolderURI (); */
   NS_IMETHOD OnGetDraftFolderURI(const char *aFolderURI) {return NS_OK;}
 
   static nsresult CreateSendListener( nsIMsgSendListener **ppListener);
-  void Reset() { m_done = PR_FALSE; NS_IF_RELEASE( m_location);}
+  void Reset() { m_done = false; NS_IF_RELEASE( m_location);}
 
 public:
   bool m_done;
   nsIFile * m_location;
 };
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(OutlookSendListener, nsIMsgSendListener)
 
@@ -275,17 +275,17 @@ nsresult nsOutlookCompose::CreateCompone
   NS_IF_RELEASE(m_pMsgFields);
   if (!m_pListener && NS_SUCCEEDED( rv))
     rv = OutlookSendListener::CreateSendListener( &m_pListener);
 
   if (NS_SUCCEEDED(rv)) {
       rv = CallCreateInstance( kMsgCompFieldsCID, &m_pMsgFields);
     if (NS_SUCCEEDED(rv) && m_pMsgFields) {
       // IMPORT_LOG0( "nsOutlookCompose - CreateComponents succeeded\n");
-      m_pMsgFields->SetForcePlainText( PR_FALSE);
+      m_pMsgFields->SetForcePlainText( false);
       return NS_OK;
     }
   }
 
   return NS_ERROR_FAILURE;
 }
 
 nsresult nsOutlookCompose::ComposeTheMessage(nsMsgDeliverMode mode, CMapiMessage &msg, nsIFile **pMsg)
@@ -494,17 +494,17 @@ nsresult nsOutlookCompose::CopyComposedM
 nsresult nsOutlookCompose::ProcessMessage(nsMsgDeliverMode mode,
                                           CMapiMessage &msg,
                                           nsIOutputStream *pDst)
 {
   nsCOMPtr<nsIFile> compositionFile;
   nsresult rv = ComposeTheMessage(mode, msg, getter_AddRefs(compositionFile));
   NS_ENSURE_SUCCESS(rv, rv);
   rv = CopyComposedMessage(compositionFile, pDst, msg);
-  compositionFile->Remove(PR_FALSE);
+  compositionFile->Remove(false);
   if (NS_FAILED( rv)) {
     IMPORT_LOG0( "*** Error copying composed message to destination mailbox\n");
   }
   return rv;
 }
 
 void nsOutlookCompose::UpdateHeader(CMapiMessageHeaders& oldHeaders,
                                     const CMapiMessageHeaders& newHeaders,
@@ -627,17 +627,17 @@ void nsOutlookCompose::UnhackBody(nsCStr
   hackedString.Append(hackedPostfixA);
   PRInt32 begin = txt.Find(hackedString);
   if (begin == kNotFound)
     return;
   txt.Cut(begin, hackedString.Length());
 
   hackedString.Assign(hackEndA);
   hackedString.Append(hackedPostfixA);
-  PRInt32 end = MsgFind(txt, hackedString, PR_FALSE, begin);
+  PRInt32 end = MsgFind(txt, hackedString, false, begin);
   if (end == kNotFound)
     return; // ?
   txt.Cut(end, hackedString.Length());
 
   nsCString range;
   range.Assign(Substring(txt, begin, end - begin));
   // 1. Remove all CRLFs from the selected range
   MsgReplaceSubstring(range, MSG_LINEBREAK, "");
--- a/mailnews/import/outlook/src/nsOutlookMail.cpp
+++ b/mailnews/import/outlook/src/nsOutlookMail.cpp
@@ -122,18 +122,18 @@ static MAPIFields  gMapiFields[] = {
 #define  OUTLOOK_EMAIL1_MAPI_ID2 32900
 #define  OUTLOOK_EMAIL2_MAPI_ID1 32915
 #define  OUTLOOK_EMAIL2_MAPI_ID2 32916
 #define  OUTLOOK_EMAIL3_MAPI_ID1 32931
 #define  OUTLOOK_EMAIL3_MAPI_ID2 32932
 
 nsOutlookMail::nsOutlookMail()
 {
-  m_gotAddresses = PR_FALSE;
-  m_gotFolders = PR_FALSE;
+  m_gotAddresses = false;
+  m_gotFolders = false;
   m_haveMapi = CMapiApi::LoadMapi();
   m_lpMdb = NULL;
 }
 
 nsOutlookMail::~nsOutlookMail()
 {
 //  EmptyAttachments();
 }
@@ -150,17 +150,17 @@ nsresult nsOutlookMail::GetMailFolders( 
     IMPORT_LOG0( "FAILED to allocate the nsISupportsArray for the mail folder list\n");
     return( rv);
   }
 
   nsCOMPtr<nsIImportService> impSvc(do_GetService(NS_IMPORTSERVICE_CONTRACTID, &rv));
   if (NS_FAILED( rv))
     return( rv);
 
-  m_gotFolders = PR_TRUE;
+  m_gotFolders = true;
 
   m_folderList.ClearAll();
 
   m_mapi.Initialize();
   m_mapi.LogOn();
 
   if (m_storeList.GetSize() == 0)
     m_mapi.IterateStores( m_storeList);
@@ -254,17 +254,17 @@ nsresult nsOutlookMail::GetAddressBooks(
     IMPORT_LOG0( "FAILED to allocate the nsISupportsArray for the address book list\n");
     return( rv);
   }
 
   nsCOMPtr<nsIImportService> impSvc(do_GetService(NS_IMPORTSERVICE_CONTRACTID, &rv));
   if (NS_FAILED( rv))
     return( rv);
 
-  m_gotAddresses = PR_TRUE;
+  m_gotAddresses = true;
 
   m_addressList.ClearAll();
   m_mapi.Initialize();
   m_mapi.LogOn();
   if (m_storeList.GetSize() == 0)
     m_mapi.IterateStores( m_storeList);
 
   int i = 0;
@@ -365,17 +365,17 @@ void nsOutlookMail::OpenMessageStore( CM
 // CMapiMessage
 //   - Encapsulate the MAPI message interface
 //   - Gather the information required to (re)compose the message
 
 nsresult nsOutlookMail::ImportMailbox( PRUint32 *pDoneSoFar, bool *pAbort, PRInt32 index, const PRUnichar *pName, nsIFile *pDest, PRInt32 *pMsgCount)
 {
   if ((index < 0) || (index >= m_folderList.GetSize())) {
     IMPORT_LOG0( "*** Bad mailbox identifier, unable to import\n");
-    *pAbort = PR_TRUE;
+    *pAbort = true;
     return( NS_ERROR_FAILURE);
   }
 
   PRInt32    dummyMsgCount = 0;
   if (pMsgCount)
     *pMsgCount = 0;
   else
     pMsgCount = &dummyMsgCount;
@@ -699,17 +699,17 @@ nsresult nsOutlookMail::CreateList( cons
         else
         {
           pDb->AddCardRowToDB( newRow);
         }
 
         //add card list
         pDb->AddListCardColumnsToRow(userCard,
                                      newListRow,idx+1, getter_AddRefs(newCard),
-                                     PR_TRUE, nsnull, nsnull);
+                                     true, nsnull, nsnull);
       }
     }
   }
   m_mapi.MAPIFreeBuffer(value);
 
   rv = pDb->AddCardRowToDB(newListRow);
   NS_ENSURE_SUCCESS(rv, rv);
 
@@ -869,10 +869,10 @@ bool nsOutlookMail::BuildCard( const PRU
             if (!line2.IsEmpty())
               pFieldMap->SetFieldValue( pDb, newRow, gMapiFields[i].multiLine, line2.get());
           }
         }
       }
     }
   }
 
-  return( PR_TRUE);
+  return( true);
 }
--- a/mailnews/import/outlook/src/nsOutlookSettings.cpp
+++ b/mailnews/import/outlook/src/nsOutlookSettings.cpp
@@ -108,46 +108,46 @@ NS_IMPL_ISUPPORTS1(nsOutlookSettings, ns
 NS_IMETHODIMP nsOutlookSettings::AutoLocate(PRUnichar **description, nsIFile **location, bool *_retval)
 {
     NS_PRECONDITION(description != nsnull, "null ptr");
     NS_PRECONDITION(_retval != nsnull, "null ptr");
   if (!description || !_retval)
     return( NS_ERROR_NULL_POINTER);
 
   *description = nsOutlookStringBundle::GetStringByID( OUTLOOKIMPORT_NAME);
-  *_retval = PR_FALSE;
+  *_retval = false;
 
   if (location)
     *location = nsnull;
 
   // look for the registry key for the accounts
   HKEY key = OutlookSettings::FindAccountsKey();
   if (key != nsnull) {
-    *_retval = PR_TRUE;
+    *_retval = true;
     ::RegCloseKey( key);
   }
 
   return( NS_OK);
 }
 
 NS_IMETHODIMP nsOutlookSettings::SetLocation(nsIFile *location)
 {
   return( NS_OK);
 }
 
 NS_IMETHODIMP nsOutlookSettings::Import(nsIMsgAccount **localMailAccount, bool *_retval)
 {
   NS_PRECONDITION( _retval != nsnull, "null ptr");
 
   if (OutlookSettings::DoImport( localMailAccount)) {
-    *_retval = PR_TRUE;
+    *_retval = true;
     IMPORT_LOG0( "Settings import appears successful\n");
   }
   else {
-    *_retval = PR_FALSE;
+    *_retval = false;
     IMPORT_LOG0( "Settings import returned FALSE\n");
   }
 
   return( NS_OK);
 }
 
 
 HKEY OutlookSettings::FindAccountsKey( void)
@@ -163,26 +163,26 @@ HKEY OutlookSettings::FindAccountsKey( v
   return( nsnull);
 }
 
 bool OutlookSettings::DoImport( nsIMsgAccount **ppAccount)
 {
   HKEY  hKey = FindAccountsKey();
   if (hKey == nsnull) {
     IMPORT_LOG0( "*** Error finding Outlook registry account keys\n");
-    return( PR_FALSE);
+    return( false);
   }
 
   nsresult  rv;
 
   nsCOMPtr<nsIMsgAccountManager> accMgr =
            do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
     if (NS_FAILED(rv)) {
     IMPORT_LOG0( "*** Failed to create a account manager!\n");
-    return( PR_FALSE);
+    return( false);
   }
 
   HKEY    subKey = NULL;
   nsCString  defMailName;
 
   if (::RegOpenKeyEx( HKEY_CURRENT_USER, "Software\\Microsoft\\Office\\Outlook\\OMI Account Manager", 0, KEY_QUERY_VALUE, &subKey) != ERROR_SUCCESS)
     if (::RegOpenKeyEx( HKEY_CURRENT_USER, "Software\\Microsoft\\Office\\8.0\\Outlook\\OMI Account Manager", 0, KEY_QUERY_VALUE, &subKey) != ERROR_SUCCESS)
       subKey = NULL;
@@ -291,17 +291,17 @@ nsresult OutlookSettings::GetAccountName
 bool OutlookSettings::DoIMAPServer( nsIMsgAccountManager *pMgr, HKEY hKey, char *pServerName, nsIMsgAccount **ppAccount)
 {
   if (ppAccount)
     *ppAccount = nsnull;
 
   BYTE *pBytes;
   pBytes = nsOutlookRegUtil::GetValueBytes( hKey, "IMAP User Name");
   if (!pBytes)
-    return( PR_FALSE);
+    return( false);
 
   bool    result = false;
 
   // I now have a user name/server name pair, find out if it already exists?
   nsCOMPtr<nsIMsgIncomingServer> in;
   nsresult rv = pMgr->FindServer( nsDependentCString((const char *)pBytes), nsDependentCString(pServerName), NS_LITERAL_CSTRING("imap"), getter_AddRefs( in));
   if (NS_FAILED( rv) || (in == nsnull)) {
     // Create the incoming server and an account for it?
@@ -320,39 +320,39 @@ bool OutlookSettings::DoIMAPServer( nsIM
       rv = pMgr->CreateAccount( getter_AddRefs( account));
       if (NS_SUCCEEDED( rv) && account) {
         rv = account->SetIncomingServer( in);
 
         IMPORT_LOG0( "Created an account and set the IMAP server as the incoming server\n");
 
         // Fiddle with the identities
         SetIdentities( pMgr, account, hKey);
-        result = PR_TRUE;
+        result = true;
         if (ppAccount)
           account->QueryInterface( NS_GET_IID(nsIMsgAccount), (void **)ppAccount);
       }
     }
   }
   else
-    result = PR_TRUE;
+    result = true;
 
   nsOutlookRegUtil::FreeValueBytes( pBytes);
 
   return( result);
 }
 
 bool OutlookSettings::DoPOP3Server( nsIMsgAccountManager *pMgr, HKEY hKey, char *pServerName, nsIMsgAccount **ppAccount)
 {
   if (ppAccount)
     *ppAccount = nsnull;
 
   BYTE *pBytes;
   pBytes = nsOutlookRegUtil::GetValueBytes( hKey, "POP3 User Name");
   if (!pBytes)
-    return( PR_FALSE);
+    return( false);
 
   bool result = false;
 
   // I now have a user name/server name pair, find out if it already exists?
   nsCOMPtr<nsIMsgIncomingServer> in;
   nsresult rv = pMgr->FindServer( nsDependentCString((const char *)pBytes), nsDependentCString(pServerName), NS_LITERAL_CSTRING("pop3"), getter_AddRefs( in));
   if (NS_FAILED( rv) || (in == nsnull)) {
     // Create the incoming server and an account for it?
@@ -371,30 +371,30 @@ bool OutlookSettings::DoPOP3Server( nsIM
             if (!localFoldersServer)
             {
                 // XXX: We may need to move this local folder creation code to the generic nsImportSettings code
                 // if the other import modules end up needing to do this too.
                 // if Local Folders does not exist already, create it
                 rv = pMgr->CreateLocalMailAccount();
                 if (NS_FAILED(rv)) {
                     IMPORT_LOG0( "*** Failed to create Local Folders!\n");
-                    return PR_FALSE;
+                    return false;
                 }
                 pMgr->GetLocalFoldersServer(getter_AddRefs(localFoldersServer));
             }
 
             // now get the account for this server
             nsCOMPtr<nsIMsgAccount> localFoldersAccount;
             pMgr->FindAccountForServer(localFoldersServer, getter_AddRefs(localFoldersAccount));
             if (localFoldersAccount)
             {
               nsCString localFoldersAcctKey;
               localFoldersAccount->GetKey(localFoldersAcctKey);
               pop3Server->SetDeferredToAccount(localFoldersAcctKey);
-              pop3Server->SetDeferGetNewMail(PR_TRUE);
+              pop3Server->SetDeferGetNewMail(true);
             }
         }
 
         IMPORT_LOG2( "Created POP3 server named: %s, userName: %s\n", pServerName, (char *)pBytes);
 
         nsString prettyName;
         if (NS_SUCCEEDED(GetAccountName(hKey, pServerName, prettyName)))
           rv = in->SetPrettyName( prettyName);
@@ -406,40 +406,40 @@ bool OutlookSettings::DoPOP3Server( nsIM
 
       IMPORT_LOG0( "Created a new account and set the incoming server to the POP3 server.\n");
 
         nsCOMPtr<nsIPop3IncomingServer> pop3Server = do_QueryInterface(in, &rv);
         NS_ENSURE_SUCCESS(rv,rv);
         BYTE *pLeaveOnServer = nsOutlookRegUtil::GetValueBytes( hKey, "Leave Mail On Server");
         if (pLeaveOnServer)
         {
-          pop3Server->SetLeaveMessagesOnServer(*pLeaveOnServer == 1 ? PR_TRUE : PR_FALSE);
+          pop3Server->SetLeaveMessagesOnServer(*pLeaveOnServer == 1 ? true : false);
           nsOutlookRegUtil::FreeValueBytes(pLeaveOnServer);
         }
 
         // Fiddle with the identities
         SetIdentities( pMgr, account, hKey);
-        result = PR_TRUE;
+        result = true;
         if (ppAccount)
           account->QueryInterface( NS_GET_IID(nsIMsgAccount), (void **)ppAccount);
       }
     }
   }
   else
-    result = PR_TRUE;
+    result = true;
 
   nsOutlookRegUtil::FreeValueBytes( pBytes);
 
   return( result);
 }
 
 bool OutlookSettings::IdentityMatches( nsIMsgIdentity *pIdent, const char *pName, const char *pServer, const char *pEmail, const char *pReply, const char *pUserName)
 {
   if (!pIdent)
-    return( PR_FALSE);
+    return( false);
 
   char *  pIName = nsnull;
   nsCString pIEmail;
   nsCString pIReply;
 
   bool    result = true;
 
   // The test here is:
@@ -451,19 +451,19 @@ bool OutlookSettings::IdentityMatches( n
 
   nsresult rv;
   rv = pIdent->GetEmail(pIEmail);
   rv = pIdent->GetReplyTo(pIReply);
 
 
   // for now, if it's the same server and reply to and email then it matches
   if (pReply && !pIReply.Equals(pReply, nsCaseInsensitiveCStringComparator()))
-    result = PR_FALSE;
+    result = false;
   if (pEmail && !pIEmail.Equals(pEmail, nsCaseInsensitiveCStringComparator()))
-    result = PR_FALSE;
+    result = false;
 
   return( result);
 }
 
 void OutlookSettings::SetIdentities( nsIMsgAccountManager *pMgr, nsIMsgAccount *pAcc, HKEY hKey)
 {
   // Get the relevant information for an identity
   char *pName = (char *)nsOutlookRegUtil::GetValueBytes( hKey, "SMTP Display Name");
--- a/mailnews/import/src/ImportCharSet.h
+++ b/mailnews/import/src/ImportCharSet.h
@@ -174,19 +174,19 @@ public:
     else
       return( -1);
   }
 
   inline static bool NextChar( const PRUint8 * & pChar, PRUint8 ch, PRUint32& pos, PRUint32 max) {
     if ((pos < max) && (*pChar == ch)) {
       pos++;
       pChar++;
-      return( PR_TRUE);
+      return( true);
     }
-    return( PR_FALSE);
+    return( false);
   }
 
   inline static PRInt32 strcmp( const char * pS1, const char * pS2) {
     while (*pS1 && *pS2 && (*pS1 == *pS2)) {
       pS1++;
       pS2++;
     }
     return( *pS1 - *pS2);
--- a/mailnews/import/src/ImportOutFile.cpp
+++ b/mailnews/import/src/ImportOutFile.cpp
@@ -53,31 +53,31 @@
 #else
 #define  kMacNoCreator    0
 #define kMacTextFile    0
 #endif
 */
 
 ImportOutFile::ImportOutFile()
 {
-  m_ownsFileAndBuffer = PR_FALSE;
+  m_ownsFileAndBuffer = false;
   m_pos = 0;
   m_pBuf = nsnull;
   m_bufSz = 0;
   m_pTrans = nsnull;
   m_pTransOut = nsnull;
   m_pTransBuf = nsnull;
 }
 
 ImportOutFile::ImportOutFile( nsIFile *pFile, PRUint8 * pBuf, PRUint32 sz)
 {
   m_pTransBuf = nsnull;
   m_pTransOut = nsnull;
   m_pTrans = nsnull;
-  m_ownsFileAndBuffer = PR_FALSE;
+  m_ownsFileAndBuffer = false;
   InitOutFile( pFile, pBuf, sz);
 }
 
 ImportOutFile::~ImportOutFile()
 {
   if (m_ownsFileAndBuffer)
   {
     Flush();
@@ -87,30 +87,30 @@ ImportOutFile::~ImportOutFile()
   delete m_pTrans;
   delete m_pTransOut;
   delete m_pTransBuf;
 }
 
 bool ImportOutFile::Set8bitTranslator( nsImportTranslator *pTrans)
 {
   if (!Flush())
-    return( PR_FALSE);
+    return( false);
 
-  m_engaged = PR_FALSE;
+  m_engaged = false;
   m_pTrans = pTrans;
   m_supports8to7 = pTrans->Supports8bitEncoding();
 
 
-  return( PR_TRUE);
+  return( true);
 }
 
 bool ImportOutFile::End8bitTranslation( bool *pEngaged, nsCString& useCharset, nsCString& encoding)
 {
   if (!m_pTrans)
-    return( PR_FALSE);
+    return( false);
 
 
   bool bResult = Flush();
   if (m_supports8to7 && m_pTransOut) {
     if (bResult)
       bResult = m_pTrans->FinishConvertToFile( m_pTransOut);
     if (bResult)
       bResult = Flush();
@@ -149,184 +149,184 @@ bool ImportOutFile::InitOutFile( nsIFile
                                    PR_CREATE_FILE | PR_WRONLY | PR_TRUNCATE,
                                    0644);
 
     if (NS_FAILED( rv))
                 {
       IMPORT_LOG0( "Couldn't create outfile\n");
       delete [] m_pBuf;
       m_pBuf = nsnull;
-      return( PR_FALSE);
+      return( false);
     }
   }
   m_pFile = pFile;
-  m_ownsFileAndBuffer = PR_TRUE;
+  m_ownsFileAndBuffer = true;
   m_pos = 0;
   m_bufSz = bufSz;
-  return( PR_TRUE);
+  return( true);
 }
 
 void ImportOutFile::InitOutFile( nsIFile *pFile, PRUint8 * pBuf, PRUint32 sz)
 {
-  m_ownsFileAndBuffer = PR_FALSE;
+  m_ownsFileAndBuffer = false;
   m_pFile = pFile;
   m_pBuf = pBuf;
   m_bufSz = sz;
   m_pos = 0;
 }
 
 
 
 bool ImportOutFile::Flush( void)
 {
   if (!m_pos)
-    return( PR_TRUE);
+    return( true);
 
   PRUint32  transLen;
   bool      duddleyDoWrite = false;
 
   // handle translations if appropriate
   if (m_pTrans) {
     if (m_engaged && m_supports8to7) {
       // Markers can get confused by this crap!!!
       // TLR: FIXME: Need to update the markers based on
       // the difference between the translated len and untranslated len
 
       if (!m_pTrans->ConvertToFile(  m_pBuf, m_pos, m_pTransOut, &transLen))
-        return( PR_FALSE);
+        return( false);
       if (!m_pTransOut->Flush())
-        return( PR_FALSE);
+        return( false);
       // now update our buffer...
       if (transLen < m_pos) {
         memcpy( m_pBuf, m_pBuf + transLen, m_pos - transLen);
       }
       m_pos -= transLen;
     }
     else if (m_engaged) {
       // does not actually support translation!
-      duddleyDoWrite = PR_TRUE;
+      duddleyDoWrite = true;
     }
     else {
       // should we engage?
       PRUint8 *  pChar = m_pBuf;
       PRUint32  len = m_pos;
       while (len) {
         if (!ImportCharSet::IsUSAscii( *pChar))
           break;
         pChar++;
         len--;
       }
       if (len) {
-        m_engaged = PR_TRUE;
+        m_engaged = true;
         if (m_supports8to7) {
           // allocate our translation output buffer and file...
           m_pTransBuf = new PRUint8[m_bufSz];
           m_pTransOut = new ImportOutFile( m_pFile, m_pTransBuf, m_bufSz);
           return( Flush());
         }
         else
-          duddleyDoWrite = PR_TRUE;
+          duddleyDoWrite = true;
       }
       else {
-        duddleyDoWrite = PR_TRUE;
+        duddleyDoWrite = true;
       }
     }
   }
   else
-    duddleyDoWrite = PR_TRUE;
+    duddleyDoWrite = true;
 
   if (duddleyDoWrite) {
     PRUint32 written = 0;
     nsresult rv = m_outputStream->Write( (const char *)m_pBuf, (PRInt32)m_pos, &written);
     if (NS_FAILED( rv) || ((PRUint32)written != m_pos))
-      return( PR_FALSE);
+      return( false);
     m_pos = 0;
   }
 
-  return( PR_TRUE);
+  return( true);
 }
 
 bool ImportOutFile::WriteU8NullTerm( const PRUint8 * pSrc, bool includeNull)
 {
   while (*pSrc) {
     if (m_pos >= m_bufSz) {
       if (!Flush())
-        return( PR_FALSE);
+        return( false);
     }
     *(m_pBuf + m_pos) = *pSrc;
     m_pos++;
     pSrc++;
   }
   if (includeNull) {
     if (m_pos >= m_bufSz) {
       if (!Flush())
-        return( PR_FALSE);
+        return( false);
     }
     *(m_pBuf + m_pos) = 0;
     m_pos++;
   }
 
-  return( PR_TRUE);
+  return( true);
 }
 
 bool ImportOutFile::SetMarker( int markerID)
 {
   if (!Flush()) {
-    return( PR_FALSE);
+    return( false);
   }
 
   if (markerID < kMaxMarkers) {
     PRInt64 pos = 0;
     if (m_outputStream)
                 {
                   // do we need to flush for the seek to give us the right pos?
                   m_outputStream->Flush();
                   nsresult rv;
                   nsCOMPtr <nsISeekableStream> seekStream = do_QueryInterface(m_outputStream, &rv);
-                  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+                  NS_ENSURE_SUCCESS(rv, false);
       rv = seekStream->Tell( &pos);
       if (NS_FAILED( rv)) {
         IMPORT_LOG0( "*** Error, Tell failed on output stream\n");
-        return( PR_FALSE);
+        return( false);
       }
     }
     m_markers[markerID] = (PRUint32)pos + m_pos;
   }
 
-  return( PR_TRUE);
+  return( true);
 }
 
 void ImportOutFile::ClearMarker( int markerID)
 {
   if (markerID < kMaxMarkers)
     m_markers[markerID] = 0;
 }
 
 bool ImportOutFile::WriteStrAtMarker( int markerID, const char *pStr)
 {
   if (markerID >= kMaxMarkers)
-    return( PR_FALSE);
+    return( false);
 
   if (!Flush())
-    return( PR_FALSE);
+    return( false);
   PRInt64    pos;
         m_outputStream->Flush();
         nsresult rv;
         nsCOMPtr <nsISeekableStream> seekStream = do_QueryInterface(m_outputStream, &rv);
-        NS_ENSURE_SUCCESS(rv, PR_FALSE);
+        NS_ENSURE_SUCCESS(rv, false);
   rv = seekStream->Tell( &pos);
   if (NS_FAILED( rv))
-    return( PR_FALSE);
+    return( false);
   rv = seekStream->Seek(nsISeekableStream::NS_SEEK_SET, (PRInt32) m_markers[markerID]);
   if (NS_FAILED( rv))
-    return( PR_FALSE);
+    return( false);
   PRUint32 written;
   rv = m_outputStream->Write( pStr, strlen( pStr), &written);
   if (NS_FAILED( rv))
-    return( PR_FALSE);
+    return( false);
 
   rv = seekStream->Seek(nsISeekableStream::NS_SEEK_SET, pos);
   if (NS_FAILED( rv))
-    return( PR_FALSE);
+    return( false);
 
-  return( PR_TRUE);
+  return( true);
 }
 
--- a/mailnews/import/src/ImportOutFile.h
+++ b/mailnews/import/src/ImportOutFile.h
@@ -95,32 +95,32 @@ inline bool    ImportOutFile::WriteData(
   while ((len + m_pos) > m_bufSz) {
     if ((m_bufSz - m_pos)) {
       memcpy( m_pBuf + m_pos, pSrc, m_bufSz - m_pos);
       len -= (m_bufSz - m_pos);
       pSrc += (m_bufSz - m_pos);
       m_pos = m_bufSz;
     }
     if (!Flush())
-      return( PR_FALSE);
+      return( false);
   }
 
   if (len) {
     memcpy( m_pBuf + m_pos, pSrc, len);
     m_pos += len;
   }
 
-  return( PR_TRUE);
+  return( true);
 }
 
 inline bool    ImportOutFile::WriteByte( PRUint8 byte) {
   if (m_pos == m_bufSz) {
     if (!Flush())
-      return( PR_FALSE);
+      return( false);
   }
   *(m_pBuf + m_pos) = byte;
   m_pos++;
-  return( PR_TRUE);
+  return( true);
 }
 
 #endif /* ImportOutFile_h__ */
 
 
--- a/mailnews/import/src/ImportTranslate.cpp
+++ b/mailnews/import/src/ImportTranslate.cpp
@@ -39,17 +39,17 @@
 
 int ImportTranslate::m_useTranslator = -1;
 
 
 bool ImportTranslate::ConvertString( const nsCString& inStr, nsCString& outStr, bool mimeHeader)
 {
   if (inStr.IsEmpty()) {
     outStr = inStr;
-    return( PR_TRUE);
+    return( true);
   }
 
   nsImportTranslator *pTrans = GetTranslator();
   // int      maxLen = (int) pTrans->GetMaxBufferSize( inStr.Length());
   // int      hLen = 0;
   nsCString  set;
   nsCString  lang;
 
@@ -94,17 +94,17 @@ bool ImportTranslate::ConvertString( con
     outStr = set;
     outStr += "'";
     outStr += lang;
     outStr += "'";
   }
   outStr += (const char *)pBuf;
   delete [] pBuf;
 
-  return( PR_TRUE);
+  return( true);
 }
 
 
 nsImportTranslator *ImportTranslate::GetTranslator( void)
 {
   if (m_useTranslator == -1) {
     // get the translator to use...
     // CString    trans;
--- a/mailnews/import/src/nsImportABDescriptor.cpp
+++ b/mailnews/import/src/nsImportABDescriptor.cpp
@@ -56,11 +56,11 @@ NS_METHOD nsImportABDescriptor::Create( 
   nsresult rv = it->QueryInterface( aIID, aResult);
   NS_RELEASE( it);
   return rv;
 }
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsImportABDescriptor, nsIImportABDescriptor)
 
 nsImportABDescriptor::nsImportABDescriptor()
-  : mId(0), mRef(0), mSize(0), mImport(PR_TRUE)
+  : mId(0), mRef(0), mSize(0), mImport(true)
 {
 }
--- a/mailnews/import/src/nsImportAddressBooks.cpp
+++ b/mailnews/import/src/nsImportAddressBooks.cpp
@@ -166,26 +166,26 @@ nsresult NS_NewGenericAddressBooks(nsIIm
 
 nsImportGenericAddressBooks::nsImportGenericAddressBooks()
 {
   m_pInterface = nsnull;
   m_pBooks = nsnull;
   m_pSuccessLog = nsnull;
   m_pErrorLog = nsnull;
   m_totalSize = 0;
-  m_doImport = PR_FALSE;
+  m_doImport = false;
   m_pThreadData = nsnull;
   m_pDestinationUri = nsnull;
   m_pFieldMap = nsnull;
 
-  m_autoFind = PR_FALSE;
+  m_autoFind = false;
   m_description = nsnull;
-  m_gotLocation = PR_FALSE;
-  m_found = PR_FALSE;
-  m_userVerify = PR_FALSE;
+  m_gotLocation = false;
+  m_found = false;
+  m_userVerify = false;
 
   nsImportStringBundle::GetStringBundle(IMPORT_MSGS_URL, getter_AddRefs(m_stringBundle));
 }
 
 
 nsImportGenericAddressBooks::~nsImportGenericAddressBooks()
 {
   if (m_pDestinationUri)
@@ -397,20 +397,20 @@ void nsImportGenericAddressBooks::GetDef
 
   if ((m_pLocation && m_gotLocation) || m_autoFind)
     return;
 
   if (m_description)
     NS_Free( m_description);
   m_description = nsnull;
   m_pInterface->GetAutoFind( &m_description, &m_autoFind);
-  m_gotLocation = PR_TRUE;
+  m_gotLocation = true;
   if (m_autoFind) {
-    m_found = PR_TRUE;
-    m_userVerify = PR_FALSE;
+    m_found = true;
+    m_userVerify = false;
     return;
   }
 
   nsCOMPtr <nsIFile> pLoc;
   m_pInterface->GetDefaultLocation( getter_AddRefs(pLoc), &m_found, &m_userVerify);
   if (!m_pLocation)
     m_pLocation = pLoc;
 }
@@ -478,22 +478,22 @@ NS_IMETHODIMP nsImportGenericAddressBook
     PRUint32    i;
     bool        import;
     PRUint32    size;
 
     for (i = 0; i < count; i++) {
       nsCOMPtr<nsIImportABDescriptor> book =
         do_QueryElementAt(m_pBooks, i);
       if (book) {
-        import = PR_FALSE;
+        import = false;
         size = 0;
         rv = book->GetImport( &import);
         if (import) {
           rv = book->GetSize( &size);
-          result = PR_TRUE;
+          result = true;
         }
         totalSize += size;
       }
     }
 
     m_totalSize = totalSize;
   }
 
@@ -576,17 +576,17 @@ already_AddRefed<nsIAddrDatabase> GetAdd
           IMPORT_LOG0( "Getting the address database factory\n");
 
           nsCOMPtr<nsIAddrDatabase> addrDBFactory =
             do_GetService(NS_ADDRDATABASE_CONTRACTID, &rv);
           if (NS_FAILED(rv))
             return nsnull;
 
           IMPORT_LOG0( "Opening the new address book\n");
-          rv = addrDBFactory->Open(dbPath, PR_TRUE, PR_TRUE,
+          rv = addrDBFactory->Open(dbPath, true, true,
                                    &pDatabase);
         }
       }
     }
   }
   if (NS_FAILED(rv))
   {
     IMPORT_LOG0( "Failed to get the user profile directory from the address book session\n");
@@ -631,39 +631,39 @@ NS_IMETHODIMP nsImportGenericAddressBook
   NS_PRECONDITION(_retval != nsnull, "null ptr");
     if (!_retval)
         return NS_ERROR_NULL_POINTER;
 
   nsString  success;
   nsString  error;
 
   if (!m_doImport) {
-    *_retval = PR_TRUE;
+    *_retval = true;
     nsImportStringBundle::GetStringByID(IMPORT_NO_ADDRBOOKS, m_stringBundle,
                                         success);
     SetLogs( success, error, successLog, errorLog);
     return( NS_OK);
   }
 
   if (!m_pInterface || !m_pBooks) {
     nsImportStringBundle::GetStringByID(IMPORT_ERROR_AB_NOTINITIALIZED,
                                         m_stringBundle, error);
     SetLogs( success, error, successLog, errorLog);
-    *_retval = PR_FALSE;
+    *_retval = false;
     return( NS_OK);
   }
 
   bool needsFieldMap = false;
 
   if (NS_FAILED(m_pInterface->GetNeedsFieldMap(m_pLocation, &needsFieldMap)) ||
       (needsFieldMap && !m_pFieldMap)) {
     nsImportStringBundle::GetStringByID(IMPORT_ERROR_AB_NOTINITIALIZED,
                                         m_stringBundle, error);
     SetLogs(success, error, successLog, errorLog);
-    *_retval = PR_FALSE;
+    *_retval = false;
     return NS_OK;
   }
 
   NS_IF_RELEASE( m_pSuccessLog);
   NS_IF_RELEASE( m_pErrorLog);
   m_pSuccessLog = successLog;
   m_pErrorLog = errorLog;
   NS_IF_ADDREF( m_pSuccessLog);
@@ -697,46 +697,46 @@ NS_IMETHODIMP nsImportGenericAddressBook
   {
     nsCOMPtr<nsIImportABDescriptor> book = do_QueryElementAt(m_pBooks, i);
     if (book)
     {
       if (!db)
       {
         nsString name;
         book->GetPreferredName(name);
-        db = GetAddressBook(name.get(), PR_TRUE);
+        db = GetAddressBook(name.get(), true);
       }
       m_DBs.AppendObject(db);
     }
   }
   m_pThreadData->dBs = &m_DBs;
 
   NS_IF_ADDREF(m_pThreadData->stringBundle = m_stringBundle);
 
   nsresult rv;
   m_pThreadData->ldifService = do_GetService(NS_ABLDIFSERVICE_CONTRACTID, &rv);
 
   ImportAddressThread(m_pThreadData);
   delete m_pThreadData;
   m_pThreadData = nsnull;
-  *_retval = PR_TRUE;
+  *_retval = true;
 
   return( NS_OK);
 }
 
 NS_IMETHODIMP nsImportGenericAddressBooks::ContinueImport(bool *_retval)
 {
     NS_PRECONDITION(_retval != nsnull, "null ptr");
     if (!_retval)
         return NS_ERROR_NULL_POINTER;
 
-  *_retval = PR_TRUE;
+  *_retval = true;
   if (m_pThreadData) {
     if (m_pThreadData->fatalError)
-      *_retval = PR_FALSE;
+      *_retval = false;
   }
 
   return( NS_OK);
 }
 
 
 NS_IMETHODIMP nsImportGenericAddressBooks::GetProgress(PRInt32 *_retval)
 {
@@ -773,30 +773,30 @@ NS_IMETHODIMP nsImportGenericAddressBook
 
   return( NS_OK);
 }
 
 
 NS_IMETHODIMP nsImportGenericAddressBooks::CancelImport(void)
 {
   if (m_pThreadData) {
-    m_pThreadData->abort = PR_TRUE;
+    m_pThreadData->abort = true;
     m_pThreadData = nsnull;
   }
 
   return( NS_OK);
 }
 
 
 AddressThreadData::AddressThreadData()
 {
-  fatalError = PR_FALSE;
-  driverAlive = PR_TRUE;
-  threadAlive = PR_TRUE;
-  abort = PR_FALSE;
+  fatalError = false;
+  driverAlive = true;
+  threadAlive = true;
+  abort = false;
   currentTotal = 0;
   currentSize = 0;
   books = nsnull;
   addressImport = nsnull;
   successLog = nsnull;
   errorLog = nsnull;
   pDestinationUri = nsnull;
   fieldMap = nsnull;
@@ -845,17 +845,17 @@ static void ImportAddressThread( void *s
 
   nsString          success;
   nsString          error;
 
   for (i = 0; (i < count) && !(pData->abort); i++) {
     nsCOMPtr<nsIImportABDescriptor> book =
       do_QueryElementAt(pData->books, i);
     if (book) {
-      import = PR_FALSE;
+      import = false;
       size = 0;
       rv = book->GetImport( &import);
       if (import)
         rv = book->GetSize( &size);
 
       if (size && import) {
         nsString name;
         book->GetPreferredName(name);
@@ -902,20 +902,20 @@ static void ImportAddressThread( void *s
         else {
           nsImportGenericAddressBooks::ReportError(name.get(), &error, pData->stringBundle);
         }
 
         pData->currentSize = 0;
         pData->currentTotal += size;
 
         if (db)
-          db->Close(PR_TRUE);
+          db->Close(true);
 
         if (fatalError) {
-          pData->fatalError = PR_TRUE;
+          pData->fatalError = true;
           break;
         }
       }
     }
   }
 
 
   nsImportGenericAddressBooks::SetLogs( success, error, pData->successLog, pData->errorLog);
--- a/mailnews/import/src/nsImportEncodeScan.cpp
+++ b/mailnews/import/src/nsImportEncodeScan.cpp
@@ -85,17 +85,17 @@ U32 Get2000Secs( void)
   U32  result;
   DateToSeconds( &dr, &result);
   return( result);
 }
 #endif
 
 nsImportEncodeScan::nsImportEncodeScan()
 {
-  m_isAppleSingle = PR_FALSE;
+  m_isAppleSingle = false;
   m_encodeScanState = 0;
   m_resourceForkSize = 0;
   m_dataForkSize = 0;
 }
 
 nsImportEncodeScan::~nsImportEncodeScan()
 {
 }
@@ -109,30 +109,30 @@ bool nsImportEncodeScan::InitEncodeScan(
   m_useFileName = pName;
   m_pBuf = pBuf;
   m_bufSz = sz;
   if (!m_isAppleSingle)
         {
     if (!m_inputStream)
                 {
                   nsresult rv = NS_NewLocalFileInputStream(getter_AddRefs(m_inputStream), m_pInputFile);
-                  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+                  NS_ENSURE_SUCCESS(rv, false);
     }
 
     InitScan( m_inputStream, pBuf, sz);
   }
   else {
   #ifdef _MAC_IMPORT_CODE
     // Fill in the file sizes
     m_resourceForkSize = fileLoc.GetMacFileSize( UFileLocation::eResourceFork);
     m_dataForkSize = fileLoc.GetMacFileSize( UFileLocation::eDataFork);
   #endif
   }
 
-  return( PR_TRUE);
+  return( true);
 }
 
 void nsImportEncodeScan::CleanUpEncodeScan( void)
 {
   m_pInputStream->Close();
   m_pInputStream = nsnull;
   m_pInputFile = nsnull;
 }
@@ -266,36 +266,36 @@ bool nsImportEncodeScan::AddEntries( voi
   dates[0] = 0;
   if ((gCatInfoPB.hFileInfo.ioFlAttrib & 1) != 0)
     dates[0] |= 1;
   MemCpy( m_pBuf + m_bytesInBuf, dates, 4);
   m_bytesInBuf += 4;
 
 
 #endif
-  return( PR_TRUE);
+  return( true);
 }
 
 bool nsImportEncodeScan::Scan( bool *pDone)
 {
   nsresult  rv;
 
-  *pDone = PR_FALSE;
+  *pDone = false;
   if (m_isAppleSingle) {
     // Stuff the buffer with things needed to encode the file...
     // then just allow UScanFile to handle each fork, but be careful
     // when handling eof.
     switch( m_encodeScanState) {
       case kBeginAppleSingle: {
 #ifdef _MAC_IMPORT_CODE
         OSErr err = GetCatInfoNoName( m_inputFileLoc.GetVRefNum(), m_inputFileLoc.GetParID(), m_inputFileLoc.GetFileNamePtr(), &gCatInfoPB);
         if (err != noErr)
           return( FALSE);
 #endif
-        m_eof = PR_FALSE;
+        m_eof = false;
         m_pos = 0;
         memcpy( m_pBuf, gAppleSingleHeader, kAppleSingleHeaderSize);
         m_bytesInBuf = kAppleSingleHeaderSize;
         int numEntries = 5;
         if (m_dataForkSize)
           numEntries++;
         if (m_resourceForkSize)
           numEntries++;
@@ -305,102 +305,102 @@ bool nsImportEncodeScan::Scan( bool *pDo
         m_encodeScanState = kAddEntries;
         return( ScanBuffer( pDone));
       }
       break;
 
       case kBeginDataFork: {
         if (!m_dataForkSize) {
           m_encodeScanState = kDoneWithFile;
-          return( PR_TRUE);
+          return( true);
         }
         // Initialize the scan of the data fork...
         if (!m_inputStream)
                                 {
                                   rv = NS_NewLocalFileInputStream(getter_AddRefs(m_inputStream), m_pInputFile);
-                                  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+                                  NS_ENSURE_SUCCESS(rv, false);
                                 }
         m_encodeScanState = kScanningDataFork;
-        return( PR_TRUE);
+        return( true);
       }
       break;
 
       case kScanningDataFork: {
         bool result = FillBufferFromFile();
         if (!result)
-          return( PR_FALSE);
+          return( false);
         if (m_eof) {
-          m_eof = PR_FALSE;
+          m_eof = false;
           result = ScanBuffer( pDone);
           if (!result)
-            return( PR_FALSE);
+            return( false);
           m_inputStream->Close();
                                         m_inputStream = nsnull;
           m_encodeScanState = kDoneWithFile;
-          return( PR_TRUE);
+          return( true);
         }
         else
           return( ScanBuffer( pDone));
       }
       break;
 
       case kScanningRsrcFork: {
         bool result = FillBufferFromFile();
         if (!result)
-          return( PR_FALSE);
+          return( false);
         if (m_eof) {
-          m_eof = PR_FALSE;
+          m_eof = false;
           result = ScanBuffer( pDone);
           if (!result)
-            return( PR_FALSE);
+            return( false);
           m_inputStream->Close();
                                         m_inputStream = nsnull;
           m_encodeScanState = kBeginDataFork;
-          return( PR_TRUE);
+          return( true);
         }
         else
           return( ScanBuffer( pDone));
       }
       break;
 
       case kBeginResourceFork: {
         if (!m_resourceForkSize) {
           m_encodeScanState = kBeginDataFork;
-          return( PR_TRUE);
+          return( true);
         }
         /*
         // FIXME: Open the resource fork on the Mac!!!
         m_fH = UFile::OpenRsrcFileRead( m_inputFileLoc);
         if (m_fH == TR_FILE_ERROR)
           return( FALSE);
         */
         m_encodeScanState = kScanningRsrcFork;
-        return( PR_TRUE);
+        return( true);
       }
       break;
 
       case kAddEntries: {
         ShiftBuffer();
         if (!AddEntries())
-          return( PR_FALSE);
+          return( false);
         m_encodeScanState = kBeginResourceFork;
         return( ScanBuffer( pDone));
       }
       break;
 
       case kDoneWithFile: {
         ShiftBuffer();
-        m_eof = PR_TRUE;
+        m_eof = true;
         if (!ScanBuffer( pDone))
-          return( PR_FALSE);
-        *pDone = PR_TRUE;
-        return( PR_TRUE);
+          return( false);
+        *pDone = true;
+        return( true);
       }
       break;
     }
 
   }
   else
     return( nsImportScanFile::Scan( pDone));
 
-  return( PR_FALSE);
+  return( false);
 }
 
--- a/mailnews/import/src/nsImportFieldMap.cpp
+++ b/mailnews/import/src/nsImportFieldMap.cpp
@@ -154,17 +154,17 @@ NS_IMETHODIMP nsImportFieldMap::SetField
 
 NS_IMETHODIMP nsImportFieldMap::DefaultFieldMap(PRInt32 size)
 {
   nsresult rv = SetFieldMapSize( size);
   if (NS_FAILED( rv))
     return( rv);
   for (PRInt32 i = 0; i < size; i++) {
     m_pFields[i] = i;
-    m_pActive[i] = PR_TRUE;
+    m_pActive[i] = true;
   }
 
   return( NS_OK);
 }
 
 NS_IMETHODIMP nsImportFieldMap::GetFieldMap(PRInt32 index, PRInt32 *_retval)
 {
     NS_PRECONDITION(_retval != nsnull, "null ptr");
@@ -569,17 +569,17 @@ nsresult nsImportFieldMap::Allocate( PRI
   if (!pActive) {
     delete [] pData;
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   PRInt32  i;
   for (i = 0; i < sz; i++) {
     pData[i] = -1;
-    pActive[i] = PR_TRUE;
+    pActive[i] = true;
   }
   if (m_numFields) {
     for (i = 0; i < m_numFields; i++) {
       pData[i] = m_pFields[i];
       pActive[i] = m_pActive[i];
     }
     delete [] m_pFields;
     delete [] m_pActive;
--- a/mailnews/import/src/nsImportMailboxDescriptor.cpp
+++ b/mailnews/import/src/nsImportMailboxDescriptor.cpp
@@ -59,14 +59,14 @@ NS_METHOD nsImportMailboxDescriptor::Cre
   NS_RELEASE( it);
   return rv;
 }
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsImportMailboxDescriptor, nsIImportMailboxDescriptor)
 
 nsImportMailboxDescriptor::nsImportMailboxDescriptor()
 {
-  m_import = PR_TRUE;
+  m_import = true;
   m_size = 0;
   m_depth = 0;
   m_id = 0;
         m_pFile = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID);
 }
--- a/mailnews/import/src/nsImportMimeEncode.cpp
+++ b/mailnews/import/src/nsImportMimeEncode.cpp
@@ -80,32 +80,32 @@ void nsImportMimeEncode::CleanUp( void)
 
 bool nsImportMimeEncode::SetUpEncode( void)
 {
   nsCString    errStr;
   if (!m_pInputBuf) {
     m_pInputBuf = new PRUint8[kEncodeBufferSz];
   }
 
-  m_appleSingle = PR_FALSE;
+  m_appleSingle = false;
 
 #ifdef _MAC_IMPORT_CODE
   // First let's see just what kind of beast we have?
   // For files with only a data fork and a known mime type
   // proceed with normal mime encoding just as on the PC.
   // For unknown mime types and files with both forks,
   // encode as AppleSingle format.
   if (m_filePath.GetMacFileSize( UFileLocation::eResourceFork) || !pMimeType) {
     m_appleSingle = TRUE;
     m_mimeType = "application/applefile";
   }
 #endif
 
   if (!InitEncodeScan( m_appleSingle, m_pMimeFile, m_fileName.get(), m_pInputBuf, kEncodeBufferSz)) {
-    return( PR_FALSE);
+    return( false);
   }
 
   m_state = kEncodeState;
   m_lineLen = 0;
 
   // Write out the boundary header
   bool bResult = true;
   bResult = m_pOut->WriteStr( "Content-type: ");
@@ -155,42 +155,42 @@ bool nsImportMimeEncode::SetUpEncode( vo
     CleanUp();
   }
 
   return( bResult);
 }
 
 bool nsImportMimeEncode::DoWork( bool *pDone)
 {
-  *pDone = PR_FALSE;
+  *pDone = false;
   switch( m_state) {
   case kNoState:
-    return( PR_FALSE);
+    return( false);
     break;
   case kStartState:
     return( SetUpEncode());
     break;
   case kEncodeState:
     if (!Scan( pDone)) {
       CleanUp();
-      return( PR_FALSE);
+      return( false);
     }
     if (*pDone) {
-      *pDone = PR_FALSE;
+      *pDone = false;
       m_state = kDoneState;
     }
     break;
   case kDoneState:
     CleanUp();
     m_state = kNoState;
-    *pDone = PR_TRUE;
+    *pDone = true;
     break;
   }
 
-  return( PR_TRUE);
+  return( true);
 }
 
 static PRUint8 gBase64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 
 bool nsImportMimeEncode::ScanBuffer( bool *pDone)
 {
 
   PRUint32  pos = m_pos;
@@ -204,23 +204,23 @@ bool nsImportMimeEncode::ScanBuffer( boo
     // Encode 3 bytes
     byte[0] = gBase64[*pChar >> 2];
     byte[1] = gBase64[(((*pChar) & 0x3)<< 4) | (((*(pChar + 1)) & 0xF0) >> 4)];
     pChar++;
     byte[2] = gBase64[(((*pChar) & 0xF) << 2) | (((*(pChar + 1)) & 0xC0) >>6)];
     pChar++;
     byte[3] = gBase64[(*pChar) & 0x3F];
     if (!m_pOut->WriteData( byte, 4))
-      return( PR_FALSE);
+      return( false);
     pos += 3;
     pChar++;
     lineLen += 4;
     if (lineLen > 71) {
       if (!m_pOut->WriteEol())
-        return( PR_FALSE);
+        return( false);
       lineLen = 0;
     }
   }
 
   if ((pos < max) && m_eof) {
     // Get the last few bytes!
     byte[0] = gBase64[*pChar >> 2];
     pos++;
@@ -242,61 +242,61 @@ bool nsImportMimeEncode::ScanBuffer( boo
     }
     else {
       byte[1] = gBase64[(((*pChar) & 0x3)<< 4)];
       byte[2] = '=';
       byte[3] = '=';
     }
 
     if (!m_pOut->WriteData( byte, 4))
-      return( PR_FALSE);
+      return( false);
     if (!m_pOut->WriteEol())
-      return( PR_FALSE);
+      return( false);
   }
   else if (m_eof) {
     /*
     byte[0] = '=';
     if (!m_pOut->WriteData( byte, 1))
       return( FALSE);
     */
     if (!m_pOut->WriteEol())
-      return( PR_FALSE);
+      return( false);
   }
 
   m_lineLen = (int) lineLen;
   m_pos = pos;
   m_bytesProcessed += (pos - start);
-  return( PR_TRUE);
+  return( true);
 }
 
 bool nsImportMimeEncode::TranslateFileName( nsCString& inFile, nsCString& outFile)
 {
   const PRUint8 * pIn = (const PRUint8 *) inFile.get();
   int    len = inFile.Length();
 
   while (len) {
     if (!ImportCharSet::IsUSAscii( *pIn))
       break;
     len--;
     pIn++;
   }
   if (len) {
     // non US ascii!
     // assume this string needs translating...
-    if (!ImportTranslate::ConvertString( inFile, outFile, PR_TRUE)) {
+    if (!ImportTranslate::ConvertString( inFile, outFile, true)) {
       outFile = inFile;
-      return( PR_FALSE);
+      return( false);
     }
     else {
-      return( PR_TRUE);
+      return( true);
     }
   }
   else {
     outFile = inFile;
-    return( PR_FALSE);
+    return( false);
   }
 }
 
 bool nsImportMimeEncode::WriteFileName( nsCString& fName, bool wasTrans, const char *pTag)
 {
   int      tagNum = 0;
   int      idx = 0;
   bool      result = true;
--- a/mailnews/import/src/nsImportScanFile.cpp
+++ b/mailnews/import/src/nsImportScanFile.cpp
@@ -37,18 +37,18 @@
 
 #include "nscore.h"
 #include "nsILocalFile.h"
 #include "nsImportScanFile.h"
 #include "ImportCharSet.h"
 
 nsImportScanFile::nsImportScanFile()
 {
-  m_allocated = PR_FALSE;
-  m_eof = PR_FALSE;
+  m_allocated = false;
+  m_eof = false;
   m_pBuf = nsnull;
 }
 
 nsImportScanFile::~nsImportScanFile()
 {
   if (m_allocated)
     CleanUpScan();
 }
@@ -91,63 +91,63 @@ void nsImportScanFile::ShiftBuffer( void
   m_pos = 0;
 }
 
 bool nsImportScanFile::FillBufferFromFile( void)
 {
   PRUint32 available;
   nsresult rv = m_pInputStream->Available( &available);
   if (NS_FAILED(rv))
-    return( PR_FALSE);
+    return( false);
 
   // Fill up a buffer and scan it
   ShiftBuffer();
 
   // Read in some more bytes
   PRUint32  cnt = m_bufSz - m_bytesInBuf;
   // To distinguish from disk errors
   // Check first for end of file?
   // Set a done flag if true...
   PRUint32 read;
   char *pBuf = (char *)m_pBuf;
   pBuf += m_bytesInBuf;
   rv = m_pInputStream->Read(pBuf, (PRInt32) cnt, &read);
 
   if (NS_FAILED( rv))
-    return( PR_FALSE);
+    return( false);
   rv = m_pInputStream->Available( &available);
   if (NS_FAILED(rv))
-          m_eof = PR_TRUE;
+          m_eof = true;
 
   m_bytesInBuf += cnt;
-  return( PR_TRUE);
+  return( true);
 }
 
 bool nsImportScanFile::Scan( bool *pDone)
 {
   PRUint32 available;
   nsresult rv = m_pInputStream->Available( &available);
   if (NS_FAILED(rv))
         {
     if (m_pos < m_bytesInBuf)
       ScanBuffer( pDone);
-    *pDone = PR_TRUE;
-    return( PR_TRUE);
+    *pDone = true;
+    return( true);
   }
 
   // Fill up a buffer and scan it
   if (!FillBufferFromFile())
-    return( PR_FALSE);
+    return( false);
 
   return( ScanBuffer( pDone));
 }
 
 bool nsImportScanFile::ScanBuffer( bool *)
 {
-  return( PR_TRUE);
+  return( true);
 }
 
 
 bool nsImportScanFileLines::ScanBuffer( bool *pDone)
 {
   // m_pos, m_bytesInBuf, m_eof, m_pBuf are relevant
 
   PRUint32    pos = m_pos;
@@ -159,17 +159,17 @@ bool nsImportScanFileLines::ScanBuffer( 
     if (m_needEol) {
       // Find the next eol...
       while ((pos < max) && (*pChar != ImportCharSet::cCRChar) && (*pChar != ImportCharSet::cLinefeedChar)) {
         pos++;
         pChar++;
       }
       m_pos = pos;
       if (pos < max)
-        m_needEol = PR_FALSE;
+        m_needEol = false;
       if (pos == max) // need more buffer for an end of line
         break;
     }
     // Skip past any eol characters
     while ((pos < max) && ((*pChar == ImportCharSet::cCRChar) || (*pChar == ImportCharSet::cLinefeedChar))) {
       pos++;
       pChar++;
     }
@@ -183,22 +183,22 @@ bool nsImportScanFileLines::ScanBuffer( 
       pos++;
       pChar++;
     }
 
     // Is line too big for our buffer?
     if ((pos == max) && !m_eof) {
       if (!m_pos) { // line too big for our buffer
         m_pos = pos;
-        m_needEol = PR_TRUE;
+        m_needEol = true;
       }
       break;
     }
 
     if (!ProcessLine( m_pBuf + startPos, pos - startPos, pDone)) {
-      return( PR_FALSE);
+      return( false);
     }
     m_pos = pos;
   }
 
-  return( PR_TRUE);
+  return( true);
 }
 
--- a/mailnews/import/src/nsImportScanFile.h
+++ b/mailnews/import/src/nsImportScanFile.h
@@ -63,19 +63,19 @@ protected:
   PRUint32    m_bytesInBuf;
   PRUint32    m_pos;
   bool        m_eof;
   bool        m_allocated;
 };
 
 class nsImportScanFileLines : public nsImportScanFile {
 public:
-  nsImportScanFileLines() {m_needEol = PR_FALSE;}
+  nsImportScanFileLines() {m_needEol = false;}
 
-  void  ResetLineScan( void) { m_needEol = PR_FALSE;}
+  void  ResetLineScan( void) { m_needEol = false;}
 
   virtual bool ProcessLine( PRUint8 * /* pLine */, PRUint32 /* len */, bool * /* pDone */ ) {return( true);}
 
 protected:
   virtual bool    ScanBuffer( bool *pDone);
 
   bool    m_needEol;
 
--- a/mailnews/import/src/nsImportService.cpp
+++ b/mailnews/import/src/nsImportService.cpp
@@ -85,17 +85,17 @@ static const char *  kWhitespace = "\b\t
 
 nsImportService::nsImportService() : m_pModules( nsnull)
 {
   // Init logging module.
   if (!IMPORTLOGMODULE)
     IMPORTLOGMODULE = PR_NewLogModule("IMPORT");
   IMPORT_LOG0( "* nsImport Service Created\n");
 
-  m_didDiscovery = PR_FALSE;
+  m_didDiscovery = false;
   m_pDecoder = nsnull;
   m_pEncoder = nsnull;
 
   nsresult rv = nsImportStringBundle::GetStringBundle(IMPORT_MSGS_URL, getter_AddRefs(m_stringBundle));
   if (NS_FAILED(rv))
     IMPORT_LOG0("Failed to get string bundle for Importing Mail");
 }
 
@@ -115,17 +115,17 @@ nsImportService::~nsImportService()
 
 
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsImportService, nsIImportService)
 
 
 NS_IMETHODIMP nsImportService::DiscoverModules( void)
 {
-  m_didDiscovery = PR_FALSE;
+  m_didDiscovery = false;
   return( DoDiscover());
 }
 
 NS_IMETHODIMP nsImportService::CreateNewFieldMap( nsIImportFieldMap **_retval)
 {
   return nsImportFieldMap::Create(m_stringBundle, nsnull, NS_GET_IID(nsIImportFieldMap), (void**)_retval);
 }
 
@@ -458,17 +458,17 @@ nsresult nsImportService::DoDiscover( vo
     contractid->ToString( getter_Copies( contractIdStr));
     nsCString supportsStr;
     rv = catMan->GetCategoryEntry( "mailnewsimport", contractIdStr.get(), getter_Copies( supportsStr));
     if (NS_SUCCEEDED( rv))
       LoadModuleInfo( contractIdStr.get(), supportsStr.get());
     rv = e->GetNext( getter_AddRefs( contractid));
   }
 
-  m_didDiscovery = PR_TRUE;
+  m_didDiscovery = true;
 
   return NS_OK;
 }
 
 nsresult nsImportService::LoadModuleInfo( const char *pClsId, const char *pSupports)
 {
   if (!pClsId || !pSupports)
     return( NS_OK);
@@ -541,29 +541,29 @@ void ImportModuleDesc::ReleaseModule( vo
     m_pModule->Release();
     m_pModule = nsnull;
   }
 }
 
 bool ImportModuleDesc::SupportsThings( const char *pThings)
 {
   if (!pThings || !*pThings)
-    return PR_TRUE;
+    return true;
 
   nsCString thing(pThings);
   nsCString item;
   PRInt32 idx;
 
   while ((idx = thing.FindChar( ',')) != -1)
   {
     item = StringHead(thing, idx);
     item.Trim( kWhitespace);
     ToLowerCase(item);
     if (item.Length() && (m_supports.Find( item) == -1))
-      return PR_FALSE;
+      return false;
     thing = Substring(thing, idx + 1);
   }
   thing.Trim( kWhitespace);
   ToLowerCase(thing);
   return thing.IsEmpty() || (m_supports.Find(thing) != -1);
 }
 
 void nsImportModuleList::ClearList( void)
--- a/mailnews/import/src/nsImportTranslator.cpp
+++ b/mailnews/import/src/nsImportTranslator.cpp
@@ -72,166 +72,166 @@ bool CMHTranslator::ConvertToFile( const
 {
   PRUint8    hex[2];
   while (inLen) {
     if (!ImportCharSet::IsUSAscii( *pIn) || ImportCharSet::Is822SpecialChar( *pIn) || ImportCharSet::Is822CtlChar( *pIn) ||
       (*pIn == ImportCharSet::cSpaceChar) || (*pIn == '*') || (*pIn == '\'') ||
       (*pIn == '%')) {
       // needs to be encode as %hex val
       if (!pOutFile->WriteByte( '%'))
-        return( PR_FALSE);
+        return( false);
       ImportCharSet::ByteToHex( *pIn, hex);
       if (!pOutFile->WriteData( hex, 2))
-        return( PR_FALSE);
+        return( false);
     }
     else {
       if (!pOutFile->WriteByte( *pIn))
-        return( PR_FALSE);
+        return( false);
     }
     pIn++; inLen--;
   }
 
   if (pProcessed)
     *pProcessed = inLen;
 
-  return( PR_TRUE);
+  return( true);
 }
 
 
 bool C2047Translator::ConvertToFileQ( const PRUint8 * pIn, PRUint32 inLen, ImportOutFile *pOutFile, PRUint32 *pProcessed)
 {
   if (!inLen)
-    return( PR_TRUE);
+    return( true);
 
   int    maxLineLen = 64;
   int    curLineLen = m_startLen;
   bool    startLine = true;
 
   PRUint8  hex[2];
   while (inLen) {
     if (startLine) {
       if (!pOutFile->WriteStr( " =?"))
-        return( PR_FALSE);
+        return( false);
       if (!pOutFile->WriteStr( m_charset.get()))
-        return( PR_FALSE);
+        return( false);
       if (!pOutFile->WriteStr( "?q?"))
-        return( PR_FALSE);
+        return( false);
       curLineLen += (6 + m_charset.Length());
-      startLine = PR_FALSE;
+      startLine = false;
     }
 
     if (!ImportCharSet::IsUSAscii( *pIn) || ImportCharSet::Is822SpecialChar( *pIn) || ImportCharSet::Is822CtlChar( *pIn) ||
       (*pIn == ImportCharSet::cSpaceChar) || (*pIn == '?') || (*pIn == '=')) {
       // needs to be encode as =hex val
       if (!pOutFile->WriteByte( '='))
-        return( PR_FALSE);
+        return( false);
       ImportCharSet::ByteToHex( *pIn, hex);
       if (!pOutFile->WriteData( hex, 2))
-        return( PR_FALSE);
+        return( false);
       curLineLen += 3;
     }
     else {
       if (!pOutFile->WriteByte( *pIn))
-        return( PR_FALSE);
+        return( false);
       curLineLen++;
     }
     pIn++; inLen--;
     if (curLineLen > maxLineLen) {
       if (!pOutFile->WriteStr( "?="))
-        return( PR_FALSE);
+        return( false);
       if (inLen) {
         if (!pOutFile->WriteStr( "\x0D\x0A "))
-          return( PR_FALSE);
+          return( false);
       }
 
-      startLine = PR_TRUE;
+      startLine = true;
       curLineLen = 0;
     }
   }
 
   if (!startLine) {
     // end the encoding!
     if (!pOutFile->WriteStr( "?="))
-      return( PR_FALSE);
+      return( false);
   }
 
   if (pProcessed)
     *pProcessed = inLen;
 
-  return( PR_TRUE);
+  return( true);
 }
 
 bool C2047Translator::ConvertToFile( const PRUint8 * pIn, PRUint32 inLen, ImportOutFile *pOutFile, PRUint32 *pProcessed)
 {
   if (m_useQuotedPrintable)
     return( ConvertToFileQ( pIn, inLen, pOutFile, pProcessed));
 
   if (!inLen)
-    return( PR_TRUE);
+    return( true);
 
   int      maxLineLen = 64;
   int      curLineLen = m_startLen;
   bool      startLine = true;
   int      encodeMax;
   PRUint8 *  pEncoded = new PRUint8[maxLineLen * 2];
 
   while (inLen) {
     if (startLine) {
       if (!pOutFile->WriteStr( " =?")) {
         delete [] pEncoded;
-        return( PR_FALSE);
+        return( false);
       }
       if (!pOutFile->WriteStr( m_charset.get())) {
         delete [] pEncoded;
-        return( PR_FALSE);
+        return( false);
       }
       if (!pOutFile->WriteStr( "?b?")) {
         delete [] pEncoded;
-        return( PR_FALSE);
+        return( false);
       }
       curLineLen += (6 + m_charset.Length());
-      startLine = PR_FALSE;
+      startLine = false;
     }
     encodeMax = maxLineLen - curLineLen;
     encodeMax *= 3;
     encodeMax /= 4;
     if ((PRUint32)encodeMax > inLen)
       encodeMax = (int)inLen;
 
     // encode the line, end the line
     // then continue. Update curLineLen, pIn, startLine, and inLen
     UMimeEncode::ConvertBuffer( pIn, encodeMax, pEncoded, maxLineLen, maxLineLen, "\x0D\x0A");
 
     if (!pOutFile->WriteStr( (const char *)pEncoded)) {
       delete [] pEncoded;
-      return( PR_FALSE);
+      return( false);
     }
 
     pIn += encodeMax;
     inLen -= encodeMax;
-    startLine = PR_TRUE;
+    startLine = true;
     curLineLen = 0;
     if (!pOutFile->WriteStr( "?=")) {
       delete [] pEncoded;
-      return( PR_FALSE);
+      return( false);
     }
     if (inLen) {
       if (!pOutFile->WriteStr( "\x0D\x0A ")) {
         delete [] pEncoded;
-        return( PR_FALSE);
+        return( false);
       }
     }
   }
 
   delete [] pEncoded;
 
   if (pProcessed)
     *pProcessed = inLen;
 
-  return( PR_TRUE);
+  return( true);
 }
 
 
 PRUint32  UMimeEncode::GetBufferSize( PRUint32 inBytes)
 {
   // it takes 4 base64 bytes to represent 3 regular bytes
   inBytes += 3;
   inBytes /= 3;
--- a/mailnews/import/src/nsImportTranslator.h
+++ b/mailnews/import/src/nsImportTranslator.h
@@ -75,19 +75,19 @@ public:
 };
 
 // Specialized encoder, not a vaild language translator, used for mail headers
 // rfc2047
 class C2047Translator : public nsImportTranslator {
 public:
   virtual ~C2047Translator() {}
 
-  C2047Translator( const char *pCharset, PRUint32 headerLen) { m_charset = pCharset; m_startLen = headerLen; m_useQuotedPrintable = PR_FALSE;}
+  C2047Translator( const char *pCharset, PRUint32 headerLen) { m_charset = pCharset; m_startLen = headerLen; m_useQuotedPrintable = false;}
 
-  void  SetUseQuotedPrintable( void) { m_useQuotedPrintable = PR_TRUE;}
+  void  SetUseQuotedPrintable( void) { m_useQuotedPrintable = true;}
 
   virtual bool    ConvertToFile( const PRUint8 * pIn, PRUint32 inLen, ImportOutFile *pOutFile, PRUint32 *pProcessed = nsnull);
   bool    ConvertToFileQ( const PRUint8 * pIn, PRUint32 inLen, ImportOutFile *pOutFile, PRUint32 *pProcessed);
 
 protected:
   bool        m_useQuotedPrintable;
   nsCString    m_charset;
   PRUint32    m_startLen;
--- a/mailnews/import/text/src/nsTextAddress.cpp
+++ b/mailnews/import/text/src/nsTextAddress.cpp
@@ -327,17 +327,17 @@ bool nsTextAddress::GetField( const char
         pChar++;
         len++;
     }
 
     if (len >= maxLen) {
         return( result);
     }
 
-    result = PR_TRUE;
+    result = true;
 
     while ((len < maxLen) && ((*pChar == ' ') || (*pChar == tab))) {
         len++;
         pChar++;
     }
 
     const char *pStart = pChar;
     PRInt32        fLen = 0;
@@ -345,17 +345,17 @@ bool nsTextAddress::GetField( const char
     if (*pChar == '"') {
         pStart++;
         fLen = -1;
         do {
             pChar++;
             len++;
             fLen++;
             if (((len + 1) < maxLen) && (*pChar == '"') && (*(pChar + 1) == '"')) {
-                quoted = PR_TRUE;
+                quoted = true;
                 len += 2;
                 pChar += 2;
                 fLen += 2;
             }
         } while ((len < maxLen) && (*pChar != '"'));
     }
     else {
         while ((len < maxLen) && (*pChar != delim)) {
@@ -464,17 +464,17 @@ nsresult nsTextAddress::ProcessLine( con
     nsIMdbRow *    newRow = nsnull;
     nsString    uVal;
     nsCString    fieldVal;
     PRInt32        fieldNum;
     PRInt32        numFields = 0;
     bool          active;
     rv = m_fieldMap->GetMapSize( &numFields);
     for (PRInt32 i = 0; (i < numFields) && NS_SUCCEEDED( rv); i++) {
-        active = PR_FALSE;
+        active = false;
         rv = m_fieldMap->GetFieldMap( i, &fieldNum);
         if (NS_SUCCEEDED( rv))
             rv = m_fieldMap->GetFieldActive( i, &active);
         if (NS_SUCCEEDED( rv) && active) {
             if (GetField( pLine, len, i, fieldVal, m_delim)) {
                 if (!fieldVal.IsEmpty()) {
                     if (!newRow) {
                         rv = m_database->GetNewRow( &newRow);
--- a/mailnews/import/text/src/nsTextImport.cpp
+++ b/mailnews/import/text/src/nsTextImport.cpp
@@ -191,17 +191,17 @@ NS_IMETHODIMP nsTextImport::GetSupports(
 }
 
 NS_IMETHODIMP nsTextImport::GetSupportsUpgrade( bool *pUpgrade)
 {
   NS_PRECONDITION(pUpgrade != nsnull, "null ptr");
   if (! pUpgrade)
     return NS_ERROR_NULL_POINTER;
 
-  *pUpgrade = PR_FALSE;
+  *pUpgrade = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsTextImport::GetImportInterface( const char *pImportType, nsISupports **ppInterface)
 {
   NS_ENSURE_ARG_POINTER(pImportType);
   NS_ENSURE_ARG_POINTER(ppInterface);
 
@@ -244,31 +244,31 @@ nsresult ImportAddressImpl::Create(nsIIm
 
   NS_ADDREF(*aImport);
   return NS_OK;
 }
 
 ImportAddressImpl::ImportAddressImpl(nsIStringBundle* aStringBundle) :
   m_notProxyBundle(aStringBundle)
 {
-  m_haveDelim = PR_FALSE;
+  m_haveDelim = false;
 }
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(ImportAddressImpl, nsIImportAddressBooks)
 
 
 NS_IMETHODIMP ImportAddressImpl::GetAutoFind(PRUnichar **addrDescription, bool *_retval)
 {
   NS_PRECONDITION(addrDescription != nsnull, "null ptr");
   NS_PRECONDITION(_retval != nsnull, "null ptr");
   if (! addrDescription || !_retval)
     return NS_ERROR_NULL_POINTER;
 
   nsString str;
-  *_retval = PR_FALSE;
+  *_retval = false;
 
   if (!m_notProxyBundle)
     return NS_ERROR_FAILURE;
 
   nsImportStringBundle::GetStringByID(TEXTIMPORT_ADDRESS_NAME, m_notProxyBundle, str);
   *addrDescription = ToNewUnicode(str);
   return( NS_OK);
 }
@@ -278,18 +278,18 @@ NS_IMETHODIMP ImportAddressImpl::GetDefa
 {
   NS_PRECONDITION(found != nsnull, "null ptr");
   NS_PRECONDITION(ppLoc != nsnull, "null ptr");
   NS_PRECONDITION(userVerify != nsnull, "null ptr");
   if (! found || !userVerify || !ppLoc)
     return NS_ERROR_NULL_POINTER;
 
   *ppLoc = nsnull;
-  *found = PR_FALSE;
-  *userVerify = PR_TRUE;
+  *found = false;
+  *userVerify = true;
   return( NS_OK);
 }
 
 
 
 NS_IMETHODIMP ImportAddressImpl::FindAddressBooks(nsIFile *pLoc, nsISupportsArray **ppArray)
 {
   NS_PRECONDITION(pLoc != nsnull, "null ptr");
@@ -311,17 +311,17 @@ NS_IMETHODIMP ImportAddressImpl::FindAdd
     return( NS_ERROR_FAILURE);
 
   rv = m_text.DetermineDelim(pLoc);
 
   if (NS_FAILED( rv)) {
     IMPORT_LOG0( "*** Error determining delimitter\n");
     return( rv);
   }
-  m_haveDelim = PR_TRUE;
+  m_haveDelim = true;
   m_delim = m_text.GetDelim();
 
   m_fileLoc = do_QueryInterface(pLoc);
 
   /* Build an address book descriptor based on the file passed in! */
   nsCOMPtr<nsISupportsArray> array;
   rv = NS_NewISupportsArray( getter_AddRefs( array));
   if (NS_FAILED( rv)) {
@@ -432,17 +432,17 @@ ImportAddressImpl::ImportAddressBook(nsI
     IMPORT_LOG0( "*** Bad param passed to text address import\n");
     nsImportStringBundle::GetStringByID(TEXTIMPORT_ADDRESS_BADPARAM,
                                         m_notProxyBundle,
                                         error);
 
     SetLogs(success, error, pErrorLog, pSuccessLog);
 
     if (fatalError)
-      *fatalError = PR_TRUE;
+      *fatalError = true;
 
     return NS_ERROR_NULL_POINTER;
   }
 
   ClearSampleFile();
 
   bool addrAbort = false;
   nsString name;
@@ -483,17 +483,17 @@ ImportAddressImpl::ImportAddressBook(nsI
   if (NS_FAILED( rv)) {
     ReportError(TEXTIMPORT_ADDRESS_CONVERTERROR, name, &error, m_notProxyBundle);
     SetLogs(success, error, pErrorLog, pSuccessLog);
     return( rv);
   }
 
   if (isLDIF) {
     if (ldifService)
-      rv = ldifService->ImportLDIFFile(pDestination, inFile, PR_FALSE, &m_bytesImported);
+      rv = ldifService->ImportLDIFFile(pDestination, inFile, false, &m_bytesImported);
     else
       return NS_ERROR_FAILURE;
   }
   else {
     rv = m_text.ImportAddresses( &addrAbort, name.get(), inFile, pDestination, fieldMap, error, &m_bytesImported);
     SaveFieldMap( fieldMap);
   }
 
@@ -519,17 +519,17 @@ NS_IMETHODIMP ImportAddressImpl::GetImpo
 }
 
 
 NS_IMETHODIMP ImportAddressImpl::GetNeedsFieldMap(nsIFile *aLocation, bool *_retval)
 {
   NS_ENSURE_ARG_POINTER(_retval);
   NS_ENSURE_ARG_POINTER(aLocation);
 
-  *_retval = PR_TRUE;
+  *_retval = true;
   bool exists = false;
   bool isFile = false;
 
   nsresult rv = aLocation->Exists( &exists);
   rv = aLocation->IsFile( &isFile);
 
   if (!exists || !isFile)
     return( NS_ERROR_FAILURE);
@@ -541,17 +541,17 @@ NS_IMETHODIMP ImportAddressImpl::GetNeed
     rv = ldifService->IsLDIFFile(aLocation, &isLDIF);
 
   if (NS_FAILED( rv)) {
     IMPORT_LOG0( "*** Error determining if file is of type LDIF\n");
     return( rv);
   }
 
   if (isLDIF)
-    *_retval = PR_FALSE;
+    *_retval = false;
 
   return( NS_OK);
 }
 
 void ImportAddressImpl::SanitizeSampleData( nsCString& val)
 {
   // remove any line-feeds...
   PRInt32 offset = val.Find(NS_LITERAL_CSTRING("\x0D\x0A"));
@@ -585,26 +585,26 @@ NS_IMETHODIMP ImportAddressImpl::GetSamp
 
   nsresult rv;
   *pStr = nsnull;
   PRUnichar term = 0;
 
   if (!m_haveDelim) {
     rv = m_text.DetermineDelim(m_fileLoc);
     NS_ENSURE_SUCCESS(rv, rv);
-    m_haveDelim = PR_TRUE;
+    m_haveDelim = true;
     m_delim = m_text.GetDelim();
   }
 
   bool fileExists;
   rv = m_fileLoc->Exists(&fileExists);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (!fileExists) {
-    *pFound = PR_FALSE;
+    *pFound = false;
     *pStr = NS_strdup(&term);
     return NS_OK;
   }
 
   nsCString line;
   rv = nsTextAddress::ReadRecordNumber(m_fileLoc, line, index);
   if (NS_SUCCEEDED( rv)) {
     nsString str;
@@ -619,41 +619,41 @@ NS_IMETHODIMP ImportAddressImpl::GetSamp
                                      field, uField);
 
       str.Append( uField);
       fNum++;
       field.Truncate();
     }
 
     *pStr = ToNewUnicode(str);
-    *pFound = PR_TRUE;
+    *pFound = true;
 
     /* IMPORT_LOG1( "Sample data: %S\n", str.get()); */
   }
   else {
-    *pFound = PR_FALSE;
+    *pFound = false;
     *pStr = NS_strdup( &term);
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP ImportAddressImpl::SetSampleLocation(nsIFile *pLocation)
 {
   NS_ENSURE_ARG_POINTER(pLocation);
 
   m_fileLoc = do_QueryInterface(pLocation);
-  m_haveDelim = PR_FALSE;
+  m_haveDelim = false;
   return NS_OK;
 }
 
 void ImportAddressImpl::ClearSampleFile( void)
 {
   m_fileLoc = nsnull;
-  m_haveDelim = PR_FALSE;
+  m_haveDelim = false;
 }
 
 NS_IMETHODIMP ImportAddressImpl::InitFieldMap(nsIImportFieldMap *fieldMap)
 {
   // Let's remember the last one the user used!
   // This should be normal for someone importing multiple times, it's usually
   // from the same file format.
 
@@ -668,19 +668,19 @@ NS_IMETHODIMP ImportAddressImpl::InitFie
         fieldMap->SetFieldMapSize( 0);
         long fNum;
         bool active;
         long fIndex = 0;
         while (*pStr) {
           while (*pStr && (*pStr != '+') && (*pStr != '-'))
             pStr++;
           if (*pStr == '+')
-            active = PR_TRUE;
+            active = true;
           else if (*pStr == '-')
-            active = PR_FALSE;
+            active = false;
           else
             break;
           fNum = 0;
           while (*pStr && ((*pStr < '0') || (*pStr > '9')))
             pStr++;
           if (!(*pStr))
             break;
           while (*pStr && (*pStr >= '0') && (*pStr <= '9')) {
@@ -723,17 +723,17 @@ void ImportAddressImpl::SaveFieldMap( ns
   int size;
   int index;
   bool active;
   nsCString str;
 
   pMap->GetMapSize( &size);
   for (long i = 0; i < size; i++) {
     index = i;
-    active = PR_FALSE;
+    active = false;
     pMap->GetFieldMap( i, &index);
     pMap->GetFieldActive( i, &active);
     if (active)
       str.Append( '+');
     else
       str.Append( '-');
 
     str.AppendInt( index);
@@ -745,17 +745,17 @@ void ImportAddressImpl::SaveFieldMap( ns
 
   nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
 
   if (NS_SUCCEEDED( rv)) {
     nsCString prefStr;
     rv = prefs->GetCharPref( "mailnews.import.text.fieldmap", getter_Copies(prefStr));
     if (NS_SUCCEEDED( rv)) {
       if (str.Equals(prefStr))
-        done = PR_TRUE;
+        done = true;
     }
     if (!done) {
       rv = prefs->SetCharPref( "mailnews.import.text.fieldmap", str.get());
     }
   }
 
     // Now also save last used skip first record value.
     bool skipFirstRecord = false;
--- a/mailnews/import/vcard/src/nsVCardAddress.cpp
+++ b/mailnews/import/vcard/src/nsVCardAddress.cpp
@@ -98,17 +98,17 @@ nsresult nsVCardAddress::ImportAddresses
   while (!(*pAbort) && more && NS_SUCCEEDED(rv)) {
     rv = ReadRecord(lineStream, record, &more);
     if (NS_SUCCEEDED(rv)) {
       // Parse the vCard and build an nsIAbCard from it
       nsCOMPtr<nsIAbCard> cardFromVCard;
       rv = ab->EscapedVCardToAbCard(record.get(), getter_AddRefs(cardFromVCard));
       NS_ENSURE_SUCCESS(rv, rv);
 
-      rv = pDb->CreateNewCardAndAddToDB(cardFromVCard, PR_FALSE, nsnull);
+      rv = pDb->CreateNewCardAndAddToDB(cardFromVCard, false, nsnull);
       NS_ENSURE_SUCCESS(rv, rv);
 
       if (NS_FAILED(rv)) {
         IMPORT_LOG0("*** Error processing vCard record.\n");
       }
     }
     if (NS_SUCCEEDED(rv) && pProgress) {
       // This won't be totally accurate, but its the best we can do
--- a/mailnews/import/vcard/src/nsVCardImport.cpp
+++ b/mailnews/import/vcard/src/nsVCardImport.cpp
@@ -75,22 +75,22 @@ public:
   // nsISupports interface
   NS_DECL_ISUPPORTS
 
   // nsIImportAddressBooks interface
 
   // TODO: support multiple vCard files in future - shouldn't be too hard,
   // since you just import each file in turn.
   NS_IMETHOD GetSupportsMultiple(bool *_retval)
-  { *_retval = PR_FALSE; return NS_OK;}
+  { *_retval = false; return NS_OK;}
 
   NS_IMETHOD GetAutoFind(PRUnichar **description, bool *_retval);
 
   NS_IMETHOD GetNeedsFieldMap(nsIFile *location, bool *_retval)
-  { *_retval = PR_FALSE; return NS_OK;}
+  { *_retval = false; return NS_OK;}
 
   NS_IMETHOD GetDefaultLocation(
       nsIFile **location, bool *found, bool *userVerify);
 
   NS_IMETHOD FindAddressBooks(nsIFile *location, nsISupportsArray **_retval);
 
   NS_IMETHOD InitFieldMap(nsIImportFieldMap *fieldMap)
   { return NS_ERROR_FAILURE;}
@@ -167,17 +167,17 @@ NS_IMETHODIMP nsVCardImport::GetSupports
   NS_ENSURE_ARG_POINTER(supports);
   *supports = strdup(NS_IMPORT_ADDRESS_STR);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsVCardImport::GetSupportsUpgrade(bool *pUpgrade)
 {
   NS_ENSURE_ARG_POINTER(pUpgrade);
-  *pUpgrade = PR_TRUE;
+  *pUpgrade = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsVCardImport::GetImportInterface(
     const char *pImportType, nsISupports **ppInterface)
 {
   NS_ENSURE_ARG_POINTER(pImportType);
   NS_ENSURE_ARG_POINTER(ppInterface);
@@ -230,17 +230,17 @@ NS_IMPL_THREADSAFE_ISUPPORTS1(ImportVCar
 
 NS_IMETHODIMP ImportVCardAddressImpl::GetAutoFind(
     PRUnichar **addrDescription, bool *_retval)
 {
   NS_ENSURE_ARG_POINTER(addrDescription);
   NS_ENSURE_ARG_POINTER(_retval);
 
   nsString str;
-  *_retval = PR_FALSE;
+  *_retval = false;
 
   if (!m_notProxyBundle)
     return NS_ERROR_FAILURE;
 
   nsImportStringBundle::GetStringByName("vCardImportAddressName", m_notProxyBundle, str);
   *addrDescription = ToNewUnicode(str);
   return NS_OK;
 }
@@ -248,18 +248,18 @@ NS_IMETHODIMP ImportVCardAddressImpl::Ge
 NS_IMETHODIMP ImportVCardAddressImpl::GetDefaultLocation(
     nsIFile **ppLoc, bool *found, bool *userVerify)
 {
   NS_ENSURE_ARG_POINTER(found);
   NS_ENSURE_ARG_POINTER(ppLoc);
   NS_ENSURE_ARG_POINTER(userVerify);
 
   *ppLoc = nsnull;
-  *found = PR_FALSE;
-  *userVerify = PR_TRUE;
+  *found = false;
+  *userVerify = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP ImportVCardAddressImpl::FindAddressBooks(
     nsIFile *pLoc, nsISupportsArray **ppArray)
 {
   NS_ENSURE_ARG_POINTER(pLoc);
   NS_ENSURE_ARG_POINTER(ppArray);
--- a/mailnews/import/winlivemail/nsWMImport.cpp
+++ b/mailnews/import/winlivemail/nsWMImport.cpp
@@ -161,17 +161,17 @@ NS_IMETHODIMP nsWMImport::GetSupports( c
 }
 
 NS_IMETHODIMP nsWMImport::GetSupportsUpgrade( bool *pUpgrade)
 {
   NS_PRECONDITION(pUpgrade != nsnull, "null ptr");
   if (! pUpgrade)
     return NS_ERROR_NULL_POINTER;
 
-  *pUpgrade = PR_TRUE;
+  *pUpgrade = true;
   return( NS_OK);
 }
 
 NS_IMETHODIMP nsWMImport::GetImportInterface(const char *pImportType,
                                              nsISupports **ppInterface)
 {
   NS_ENSURE_ARG_POINTER(pImportType);
   NS_ENSURE_ARG_POINTER(ppInterface);
--- a/mailnews/import/winlivemail/nsWMSettings.cpp
+++ b/mailnews/import/winlivemail/nsWMSettings.cpp
@@ -141,44 +141,44 @@ NS_IMETHODIMP nsWMSettings::AutoLocate(P
                                        nsIFile **location, bool *_retval)
 {
   NS_PRECONDITION(description != nsnull, "null ptr");
   NS_PRECONDITION(_retval != nsnull, "null ptr");
   if (!description || !_retval)
     return NS_ERROR_NULL_POINTER;
 
   *description = nsWMStringBundle::GetStringByID(WMIMPORT_NAME);
-  *_retval = PR_FALSE;
+  *_retval = false;
 
   nsCOMPtr<nsIWindowsRegKey> key =
     do_CreateInstance("@mozilla.org/windows-registry-key;1");
   if (location)
     *location = nsnull;
   if (NS_SUCCEEDED(WMSettings::FindWMKey(key)))
-    *_retval = PR_TRUE;
+    *_retval = true;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsWMSettings::SetLocation(nsIFile *location)
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP nsWMSettings::Import(nsIMsgAccount **localMailAccount,
                                    bool *_retval)
 {
   NS_PRECONDITION(_retval != nsnull, "null ptr");
 
   if (WMSettings::DoImport(localMailAccount)) {
-    *_retval = PR_TRUE;
+    *_retval = true;
     IMPORT_LOG0("Settings import appears successful\n");
   }
   else {
-    *_retval = PR_FALSE;
+    *_retval = false;
     IMPORT_LOG0("Settings import returned FALSE\n");
   }
 
   return NS_OK;
 }
 
 nsresult WMSettings::FindWMKey(nsIWindowsRegKey* akey)
 {
@@ -197,42 +197,42 @@ nsresult WMSettings::FindWMKey(nsIWindow
 
 bool WMSettings::getOEacctFiles(nsILocalFile* file,
                                   nsCOMArray<nsILocalFile>& fileArray)
 {
   nsresult rv;
   nsCOMPtr<nsISimpleEnumerator> entries;
   rv = file->GetDirectoryEntries(getter_AddRefs(entries));
   if (NS_FAILED(rv) || !entries)
-    return PR_FALSE;
+    return false;
 
   bool hasMore;
   while (NS_SUCCEEDED(entries->HasMoreElements(&hasMore)) && hasMore) {
     nsCOMPtr<nsISupports> sup;
     entries->GetNext(getter_AddRefs(sup));
     if (!sup)
-      return PR_FALSE;
+      return false;
     nsCOMPtr<nsILocalFile> fileX = do_QueryInterface(sup);
     if (!fileX)
-      return PR_FALSE;
+      return false;
     nsString name;
     if (NS_FAILED(fileX->GetLeafName(name)))
-      return PR_FALSE;
+      return false;
     bool isDir;
     if (NS_FAILED(fileX->IsDirectory(&isDir)))
-      return PR_FALSE;
+      return false;
     if (isDir) {
       getOEacctFiles(fileX, fileArray);
     }
     else {
       if (StringEndsWith(name, NS_LITERAL_STRING(".oeaccount")))
         fileArray.AppendObject(fileX);
     }
   }
-  return PR_TRUE;
+  return true;
 }
 
 nsresult WMSettings::GetValueForTag(nsIDOMDocument *xmlDoc,
                                     const nsAString& tagName,
                                     nsAString &value)
 {
   nsCOMPtr<nsIDOMNodeList> list;
   if (NS_FAILED(xmlDoc->GetElementsByTagName(tagName, getter_AddRefs(list))))
@@ -265,80 +265,80 @@ bool WMSettings::DoImport(nsIMsgAccount 
 {
   nsresult rv;
 
   // do the windows registry stuff first
   nsCOMPtr<nsIWindowsRegKey> key =
     do_CreateInstance("@mozilla.org/windows-registry-key;1");
   if (NS_FAILED(FindWMKey(key))) {
     IMPORT_LOG0("*** Error finding Windows Live Mail registry account keys\n");
-    return PR_FALSE;
+    return false;
   }
   // 'poll for messages' setting in WM is a global setting-Like OE
   // for all accounts dword ==0xffffffff for don't poll else 1/60000 = minutes
   checkNewMailTime = 30;
-  checkNewMail = PR_FALSE;
+  checkNewMail = false;
   nsCOMPtr<nsIWindowsRegKey> subKey;
   if (NS_SUCCEEDED(key->OpenChild(NS_LITERAL_STRING("mail"),
                                   nsIWindowsRegKey::ACCESS_QUERY_VALUE,
                                   getter_AddRefs(subKey)))) {
     PRUint32 dwordResult = -1;
     rv = subKey->ReadIntValue(NS_LITERAL_STRING("Poll For Mail"), &dwordResult); // reg_dword
     subKey->Close();
     if (NS_SUCCEEDED(rv) && dwordResult != -1){
-      checkNewMail = PR_TRUE;
+      checkNewMail = true;
       checkNewMailTime = dwordResult / 60000;
     }
   }
   // these are in main windowsmail key and if they don't exist-not to worry
   // (less than 64 chars) e.g. account{4A18B81E-83CA-472A-8D7F-5301C0B97B8D}.oeaccount
   nsAutoString  defMailAcct, defNewsAcct;
   key->ReadStringValue(NS_LITERAL_STRING("Default Mail Account"), defMailAcct); // ref_sz
   key->ReadStringValue(NS_LITERAL_STRING("Default News Account"), defNewsAcct); // ref_sz
 
   // This is essential to proceed; it is the location on disk of xml-type account files;
   // it is in reg_expand_sz so it will need expanding to absolute path.
   nsString  storeRoot;
   rv = key->ReadStringValue(NS_LITERAL_STRING("Store Root"), storeRoot);
   key->Close();  // Finished with windows registry key. We do not want to return before this closing
   if (NS_FAILED(rv) || storeRoot.IsEmpty()) {
     IMPORT_LOG0("*** Error finding Windows Live Mail Store Root\n");
-    return PR_FALSE;
+    return false;
   }
 
   nsCOMPtr<nsILocalFile> file(do_CreateInstance(NS_LOCAL_FILE_CONTRACTID));
   if (!file) {
     IMPORT_LOG0("*** Failed to create an nsILocalFile!\n");
-    return PR_FALSE;
+    return false;
   }
   nsCOMPtr<nsIMsgAccountManager> accMgr =
            do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
   if (NS_FAILED(rv)) {
     IMPORT_LOG0("*** Failed to create an account manager!\n");
-    return PR_FALSE;
+    return false;
   }
 
   PRUint32 size = ::ExpandEnvironmentStringsW((LPCWSTR)storeRoot.get(), nsnull, 0);
   nsString expandedStoreRoot;
   expandedStoreRoot.SetLength(size - 1);
   if (expandedStoreRoot.Length() != size - 1)
-    return PR_FALSE;
+    return false;
   ::ExpandEnvironmentStringsW((LPCWSTR)storeRoot.get(),
                               (LPWSTR)expandedStoreRoot.BeginWriting(),
                               size);
   storeRoot = expandedStoreRoot;
 
   if (NS_FAILED(file->InitWithPath(storeRoot))) {
     IMPORT_LOG0("*** Failed get store root!\n");
-    return PR_FALSE;
+    return false;
   }
   nsCOMArray<nsILocalFile> fileArray;
   if (!getOEacctFiles(file, fileArray)) {
     IMPORT_LOG0("*** Failed to get OEacctFiles!\n");
-    return PR_FALSE;
+    return false;
   }
 
   // Loop through *.oeaccounts files looking for POP3 & IMAP & NNTP accounts
   // Ignore LDAP for now!
   int accounts = 0;
   nsCOMPtr<nsIDOMDocument> xmlDoc;
 
   for (PRInt32 i = fileArray.Count() - 1 ; i >= 0; i--){
@@ -383,17 +383,17 @@ bool WMSettings::DoIMAPServer(nsIMsgAcco
   PRInt32 authMethod;   // Secure Password Authentication (SPA)
   nsresult errorCode;
   if (ppAccount)
     *ppAccount = nsnull;
 
   nsAutoString userName, value;
   if (NS_FAILED(GetValueForTag(xmlDoc, NS_LITERAL_STRING("IMAP_User_Name"),
                                userName)))
-    return PR_FALSE;
+    return false;
   bool result = false;
   // I now have a user name/server name pair, find out if it already exists?
   nsCOMPtr<nsIMsgIncomingServer> in;
   nsresult rv = pMgr->FindServer(NS_ConvertUTF16toUTF8(userName),
                                  NS_ConvertUTF16toUTF8(serverName),
                                  NS_LITERAL_CSTRING("imap"),
                                  getter_AddRefs(in));
   if (NS_FAILED(rv) || (in == nsnull)) {
@@ -402,17 +402,17 @@ bool WMSettings::DoIMAPServer(nsIMsgAcco
                                     NS_ConvertUTF16toUTF8(serverName),
                                     NS_LITERAL_CSTRING("imap"),
                                     getter_AddRefs(in));
     if (NS_SUCCEEDED(rv) && in) {
       nsCOMPtr<nsIImapIncomingServer> imapServer = do_QueryInterface(in);
       if (!imapServer){
         IMPORT_LOG1("*** Failed to create nsIImapIncomingServer for %S!\n",
                     serverName.get());
-        return PR_FALSE;
+        return false;
       }
       GetValueForTag(xmlDoc, NS_LITERAL_STRING("IMAP_Root_Folder"), value);
       if (!value.IsEmpty())
         imapServer->SetServerDirectory(NS_ConvertUTF16toUTF8(value));
 
       GetValueForTag(xmlDoc, NS_LITERAL_STRING("IMAP_Secure_Connection"), value);
       if (value.ToInteger(&errorCode, 16))
         in->SetSocketType(nsMsgSocketType::SSL);
@@ -441,58 +441,58 @@ bool WMSettings::DoIMAPServer(nsIMsgAcco
       rv = pMgr->CreateAccount(getter_AddRefs(account));
       if (NS_SUCCEEDED(rv) && account) {
         rv = account->SetIncomingServer(in);
 
         IMPORT_LOG0("Created an account and set the IMAP server "
                     "as the incoming server\n");
 
         // Fiddle with the identities
-        SetIdentities(pMgr, account, xmlDoc, userName, authMethod, PR_FALSE);
-        result = PR_TRUE;
+        SetIdentities(pMgr, account, xmlDoc, userName, authMethod, false);
+        result = true;
         if (ppAccount)
           account.forget(ppAccount);
       }
     }
   }
   else if (NS_SUCCEEDED(rv) && in) {
     // for an existing server we create another identity,
     //  TB lists under 'manage identities'
     nsCOMPtr<nsIMsgAccount> account;
     rv = pMgr->FindAccountForServer(in, getter_AddRefs(account));
     if (NS_SUCCEEDED(rv) && account) {
       IMPORT_LOG0("Created an identity and added to existing "
                   "IMAP incoming server\n");
       // Fiddle with the identities
       in->GetAuthMethod(&authMethod);
-      SetIdentities(pMgr, account, xmlDoc, userName, authMethod, PR_FALSE);
-      result = PR_TRUE;
+      SetIdentities(pMgr, account, xmlDoc, userName, authMethod, false);
+      result = true;
       if (ppAccount)
         account.forget(ppAccount);
     }
   }
   else
-    result = PR_TRUE;
+    result = true;
   return result;
 }
 
 bool WMSettings::DoPOP3Server(nsIMsgAccountManager *pMgr,
                                 nsIDOMDocument *xmlDoc,
                                 const nsString& serverName,
                                 nsIMsgAccount **ppAccount)
 {
   PRInt32 authMethod;   // Secure Password Authentication (SPA)
   nsresult errorCode;
   if (ppAccount)
     *ppAccount = nsnull;
 
   nsAutoString userName, value;
   if (NS_FAILED(GetValueForTag(xmlDoc, NS_LITERAL_STRING("POP3_User_Name"),
                                userName)))
-    return PR_FALSE;
+    return false;
   bool result = false;
   // I now have a user name/server name pair, find out if it already exists?
   nsCOMPtr<nsIMsgIncomingServer> in;
   nsresult rv = pMgr->FindServer(NS_ConvertUTF16toUTF8(userName),
                                  NS_ConvertUTF16toUTF8(serverName),
                                  NS_LITERAL_CSTRING("pop3"),
                                  getter_AddRefs(in));
   if (NS_FAILED(rv) || (in == nsnull)) {
@@ -501,17 +501,17 @@ bool WMSettings::DoPOP3Server(nsIMsgAcco
                                     NS_ConvertUTF16toUTF8(serverName),
                                     NS_LITERAL_CSTRING("pop3"),
                                     getter_AddRefs(in));
     if (NS_SUCCEEDED(rv) && in) {
       nsCOMPtr<nsIPop3IncomingServer> pop3Server = do_QueryInterface(in);
       if (!pop3Server){
         IMPORT_LOG1("*** Failed to create nsIPop3IncomingServer for %S!\n",
           serverName.get());
-        return PR_FALSE;
+        return false;
       }
 
       GetValueForTag(xmlDoc, NS_LITERAL_STRING("POP3_Secure_Connection"), value);
       if (value.ToInteger(&errorCode, 16))
         in->SetSocketType(nsMsgSocketType::SSL);
 
       GetValueForTag(xmlDoc, NS_LITERAL_STRING("POP3_Use_Sicily"), value);
       bool secAuth = (bool)value.ToInteger(&errorCode, 16);
@@ -524,17 +524,17 @@ bool WMSettings::DoPOP3Server(nsIMsgAcco
         in->SetPort(value.ToInteger(&errorCode, 16));
 
       GetValueForTag(xmlDoc, NS_LITERAL_STRING("POP3_Skip_Account"), value);
       if (!value.IsEmpty())
         // OE:0=='Include this account when receiving mail or synchronizing'==
         // TB:1==ActMgr:Server:advanced:Include this server when getting new mail
         pop3Server->SetDeferGetNewMail(value.ToInteger(&errorCode, 16) == 0);
       else
-        pop3Server->SetDeferGetNewMail(PR_FALSE);
+        pop3Server->SetDeferGetNewMail(false);
       GetValueForTag(xmlDoc, NS_LITERAL_STRING("Leave_Mail_On_Server"), value);
       if (!value.IsEmpty())
         pop3Server->SetLeaveMessagesOnServer((bool)value.ToInteger(&errorCode, 16));
       GetValueForTag(xmlDoc, NS_LITERAL_STRING("Remove_When_Deleted"), value);
       if (!value.IsEmpty())
         pop3Server->SetDeleteMailLeftOnServer((bool)value.ToInteger(&errorCode, 16));
       GetValueForTag(xmlDoc, NS_LITERAL_STRING("Remove_When_Expired"), value);
       if (!value.IsEmpty())
@@ -555,17 +555,17 @@ bool WMSettings::DoPOP3Server(nsIMsgAcco
       if (!localFoldersServer) {
         // XXX: We may need to move this local folder creation
         // code to the generic nsImportSettings code
         // if the other import modules end up needing to do this too.
         // if Local Folders does not exist already, create it
         rv = pMgr->CreateLocalMailAccount();
         if (NS_FAILED(rv)) {
           IMPORT_LOG0("*** Failed to create Local Folders!\n");
-          return PR_FALSE;
+          return false;
         }
         pMgr->GetLocalFoldersServer(getter_AddRefs(localFoldersServer));
       }
 
       // now get the account for this server
       nsCOMPtr<nsIMsgAccount> localFoldersAccount;
       pMgr->FindAccountForServer(localFoldersServer,
                                  getter_AddRefs(localFoldersAccount));
@@ -582,42 +582,42 @@ bool WMSettings::DoPOP3Server(nsIMsgAcco
       nsCOMPtr<nsIMsgAccount> account;
       rv = pMgr->CreateAccount(getter_AddRefs(account));
       if (NS_SUCCEEDED(rv) && account) {
         rv = account->SetIncomingServer(in);
         IMPORT_LOG0("Created a new account and set the incoming "
                     "server to the POP3 server.\n");
 
         // Fiddle with the identities
-        SetIdentities(pMgr, account, xmlDoc, userName, authMethod, PR_FALSE);
-        result = PR_TRUE;
+        SetIdentities(pMgr, account, xmlDoc, userName, authMethod, false);
+        result = true;
         if (ppAccount)
           account.forget(ppAccount);
       }
     }
   }
   else if (NS_SUCCEEDED(rv) && in) {
     IMPORT_LOG2("Existing POP3 server named: %S, userName: %S\n",
                 serverName.get(), userName.get());
     // for an existing server we create another identity,
     // TB listed under 'manage identities'
     nsCOMPtr<nsIMsgAccount>  account;
     rv = pMgr->FindAccountForServer(in, getter_AddRefs(account));
     if (NS_SUCCEEDED(rv) && account) {
       IMPORT_LOG0("Created identity and added to existing POP3 incoming server.\n");
       // Fiddle with the identities
       in->GetAuthMethod(&authMethod);
-      SetIdentities(pMgr, account, xmlDoc, userName, authMethod, PR_FALSE);
-      result = PR_TRUE;
+      SetIdentities(pMgr, account, xmlDoc, userName, authMethod, false);
+      result = true;
       if (ppAccount)
         account.forget(ppAccount);
     }
   }
   else
-    result = PR_TRUE;
+    result = true;
   return result;
 }
 
 bool WMSettings::DoNNTPServer(nsIMsgAccountManager *pMgr,
                                 nsIDOMDocument *xmlDoc,
                                 const nsString& serverName,
                                 nsIMsgAccount **ppAccount)
 {
@@ -645,20 +645,20 @@ bool WMSettings::DoNNTPServer(nsIMsgAcco
                                     NS_LITERAL_CSTRING("nntp"),
                                     getter_AddRefs(in));
     if (NS_SUCCEEDED(rv) && in) {
 
       nsCOMPtr<nsINntpIncomingServer> nntpServer = do_QueryInterface(in);
       if (!nntpServer) {
         IMPORT_LOG1("*** Failed to create nsINnntpIncomingServer for %S!\n",
           serverName.get());
-        return PR_FALSE;
+        return false;
       }
       if (!userName.IsEmpty()) {  // if username req'd then auth req'd
-        nntpServer->SetPushAuth(PR_TRUE);
+        nntpServer->SetPushAuth(true);
         in->SetUsername(NS_ConvertUTF16toUTF8(userName));
       }
 
       nsAutoString value;
       GetValueForTag(xmlDoc, NS_LITERAL_STRING("NNTP_Port"), value);
       if (!value.IsEmpty()) {
         in->SetPort(value.ToInteger(&errorCode, 16));
       }
@@ -682,40 +682,40 @@ bool WMSettings::DoNNTPServer(nsIMsgAcco
       rv = pMgr->CreateAccount(getter_AddRefs(account));
       if (NS_SUCCEEDED(rv) && account) {
         rv = account->SetIncomingServer(in);
 
         IMPORT_LOG0("Created an account and set the NNTP server "
                     "as the incoming server\n");
 
         // Fiddle with the identities
-        SetIdentities(pMgr, account, xmlDoc, userName, authMethod, PR_TRUE);
-        result = PR_TRUE;
+        SetIdentities(pMgr, account, xmlDoc, userName, authMethod, true);
+        result = true;
         if (ppAccount)
           account.forget(ppAccount);
       }
     }
   }
   else if (NS_SUCCEEDED(rv) && in) {
     // for the existing server...
     nsCOMPtr<nsIMsgAccount> account;
     rv = pMgr->FindAccountForServer(in, getter_AddRefs(account));
     if (NS_SUCCEEDED(rv) && account) {
       IMPORT_LOG0("Using existing account and set the "
                   "NNTP server as the incoming server\n");
       // Fiddle with the identities
       in->GetAuthMethod(&authMethod);
-      SetIdentities(pMgr, account, xmlDoc, userName, authMethod, PR_TRUE);
-      result = PR_TRUE;
+      SetIdentities(pMgr, account, xmlDoc, userName, authMethod, true);
+      result = true;
       if (ppAccount)
         account.forget(ppAccount);
     }
   }
   else
-    result = PR_TRUE;
+    result = true;
   return result;
 }
 
 void WMSettings::SetIdentities(nsIMsgAccountManager *pMgr, nsIMsgAccount *pAcc,
                                nsIDOMDocument *xmlDoc, nsAutoString &inUserName,
                                PRInt32 authMethodIncoming, bool isNNTP )
 {
   // Get the relevant information for an identity
--- a/mailnews/local/src/nsLocalMailFolder.cpp
+++ b/mailnews/local/src/nsLocalMailFolder.cpp
@@ -117,21 +117,21 @@
 
 nsLocalMailCopyState::nsLocalMailCopyState() :
   m_flags(0),
   m_curDstKey(0xffffffff),
   m_curCopyIndex(0),
   m_totalMsgCount(0),
   m_dataBufferSize(0),
   m_leftOver(0),
-  m_isMove(PR_FALSE),
-  m_dummyEnvelopeNeeded(PR_FALSE),
-  m_fromLineSeen(PR_FALSE),
-  m_writeFailed(PR_FALSE),
-  m_notifyFolderLoaded(PR_FALSE)
+  m_isMove(false),
+  m_dummyEnvelopeNeeded(false),
+  m_fromLineSeen(false),
+  m_writeFailed(false),
+  m_notifyFolderLoaded(false)
 {
   LL_I2L(m_lastProgressTime, PR_IntervalToMilliseconds(PR_IntervalNow()));
 }
 
 nsLocalMailCopyState::~nsLocalMailCopyState()
 {
   PR_Free(m_dataBuffer);
   if (m_fileStream)
@@ -155,19 +155,19 @@ nsLocalFolderScanState::~nsLocalFolderSc
 {
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 // nsMsgLocalMailFolder interface
 ///////////////////////////////////////////////////////////////////////////////
 
 nsMsgLocalMailFolder::nsMsgLocalMailFolder(void)
-  : mCopyState(nsnull), mHaveReadNameFromDB(PR_FALSE),
-    mInitialized(PR_FALSE),
-    mCheckForNewMessagesAfterParsing(PR_FALSE), m_parsingFolder(PR_FALSE),
+  : mCopyState(nsnull), mHaveReadNameFromDB(false),
+    mInitialized(false),
+    mCheckForNewMessagesAfterParsing(false), m_parsingFolder(false),
     mDownloadState(DOWNLOAD_STATE_NONE)
 {
 }
 
 nsMsgLocalMailFolder::~nsMsgLocalMailFolder(void)
 {
 }
 
@@ -213,17 +213,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Crea
 NS_IMETHODIMP nsMsgLocalMailFolder::GetManyHeadersToDownload(bool *retval)
 {
   bool isLocked;
   // if the folder is locked, we're probably reparsing - let's build the
   // view when we've finished reparsing.
   GetLocked(&isLocked);
   if (isLocked)
   {
-    *retval = PR_TRUE;
+    *retval = true;
     return NS_OK;
   }
 
   return nsMsgDBFolder::GetManyHeadersToDownload(retval);
 }
 
 //run the url to parse the mailbox
 NS_IMETHODIMP nsMsgLocalMailFolder::ParseFolder(nsIMsgWindow *aMsgWindow,
@@ -259,21 +259,21 @@ nsMsgLocalMailFolder::GetSubFolders(nsIS
 
   if (!mInitialized)
   {
     nsCOMPtr<nsIMsgIncomingServer> server;
     rv = GetServer(getter_AddRefs(server));
     NS_ENSURE_SUCCESS(rv, NS_MSG_INVALID_OR_MISSING_SERVER);
     nsCOMPtr<nsIMsgPluggableStore> msgStore;
     // need to set this flag here to avoid infinite recursion
-    mInitialized = PR_TRUE;
+    mInitialized = true;
     rv = server->GetMsgStore(getter_AddRefs(msgStore));
     NS_ENSURE_SUCCESS(rv, rv);
     // This should add all existing folders as sub-folders of this folder.
-    rv = msgStore->DiscoverSubFolders(this, PR_TRUE);
+    rv = msgStore->DiscoverSubFolders(this, true);
 
     nsCOMPtr<nsILocalFile> path;
     rv = GetFilePath(getter_AddRefs(path));
     if (NS_FAILED(rv))
       return rv;
 
     bool exists, directory;
     path->Exists(&exists);
@@ -295,28 +295,28 @@ nsMsgLocalMailFolder::GetSubFolders(nsIS
         rv = GetServer(getter_AddRefs(server));
         NS_ENSURE_SUCCESS(rv, NS_MSG_INVALID_OR_MISSING_SERVER);
         localMailServer = do_QueryInterface(server, &rv);
         NS_ENSURE_SUCCESS(rv, NS_MSG_INVALID_OR_MISSING_SERVER);
 
         // first create the folders on disk (as empty files)
         rv = localMailServer->CreateDefaultMailboxes(path);
         NS_ENSURE_SUCCESS(rv, rv);
-        createdDefaultMailboxes = PR_TRUE;
+        createdDefaultMailboxes = true;
       }
 
       // must happen after CreateSubFolders, or the folders won't exist.
       if (createdDefaultMailboxes && isServer)
       {
         rv = localMailServer->SetFlagsOnDefaultMailboxes();
         if (NS_FAILED(rv))
           return rv;
       }
     }
-    UpdateSummaryTotals(PR_FALSE);
+    UpdateSummaryTotals(false);
   }
 
   return aResult ? NS_NewArrayEnumerator(aResult, mSubFolders) : NS_ERROR_NULL_POINTER;
 }
 
 nsresult nsMsgLocalMailFolder::GetDatabase()
 {
   nsCOMPtr <nsIMsgDatabase> msgDB;
@@ -372,17 +372,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::GetD
     rv = pathFile->Exists(&exists);
     NS_ENSURE_SUCCESS(rv,rv);
     if (!exists)
       return NS_ERROR_NULL_POINTER;  //mDatabase will be null at this point.
 
     nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    nsresult folderOpen = msgDBService->OpenFolderDB(this, PR_TRUE,
+    nsresult folderOpen = msgDBService->OpenFolderDB(this, true,
                                                      getter_AddRefs(mDatabase));
     if (folderOpen == NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE)
     {
       nsCOMPtr <nsIDBFolderInfo> dbFolderInfo;
       nsCOMPtr <nsIDBFolderInfo> transferInfo;
       if (mDatabase)
       {
         mDatabase->GetDBFolderInfo(getter_AddRefs(dbFolderInfo));
@@ -410,26 +410,26 @@ NS_IMETHODIMP nsMsgLocalMailFolder::GetD
           mDatabase->ForceClosed();
 
         mDatabase = nsnull;
       }
       nsCOMPtr <nsILocalFile> summaryFile;
       rv = GetSummaryFileLocation(pathFile, getter_AddRefs(summaryFile));
       NS_ENSURE_SUCCESS(rv, rv);
       // Remove summary file.
-      summaryFile->Remove(PR_FALSE);
+      summaryFile->Remove(false);
 
       // if it's out of date then reopen with upgrade.
       rv = msgDBService->CreateNewDB(this, getter_AddRefs(mDatabase));
       NS_ENSURE_SUCCESS(rv, rv);
 
       if (transferInfo && mDatabase)
       {
         SetDBTransferInfo(transferInfo);
-        mDatabase->SetSummaryValid(PR_FALSE);
+        mDatabase->SetSummaryValid(false);
       }
     }
     else if (folderOpen == NS_MSG_ERROR_FOLDER_SUMMARY_MISSING)
     {
       rv = msgDBService->CreateNewDB(this, getter_AddRefs(mDatabase));
     }
 
     if (mDatabase)
@@ -451,17 +451,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::GetD
           }
           return rv;
         }
 
         return NS_ERROR_NOT_INITIALIZED;
       }
 
       // We have a valid database so lets extract necessary info.
-      UpdateSummaryTotals(PR_TRUE);
+      UpdateSummaryTotals(true);
     }
   }
   NS_IF_ADDREF(*aMsgDatabase = mDatabase);
   return rv;
 }
 
 NS_IMETHODIMP
 nsMsgLocalMailFolder::UpdateFolder(nsIMsgWindow *aWindow)
@@ -484,17 +484,17 @@ nsMsgLocalMailFolder::UpdateFolder(nsIMs
     // don't notify folder loaded or try compaction if db isn't valid
     // (we're probably reparsing or copying msgs to it)
     if (NS_SUCCEEDED(rv) && valid)
     {
       NotifyFolderEvent(mFolderLoadedAtom);
       NS_ENSURE_SUCCESS(rv,rv);
     }
     else if (mCopyState)
-      mCopyState->m_notifyFolderLoaded = PR_TRUE; //defer folder loaded notification
+      mCopyState->m_notifyFolderLoaded = true; //defer folder loaded notification
     else if (!m_parsingFolder)// if the db was already open, it's probably OK to load it if not parsing
       NotifyFolderEvent(mFolderLoadedAtom);
   }
   bool filtersRun;
   bool hasNewMessages;
   GetHasNewMessages(&hasNewMessages);
   if (mDatabase)
     ApplyRetentionSettings();
@@ -663,17 +663,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Comp
 
       expungedBytes = 0;
       if (folder)
         rv = folder->GetExpungedBytes(&expungedBytes);
 
       NS_ENSURE_SUCCESS(rv, rv);
 
       if (expungedBytes > 0)
-        rv = folderArray->AppendElement(folder, PR_FALSE);
+        rv = folderArray->AppendElement(folder, false);
     }
     rv = folderArray->GetLength(&cnt);
     NS_ENSURE_SUCCESS(rv,rv);
     if (cnt == 0)
       return NotifyCompactCompleted();
   }
   nsCOMPtr <nsIMsgFolderCompactor> folderCompactor =  do_CreateInstance(NS_MSGLOCALFOLDERCOMPACTOR_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -701,17 +701,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Empt
   rv = GetTrashFolder(getter_AddRefs(trashFolder));
   if (NS_SUCCEEDED(rv))
   {
     PRUint32 flags;
     nsCString trashUri;
     trashFolder->GetURI(trashUri);
     trashFolder->GetFlags(&flags);
     PRInt32 totalMessages = 0;
-    rv = trashFolder->GetTotalMessages(PR_TRUE, &totalMessages);
+    rv = trashFolder->GetTotalMessages(true, &totalMessages);
 
     if (totalMessages <= 0)
     {
       nsCOMPtr<nsISimpleEnumerator> enumerator;
       rv = trashFolder->GetSubFolders(getter_AddRefs(enumerator));
       NS_ENSURE_SUCCESS(rv,rv);
       // Any folders to deal with?
       bool hasMore;
@@ -721,17 +721,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Empt
     }
     nsCOMPtr<nsIMsgFolder> parentFolder;
     rv = trashFolder->GetParent(getter_AddRefs(parentFolder));
     if (NS_SUCCEEDED(rv) && parentFolder)
     {
       nsCOMPtr <nsIDBFolderInfo> transferInfo;
       trashFolder->GetDBTransferInfo(getter_AddRefs(transferInfo));
       trashFolder->SetParent(nsnull);
-      parentFolder->PropagateDelete(trashFolder, PR_TRUE, msgWindow);
+      parentFolder->PropagateDelete(trashFolder, true, msgWindow);
       parentFolder->CreateSubfolder(NS_LITERAL_STRING("Trash"), nsnull);
       nsCOMPtr<nsIMsgFolder> newTrashFolder;
       rv = GetTrashFolder(getter_AddRefs(newTrashFolder));
       if (NS_SUCCEEDED(rv) && newTrashFolder)
       {
         nsCOMPtr <nsIMsgLocalMailFolder> localTrash = do_QueryInterface(newTrashFolder);
         newTrashFolder->SetDBTransferInfo(transferInfo);
         if (localTrash)
@@ -742,37 +742,37 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Empt
         nsCOMPtr<nsIDBFolderInfo> dbFolderInfo;
         nsCOMPtr<nsIMsgDatabase> db;
         newTrashFolder->GetDBFolderInfoAndDB(getter_AddRefs(dbFolderInfo), getter_AddRefs(db));
         if (dbFolderInfo)
         {
           dbFolderInfo->SetNumUnreadMessages(0);
           dbFolderInfo->SetNumMessages(0);
         }
-        newTrashFolder->UpdateSummaryTotals(PR_TRUE);
+        newTrashFolder->UpdateSummaryTotals(true);
       }
     }
   }
   return rv;
 }
 
 nsresult nsMsgLocalMailFolder::IsChildOfTrash(bool *result)
 {
   NS_ENSURE_ARG_POINTER(result);
   PRUint32 parentFlags = 0;
-  *result = PR_FALSE;
+  *result = false;
   bool isServer;
   nsresult rv = GetIsServer(&isServer);
   if (NS_FAILED(rv) || isServer)
     return NS_OK;
 
   rv= GetFlags(&parentFlags);  //this is the parent folder
   if (parentFlags & nsMsgFolderFlags::Trash)
   {
-    *result = PR_TRUE;
+    *result = true;
     return rv;
   }
 
   nsCOMPtr<nsIMsgFolder> parentFolder;
   nsCOMPtr<nsIMsgFolder> thisFolder;
   rv = QueryInterface(NS_GET_IID(nsIMsgFolder), (void **) getter_AddRefs(thisFolder));
 
   while (!isServer)
@@ -786,17 +786,17 @@ nsresult nsMsgLocalMailFolder::IsChildOf
       return NS_OK;
 
     rv = parentFolder->GetFlags(&parentFlags);
     if (NS_FAILED(rv))
       return NS_OK;
 
     if (parentFlags & nsMsgFolderFlags::Trash)
     {
-      *result = PR_TRUE;
+      *result = true;
       return rv;
     }
 
     thisFolder = parentFolder;
   }
   return rv;
 }
 
@@ -822,17 +822,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Dele
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr <nsILocalFile> summaryFile;
   rv = msgStore->GetSummaryFile(this, getter_AddRefs(summaryFile));
   NS_ENSURE_SUCCESS(rv, rv);
 
   //Clean up .sbd folder if it exists.
   // Remove summary file.
-  summaryFile->Remove(PR_FALSE);
+  summaryFile->Remove(false);
 
   return msgStore->DeleteFolder(this);
 }
 
 NS_IMETHODIMP nsMsgLocalMailFolder::DeleteSubFolders(nsIArray *folders, nsIMsgWindow *msgWindow)
 {
   nsresult rv;
   bool isChildOfTrash;
@@ -850,17 +850,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Dele
   nsCOMPtr<nsIMsgFolder> trashFolder;
   rv = GetTrashFolder(getter_AddRefs(trashFolder));
   if (NS_SUCCEEDED(rv))
   {
     if (folder)
     {
       nsCOMPtr<nsIMsgCopyService> copyService(do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv));
       NS_ENSURE_SUCCESS(rv, rv);
-      rv = copyService->CopyFolders(folders, trashFolder, PR_TRUE, nsnull, msgWindow);
+      rv = copyService->CopyFolders(folders, trashFolder, true, nsnull, msgWindow);
     }
   }
   return rv;
 }
 
 nsresult nsMsgLocalMailFolder::ConfirmFolderDeletion(nsIMsgWindow *aMsgWindow,
                                                      nsIMsgFolder *aFolder, bool *aResult)
 {
@@ -917,17 +917,17 @@ nsresult nsMsgLocalMailFolder::ConfirmFo
                                buttonFlags,  deleteFolderButtonLabel.get(),
                                nsnull, nsnull, nsnull, &dummyValue,
                                &buttonPressed);
         NS_ENSURE_SUCCESS(rv, rv);
         *aResult = !buttonPressed; // "ok" is in position 0
       }
     }
     else
-      *aResult = PR_TRUE;
+      *aResult = true;
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgLocalMailFolder::Rename(const nsAString& aNewName, nsIMsgWindow *msgWindow)
 {
   // Renaming to the same name is easy
   if (mName.Equals(aNewName))
@@ -962,49 +962,49 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Rena
       // we need to force the pretty name to be correct.
       // SetPrettyName won't write the name to the db if it doesn't think the
       // name has changed. This hack forces the pretty name to get set in the db.
       // We could set the new pretty name on the db before renaming the .msf file,
       // but if the rename failed, it would be out of sync.
       newFolder->SetPrettyName(EmptyString());
       newFolder->SetPrettyName(aNewName);
       bool changed = false;
-      MatchOrChangeFilterDestination(newFolder, PR_TRUE /*caseInsenstive*/, &changed);
+      MatchOrChangeFilterDestination(newFolder, true /*caseInsenstive*/, &changed);
       if (changed)
         AlertFilterChanged(msgWindow);
 
       if (count > 0)
         newFolder->RenameSubFolders(msgWindow, this);
 
       // Discover the subfolders inside this folder (this is recursive)
       newFolder->GetSubFolders(nsnull);
 
       // the newFolder should have the same flags
       newFolder->SetFlags(mFlags);
       if (parentFolder)
       {
         SetParent(nsnull);
-        parentFolder->PropagateDelete(this, PR_FALSE, msgWindow);
+        parentFolder->PropagateDelete(this, false, msgWindow);
         parentFolder->NotifyItemAdded(newFolder);
       }
       SetFilePath(nsnull); // forget our path, since this folder object renamed itself
       nsCOMPtr<nsIAtom> folderRenameAtom = MsgGetAtom("RenameCompleted");
       newFolder->NotifyFolderEvent(folderRenameAtom);
 
       nsCOMPtr<nsIMsgFolderNotificationService> notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
       if (notifier)
         notifier->NotifyFolderRenamed(this, newFolder);
     }
   return rv;
 }
 
 NS_IMETHODIMP nsMsgLocalMailFolder::RenameSubFolders(nsIMsgWindow *msgWindow, nsIMsgFolder *oldFolder)
 {
   nsresult rv =NS_OK;
-  mInitialized = PR_TRUE;
+  mInitialized = true;
 
   PRUint32 flags;
   oldFolder->GetFlags(&flags);
   SetFlags(flags);
 
   nsCOMPtr<nsISimpleEnumerator> enumerator;
   rv = oldFolder->GetSubFolders(getter_AddRefs(enumerator));
   NS_ENSURE_SUCCESS(rv, rv);
@@ -1022,17 +1022,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Rena
     nsString folderName;
     rv = msgFolder->GetName(folderName);
     nsCOMPtr <nsIMsgFolder> newFolder;
     AddSubfolder(folderName, getter_AddRefs(newFolder));
     if (newFolder)
     {
       newFolder->SetPrettyName(folderName);
       bool changed = false;
-      msgFolder->MatchOrChangeFilterDestination(newFolder, PR_TRUE /*caseInsenstive*/, &changed);
+      msgFolder->MatchOrChangeFilterDestination(newFolder, true /*caseInsenstive*/, &changed);
       if (changed)
         msgFolder->AlertFilterChanged(msgWindow);
       newFolder->RenameSubFolders(msgWindow, msgFolder);
     }
   }
   return NS_OK;
 }
 
@@ -1048,50 +1048,50 @@ NS_IMETHODIMP nsMsgLocalMailFolder::SetP
   nsCString folderName;
   rv = GetStringProperty("folderName", folderName);
   NS_ConvertUTF16toUTF8 utf8FolderName(mName);
   return NS_FAILED(rv) || !folderName.Equals(utf8FolderName) ? SetStringProperty("folderName", utf8FolderName) : rv;
 }
 
 NS_IMETHODIMP nsMsgLocalMailFolder::GetName(nsAString& aName)
 {
-  ReadDBFolderInfo(PR_FALSE);
+  ReadDBFolderInfo(false);
   return nsMsgDBFolder::GetName(aName);
 }
 
 nsresult nsMsgLocalMailFolder::OpenDatabase()
 {
   nsresult rv;
   nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   bool folderEmpty = false;
   nsCOMPtr <nsILocalFile> file;
   rv = GetFilePath(getter_AddRefs(file));
 
-  rv = msgDBService->OpenFolderDB(this, PR_TRUE, getter_AddRefs(mDatabase));
+  rv = msgDBService->OpenFolderDB(this, true, getter_AddRefs(mDatabase));
     if (rv == NS_MSG_ERROR_FOLDER_SUMMARY_MISSING)
     {
     // check if we're a real folder by looking at the parent folder.
     nsCOMPtr<nsIMsgFolder> parent;
     GetParent(getter_AddRefs(parent));
     if (parent)
     {
       // This little dance creates an empty .msf file and then checks
       // if the db is valid - this works if the folder is empty, which
       // we don't have a direct way of checking.
       nsCOMPtr<nsIMsgDatabase> db;
       rv = msgDBService->CreateNewDB(this, getter_AddRefs(db));
       if (db)
       {
-        UpdateSummaryTotals(PR_TRUE);
-        db->Close(PR_TRUE);
+        UpdateSummaryTotals(true);
+        db->Close(true);
         mDatabase = nsnull;
         db = nsnull;
-        rv = msgDBService->OpenFolderDB(this, PR_FALSE,
+        rv = msgDBService->OpenFolderDB(this, false,
                                         getter_AddRefs(mDatabase));
         if (NS_FAILED(rv))
           mDatabase = nsnull;
       }
     }
   }
   else if (NS_FAILED(rv))
     mDatabase = nsnull;
@@ -1160,17 +1160,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::GetR
 #ifdef HAVE_PORT
   if (m_expungedBytes > 0)
   {
     PRInt32 purgeThreshhold = m_master->GetPrefs()->GetPurgeThreshhold();
     bool purgePrompt = m_master->GetPrefs()->GetPurgeThreshholdEnabled();
     return (purgePrompt && m_expungedBytes / 1000L > purgeThreshhold);
   }
 
-  return PR_FALSE;
+  return false;
 #endif
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgLocalMailFolder::RefreshSizeOnDisk()
 {
   PRUint32 oldFolderSize = mFolderSize;
@@ -1248,56 +1248,56 @@ nsMsgLocalMailFolder::DeleteMessages(nsI
   {
     nsCOMPtr<nsIMsgFolder> trashFolder;
     rv = GetTrashFolder(getter_AddRefs(trashFolder));
     if (NS_SUCCEEDED(rv))
     {
       nsCOMPtr<nsIMsgCopyService> copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv);
       NS_ENSURE_SUCCESS(rv, rv);
       return copyService->CopyMessages(this, messages, trashFolder,
-                                       PR_TRUE, listener, msgWindow, allowUndo);
+                                       true, listener, msgWindow, allowUndo);
     }
   }
   else
   {
     nsCOMPtr <nsIMsgDatabase> msgDB;
     rv = GetDatabaseWOReparse(getter_AddRefs(msgDB));
     if (NS_SUCCEEDED(rv))
     {
       if (deleteStorage && isMove && GetDeleteFromServerOnMove())
         MarkMsgsOnPop3Server(messages, POP3_DELETE);
 
       nsCOMPtr<nsISupports> msgSupport;
-      rv = EnableNotifications(allMessageCountNotifications, PR_FALSE, PR_TRUE /*dbBatching*/);
+      rv = EnableNotifications(allMessageCountNotifications, false, true /*dbBatching*/);
       if (NS_SUCCEEDED(rv))
       {
         nsCOMPtr<nsIMsgPluggableStore> msgStore;
         rv = GetMsgStore(getter_AddRefs(msgStore));
         if (NS_SUCCEEDED(rv))
         {
           rv = msgStore->DeleteMessages(messages);
           GetDatabase();
           nsCOMPtr<nsIMsgDBHdr> msgDBHdr;
           if (mDatabase)
           {
         for (PRUint32 i = 0; i < messageCount; ++i)
         {
               msgDBHdr = do_QueryElementAt(messages, i, &rv);
-              rv = mDatabase->DeleteHeader(msgDBHdr, nsnull, PR_FALSE, PR_TRUE);
+              rv = mDatabase->DeleteHeader(msgDBHdr, nsnull, false, true);
             }
           }
         }
       }
       else if (rv == NS_MSG_FOLDER_BUSY)
         ThrowAlertMsg("deletingMsgsFailed", msgWindow);
 
       // we are the source folder here for a move or shift delete
       //enable notifications because that will close the file stream
       // we've been caching, mark the db as valid, and commit it.
-      EnableNotifications(allMessageCountNotifications, PR_TRUE, PR_TRUE /*dbBatching*/);
+      EnableNotifications(allMessageCountNotifications, true, true /*dbBatching*/);
       if (!isMove)
         NotifyFolderEvent(NS_SUCCEEDED(rv) ? mDeleteOrMoveMsgCompletedAtom : mDeleteOrMoveMsgFailedAtom);
       if (msgWindow && !isMove)
         AutoCompact(msgWindow);
     }
   }
   return rv;
 }
@@ -1374,18 +1374,18 @@ nsMsgLocalMailFolder::InitCopyState(nsIS
   mCopyState->m_curCopyIndex = 0;
   mCopyState->m_isMove = isMove;
   mCopyState->m_isFolder = isFolder;
   mCopyState->m_allowUndo = allowUndo;
   mCopyState->m_msgWindow = msgWindow;
   rv = messages->GetLength(&mCopyState->m_totalMsgCount);
   if (listener)
     mCopyState->m_listener = do_QueryInterface(listener, &rv);
-  mCopyState->m_copyingMultipleMessages = PR_FALSE;
-  mCopyState->m_wholeMsgInStream = PR_FALSE;
+  mCopyState->m_copyingMultipleMessages = false;
+  mCopyState->m_wholeMsgInStream = false;
 
   // If we have source messages then we need destination messages too.
   if (messages)
     mCopyState->m_destMessages = do_CreateInstance(NS_ARRAY_CONTRACTID);
 
   return rv;
 }
 
@@ -1409,22 +1409,22 @@ nsMsgLocalMailFolder::OnCopyCompleted(ns
   if (NS_SUCCEEDED(rv) && haveSemaphore)
     ReleaseSemaphore(static_cast<nsIMsgLocalMailFolder*>(this));
 
   if (mCopyState && !mCopyState->m_newMsgKeywords.IsEmpty() &&
       mCopyState->m_newHdr)
   {
     nsCOMPtr<nsIMutableArray> messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv));
     NS_ENSURE_TRUE(messageArray, rv);
-    messageArray->AppendElement(mCopyState->m_newHdr, PR_FALSE);
+    messageArray->AppendElement(mCopyState->m_newHdr, false);
     AddKeywordsToMessages(messageArray, mCopyState->m_newMsgKeywords);
   }
   if (moveCopySucceeded && mDatabase)
   {
-    mDatabase->SetSummaryValid(PR_TRUE);
+    mDatabase->SetSummaryValid(true);
     (void) CloseDBIfFolderNotOpen();
   }
 
   delete mCopyState;
   mCopyState = nsnull;
   nsCOMPtr<nsIMsgCopyService> copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   return copyService->NotifyCompletion(srcSupport, this, moveCopySucceeded ? NS_OK : NS_ERROR_FAILURE);
@@ -1441,17 +1441,17 @@ nsMsgLocalMailFolder::SortMessagesBasedO
   nsCOMPtr<nsIMsgDatabase> db;
   rv = srcFolder->GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), getter_AddRefs(db));
   if (NS_SUCCEEDED(rv) && db)
     for (PRUint32 i=0;i < numMessages; i++)
     {
       rv = db->GetMsgHdrForKey(aKeyArray[i], getter_AddRefs(msgHdr));
       NS_ENSURE_SUCCESS(rv,rv);
       if (msgHdr)
-        messages->AppendElement(msgHdr, PR_FALSE);
+        messages->AppendElement(msgHdr, false);
     }
   return rv;
 }
 
 bool nsMsgLocalMailFolder::CheckIfSpaceForCopy(nsIMsgWindow *msgWindow,
                                                  nsIMsgFolder *srcFolder,
                                                  nsISupports *srcSupports,
                                                  bool isMove,
@@ -1462,20 +1462,20 @@ bool nsMsgLocalMailFolder::CheckIfSpaceF
   NS_ENSURE_SUCCESS(rv, rv);
   bool spaceAvailable;
   rv = msgStore->HasSpaceAvailable(this, totalMsgSize, &spaceAvailable);
   if (!spaceAvailable)
   {
     ThrowAlertMsg("mailboxTooLarge", msgWindow);
     if (isMove && srcFolder)
       srcFolder->NotifyFolderEvent(mDeleteOrMoveMsgFailedAtom);
-    OnCopyCompleted(srcSupports, PR_FALSE);
-    return PR_FALSE;
+    OnCopyCompleted(srcSupports, false);
+    return false;
   }
-  return PR_TRUE;
+  return true;
 }
 
 NS_IMETHODIMP
 nsMsgLocalMailFolder::CopyMessages(nsIMsgFolder* srcFolder, nsIArray*
                                    messages, bool isMove,
                                    nsIMsgWindow *msgWindow,
                                    nsIMsgCopyServiceListener* listener,
                                    bool isFolder, bool allowUndo)
@@ -1483,17 +1483,17 @@ nsMsgLocalMailFolder::CopyMessages(nsIMs
   nsCOMPtr<nsISupports> srcSupport = do_QueryInterface(srcFolder);
   bool isServer;
   nsresult rv = GetIsServer(&isServer);
   if (NS_SUCCEEDED(rv) && isServer)
   {
     NS_ERROR("Destination is the root folder. Cannot move/copy here");
     if (isMove)
       srcFolder->NotifyFolderEvent(mDeleteOrMoveMsgFailedAtom);
-    return OnCopyCompleted(srcSupport, PR_FALSE);
+    return OnCopyCompleted(srcSupport, false);
   }
 
   UpdateTimestamps(allowUndo);
   nsCString protocolType;
   rv = srcFolder->GetURI(protocolType);
   protocolType.SetLength(protocolType.FindChar(':'));
 
   bool needOfflineBody = (WeAreOffline() &&
@@ -1521,17 +1521,17 @@ nsMsgLocalMailFolder::CopyMessages(nsIMs
         bool hasMsgOffline = false;
         message->GetMessageKey(&key);
         srcFolder->HasMsgOffline(key, &hasMsgOffline);
         if (!hasMsgOffline)
         {
           if (isMove)
             srcFolder->NotifyFolderEvent(mDeleteOrMoveMsgFailedAtom);
           ThrowAlertMsg("cantMoveMsgWOBodyOffline", msgWindow);
-          return OnCopyCompleted(srcSupport, PR_FALSE);
+          return OnCopyCompleted(srcSupport, false);
         }
       }
     }
   }
 
   if (!CheckIfSpaceForCopy(msgWindow, srcFolder, srcSupport, isMove,
                            totalMsgSize))
     return NS_OK;
@@ -1543,17 +1543,17 @@ nsMsgLocalMailFolder::CopyMessages(nsIMs
   NS_ENSURE_SUCCESS(rv, rv);
   rv = msgStore->CopyMessages(isMove, messages, this, listener, &storeDidCopy);
   if (storeDidCopy)
     return rv;
   // If the store doesn't do the copy, we'll stream the source messages into
   // the target folder, using getMsgInputStream and getNewMsgOutputStream.
 
   // don't update the counts in the dest folder until it is all over
-  EnableNotifications(allMessageCountNotifications, PR_FALSE, PR_FALSE /*dbBatching*/);  //dest folder doesn't need db batching
+  EnableNotifications(allMessageCountNotifications, false, false /*dbBatching*/);  //dest folder doesn't need db batching
 
   // sort the message array by key
   PRUint32 numMsgs = 0;
   messages->GetLength(&numMsgs);
   nsTArray<nsMsgKey> keyArray(numMsgs);
   if (numMsgs > 1)
   {
     for (PRUint32 i = 0; i < numMsgs; i++)
@@ -1576,23 +1576,23 @@ nsMsgLocalMailFolder::CopyMessages(nsIMs
     rv = InitCopyState(srcSupport, sortedMsgs, isMove, listener, msgWindow, isFolder, allowUndo);
   }
   else
     rv = InitCopyState(srcSupport, messages, isMove, listener, msgWindow, isFolder, allowUndo);
 
   if (NS_FAILED(rv))
   {
     ThrowAlertMsg("operationFailedFolderBusy", msgWindow);
-    (void) OnCopyCompleted(srcSupport, PR_FALSE);
+    (void) OnCopyCompleted(srcSupport, false);
     return rv;
   }
 
   if (!MsgLowerCaseEqualsLiteral(protocolType, "mailbox"))
   {
-    mCopyState->m_dummyEnvelopeNeeded = PR_TRUE;
+    mCopyState->m_dummyEnvelopeNeeded = true;
     nsParseMailMessageState* parseMsgState = new nsParseMailMessageState();
     if (parseMsgState)
     {
       nsCOMPtr<nsIMsgDatabase> msgDb;
       mCopyState->m_parseMsgState = parseMsgState;
       GetDatabaseWOReparse(getter_AddRefs(msgDb));
       if (msgDb)
         parseMsgState->SetMailDB(msgDb);
@@ -1617,53 +1617,53 @@ nsMsgLocalMailFolder::CopyMessages(nsIMs
         msgTxn->SetTransactionType(nsIMessenger::eCopyMsg);
       msgTxn.swap(mCopyState->m_undoMsgTxn);
     }
   }
 
   if (numMsgs > 1 && ((MsgLowerCaseEqualsLiteral(protocolType, "imap") && !WeAreOffline()) ||
                       MsgLowerCaseEqualsLiteral(protocolType, "mailbox")))
   {
-    mCopyState->m_copyingMultipleMessages = PR_TRUE;
+    mCopyState->m_copyingMultipleMessages = true;
     rv = CopyMessagesTo(mCopyState->m_messages, keyArray, msgWindow, this, isMove);
     if (NS_FAILED(rv))
     {
       NS_ERROR("copy message failed");
-      (void) OnCopyCompleted(srcSupport, PR_FALSE);
+      (void) OnCopyCompleted(srcSupport, false);
     }
   }
   else
   {
     nsCOMPtr<nsISupports> msgSupport = do_QueryElementAt(mCopyState->m_messages, 0);
     if (msgSupport)
     {
       rv = CopyMessageTo(msgSupport, this, msgWindow, isMove);
       if (NS_FAILED(rv))
       {
-        NS_ASSERTION(PR_FALSE, "copy message failed");
-        (void) OnCopyCompleted(srcSupport, PR_FALSE);
+        NS_ASSERTION(false, "copy message failed");
+        (void) OnCopyCompleted(srcSupport, false);
       }
     }
   }
   // if this failed immediately, need to turn back on notifications and inform FE.
   if (NS_FAILED(rv))
   {
     if (isMove)
       srcFolder->NotifyFolderEvent(mDeleteOrMoveMsgFailedAtom);
-    EnableNotifications(allMessageCountNotifications, PR_TRUE, PR_FALSE /*dbBatching*/);  //dest folder doesn't need db batching
+    EnableNotifications(allMessageCountNotifications, true, false /*dbBatching*/);  //dest folder doesn't need db batching
   }
   return rv;
 }
 // for srcFolder that are on different server than the dstFolder.
 // "this" is the parent of the new dest folder.
 nsresult
 nsMsgLocalMailFolder::CopyFolderAcrossServer(nsIMsgFolder* srcFolder, nsIMsgWindow *msgWindow,
                   nsIMsgCopyServiceListener *listener )
 {
-  mInitialized = PR_TRUE;
+  mInitialized = true;
 
   nsString folderName;
   srcFolder->GetName(folderName);
 
   nsCOMPtr<nsIMsgFolder> newMsgFolder;
   nsresult rv = CreateSubfolderInternal(folderName, msgWindow, getter_AddRefs(newMsgFolder));
   NS_ENSURE_SUCCESS(rv, rv);
 
@@ -1676,36 +1676,36 @@ nsMsgLocalMailFolder::CopyFolderAcrossSe
   nsCOMPtr<nsISupports> aSupport;
 
   if (messages)
     messages->HasMoreElements(&hasMoreElements);
 
   while (hasMoreElements && NS_SUCCEEDED(rv))
   {
     rv = messages->GetNext(getter_AddRefs(aSupport));
-    rv = msgArray->AppendElement(aSupport, PR_FALSE);
+    rv = msgArray->AppendElement(aSupport, false);
     messages->HasMoreElements(&hasMoreElements);
   }
 
   PRUint32 numMsgs=0;
   msgArray->GetLength(&numMsgs);
 
   if (numMsgs > 0 )   //if only srcFolder has messages..
-    newMsgFolder->CopyMessages(srcFolder, msgArray, PR_FALSE, msgWindow, listener, PR_TRUE /* is folder*/, PR_FALSE /* allowUndo */);
+    newMsgFolder->CopyMessages(srcFolder, msgArray, false, msgWindow, listener, true /* is folder*/, false /* allowUndo */);
   else
   {
     nsCOMPtr <nsIMsgLocalMailFolder> localFolder = do_QueryInterface(newMsgFolder);
     if (localFolder)
     {
       // normally these would get called from ::EndCopy when the last message
       // was finished copying. But since there are no messages, we have to call
       // them explicitly.
       nsCOMPtr<nsISupports> srcSupports = do_QueryInterface(newMsgFolder);
       localFolder->CopyAllSubFolders(srcFolder, msgWindow, listener);
-      return localFolder->OnCopyCompleted(srcSupports, PR_TRUE);
+      return localFolder->OnCopyCompleted(srcSupports, true);
     }
   }
   return NS_OK;  // otherwise the front-end will say Exception::CopyFolder
 }
 
 nsresult    //copy the sub folders
 nsMsgLocalMailFolder::CopyAllSubFolders(nsIMsgFolder *srcFolder,
                                       nsIMsgWindow *msgWindow,
@@ -1740,17 +1740,17 @@ nsMsgLocalMailFolder::CopyFolder( nsIMsg
 }
 
 NS_IMETHODIMP
 nsMsgLocalMailFolder::CopyFolderLocal(nsIMsgFolder *srcFolder,
                                       bool isMoveFolder,
                                       nsIMsgWindow *msgWindow,
                                       nsIMsgCopyServiceListener *aListener)
 {
-  mInitialized = PR_TRUE;
+  mInitialized = true;
   bool isChildOfTrash;
   nsresult rv = IsChildOfTrash(&isChildOfTrash);
   if (NS_SUCCEEDED(rv) && isChildOfTrash)
   {
     // do it just for the parent folder (isMoveFolder is true for parent only) if we are deleting/moving a folder tree
     // don't confirm for rss folders.
     if (isMoveFolder)
     {
@@ -1764,17 +1764,17 @@ nsMsgLocalMailFolder::CopyFolderLocal(ns
           return NS_MSG_ERROR_COPY_FOLDER_ABORTED;
       }
       // if we are moving a favorite folder to trash, we should clear the favorites flag
       // so it gets removed from the view.
       srcFolder->ClearFlag(nsMsgFolderFlags::Favorite);
     }
 
     bool match = false;
-    rv = srcFolder->MatchOrChangeFilterDestination(nsnull, PR_FALSE, &match);
+    rv = srcFolder->MatchOrChangeFilterDestination(nsnull, false, &match);
     if (match && msgWindow)
     {
       bool confirmed = false;
       srcFolder->ConfirmFolderDeletionForFilter(msgWindow, &confirmed);
       if (!confirmed)
         return NS_MSG_ERROR_COPY_FOLDER_ABORTED;
     }
   }
@@ -1803,26 +1803,26 @@ nsMsgLocalMailFolder::CopyFileMessage(ns
   NS_ENSURE_ARG_POINTER(aFile);
   nsresult rv = NS_ERROR_NULL_POINTER;
   nsParseMailMessageState* parseMsgState = nsnull;
   PRInt64 fileSize = 0;
 
   nsCOMPtr<nsISupports> fileSupport(do_QueryInterface(aFile, &rv));
 
   aFile->GetFileSize(&fileSize);
-  if (!CheckIfSpaceForCopy(msgWindow, nsnull, fileSupport, PR_FALSE, fileSize))
+  if (!CheckIfSpaceForCopy(msgWindow, nsnull, fileSupport, false, fileSize))
     return NS_OK;
 
   nsCOMPtr<nsIMutableArray> messages(do_CreateInstance(NS_ARRAY_CONTRACTID));
 
   if (msgToReplace)
-    messages->AppendElement(msgToReplace, PR_FALSE);
-
-  rv = InitCopyState(fileSupport, messages, msgToReplace ? PR_TRUE : PR_FALSE,
-                     listener, msgWindow, PR_FALSE, PR_FALSE);
+    messages->AppendElement(msgToReplace, false);
+
+  rv = InitCopyState(fileSupport, messages, msgToReplace ? true : false,
+                     listener, msgWindow, false, false);
   if (NS_SUCCEEDED(rv))
   {
     if (mCopyState)
       mCopyState->m_newMsgKeywords = aNewMsgKeywords;
 
     parseMsgState = new nsParseMailMessageState();
     NS_ENSURE_TRUE(parseMsgState, NS_ERROR_OUT_OF_MEMORY);
       nsCOMPtr<nsIMsgDatabase> msgDb;
@@ -1841,46 +1841,46 @@ nsMsgLocalMailFolder::CopyFileMessage(ns
     if (NS_SUCCEEDED(rv) && inputStream) 
     {
       char buffer[5];
       PRUint32 readCount;
       rv = inputStream->Read(buffer, 5, &readCount);
       if (NS_SUCCEEDED(rv)) 
       {
         if (strncmp(buffer, "From ", 5))
-          mCopyState->m_dummyEnvelopeNeeded = PR_TRUE;
+          mCopyState->m_dummyEnvelopeNeeded = true;
         nsCOMPtr <nsISeekableStream> seekableStream = do_QueryInterface(inputStream, &rv);
         if (NS_SUCCEEDED(rv))
           seekableStream->Seek(nsISeekableStream::NS_SEEK_SET, 0);
       }
     }
 
-     mCopyState->m_wholeMsgInStream = PR_TRUE;
+     mCopyState->m_wholeMsgInStream = true;
      if (NS_SUCCEEDED(rv))
       rv = BeginCopy(nsnull);
 
     if (NS_SUCCEEDED(rv))
       rv = CopyData(inputStream, (PRInt32) fileSize);
 
     if (NS_SUCCEEDED(rv))
-      rv = EndCopy(PR_TRUE);
+      rv = EndCopy(true);
 
     //mDatabase should have been initialized above - if we got msgDb
     // If we were going to delete, here is where we would do it. But because
     // existing code already supports doing those deletes, we are just going
     // to end the copy.
     if (NS_SUCCEEDED(rv) && msgToReplace && mDatabase)
-      rv = OnCopyCompleted(fileSupport, PR_TRUE);
+      rv = OnCopyCompleted(fileSupport, true);
 
     if (inputStream)
       inputStream->Close();
   }
 
   if (NS_FAILED(rv))
-    (void) OnCopyCompleted(fileSupport, PR_FALSE);
+    (void) OnCopyCompleted(fileSupport, false);
 
   return rv;
 }
 
 nsresult nsMsgLocalMailFolder::DeleteMessage(nsISupports *message,
                                              nsIMsgWindow *msgWindow,
                                              bool deleteStorage, bool commit)
 {
@@ -1888,17 +1888,17 @@ nsresult nsMsgLocalMailFolder::DeleteMes
   if (deleteStorage)
   {
     nsCOMPtr <nsIMsgDBHdr> msgDBHdr(do_QueryInterface(message, &rv));
 
     if (NS_SUCCEEDED(rv))
     {
       GetDatabase();
       if (mDatabase)
-        rv = mDatabase->DeleteHeader(msgDBHdr, nsnull, commit, PR_TRUE);
+        rv = mDatabase->DeleteHeader(msgDBHdr, nsnull, commit, true);
     }
   }
   return rv;
 }
 
 NS_IMETHODIMP nsMsgLocalMailFolder::GetNewMessages(nsIMsgWindow *aWindow, nsIUrlListener *aListener)
 {
   nsCOMPtr<nsIMsgIncomingServer> server;
@@ -1927,17 +1927,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::GetN
     bool valid = false;
     nsCOMPtr <nsIMsgDatabase> db;
     // this will kick off a reparse if the db is out of date.
     rv = localInbox->GetDatabaseWithReparse(nsnull, aWindow, getter_AddRefs(db));
     if (NS_SUCCEEDED(rv))
     {
       db->GetSummaryValid(&valid);
       rv = valid ? localMailServer->GetNewMail(aWindow, aListener, inbox, nsnull) :
-                   localInbox->SetCheckForNewMessagesAfterParsing(PR_TRUE);
+                   localInbox->SetCheckForNewMessagesAfterParsing(true);
     }
   }
   return rv;
 }
 
 nsresult nsMsgLocalMailFolder::WriteStartOfNewMessage()
 {
   nsCOMPtr <nsISeekableStream> seekableStream = do_QueryInterface(mCopyState->m_fileStream);
@@ -1991,20 +1991,20 @@ nsresult nsMsgLocalMailFolder::WriteStar
     if (mCopyState->m_parseMsgState)
         mCopyState->m_parseMsgState->ParseAFolderLine(
           result.get(), result.Length());
     result = X_MOZILLA_KEYWORDS;
     mCopyState->m_fileStream->Write(result.get(), result.Length(), &bytesWritten);
     if (mCopyState->m_parseMsgState)
         mCopyState->m_parseMsgState->ParseAFolderLine(
           result.get(), result.Length());
-   mCopyState->m_fromLineSeen = PR_TRUE;
+   mCopyState->m_fromLineSeen = true;
   }
   else
-    mCopyState->m_fromLineSeen = PR_FALSE;
+    mCopyState->m_fromLineSeen = false;
 
   mCopyState->m_curCopyIndex++;
   return NS_OK;
 }
 
 nsresult nsMsgLocalMailFolder::InitCopyMsgHdrAndFileStream()
 {
   nsCOMPtr<nsIMsgPluggableStore> msgStore;
@@ -2118,34 +2118,34 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Copy
 
     //need to set the linebreak_len each time
     PRUint32 linebreak_len = 1; //assume CR or LF
     if (*end == '\r' && *(end+1) == '\n')
       linebreak_len = 2;  //CRLF
 
     if (!mCopyState->m_fromLineSeen)
     {
-      mCopyState->m_fromLineSeen = PR_TRUE;
+      mCopyState->m_fromLineSeen = true;
       NS_ASSERTION(strncmp(start, "From ", 5) == 0,
         "Fatal ... bad message format\n");
     }
     else if (strncmp(start, "From ", 5) == 0)
     {
       //if we're at the beginning of the buffer, we've reserved a byte to
       //insert a '>'.  If we're in the middle, we're overwriting the previous
       //line ending, but we've already written it to m_fileStream, so it's OK.
       *--start = '>';
     }
 
     lineLength = end - start + linebreak_len;
     rv = mCopyState->m_fileStream->Write(start, lineLength, &bytesWritten);
     if (bytesWritten != lineLength || NS_FAILED(rv))
     {
       ThrowAlertMsg("copyMsgWriteFailed", mCopyState->m_msgWindow);
-      mCopyState->m_writeFailed = PR_TRUE;
+      mCopyState->m_writeFailed = true;
       return NS_MSG_ERROR_WRITING_MAIL_FOLDER;
     }
 
     if (mCopyState->m_parseMsgState)
       mCopyState->m_parseMsgState->ParseAFolderLine(start, lineLength);
 
     start = end + linebreak_len;
     if (start >= endBuffer)
@@ -2229,36 +2229,36 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndC
       mCopyState->m_msgStore->DiscardNewMessage(mCopyState->m_fileStream,
                                                 mCopyState->m_newHdr);
 
     if (mCopyState->m_fileStream)
       mCopyState->m_fileStream->Close();
 
     if (!mCopyState->m_isMove)
     {
-      // passing PR_TRUE because the messages that have been successfully 
+      // passing true because the messages that have been successfully 
       // copied have their corresponding hdrs in place. The message that has 
       // failed has been truncated so the msf file and berkeley mailbox 
       // are in sync.
-      (void) OnCopyCompleted(mCopyState->m_srcSupport, PR_TRUE);
+      (void) OnCopyCompleted(mCopyState->m_srcSupport, true);
       // enable the dest folder
-      EnableNotifications(allMessageCountNotifications, PR_TRUE, PR_FALSE /*dbBatching*/); //dest folder doesn't need db batching
+      EnableNotifications(allMessageCountNotifications, true, false /*dbBatching*/); //dest folder doesn't need db batching
     }
     return NS_OK;
   }
 
   bool multipleCopiesFinished = (mCopyState->m_curCopyIndex >= mCopyState->m_totalMsgCount);
 
   nsRefPtr<nsLocalMoveCopyMsgTxn> localUndoTxn = mCopyState->m_undoMsgTxn;
 
   nsCOMPtr <nsISeekableStream> seekableStream;
   NS_ASSERTION(mCopyState->m_leftOver == 0, "whoops, something wrong with previous copy");
   mCopyState->m_leftOver = 0; // reset to 0.
   // need to reset this in case we're move/copying multiple msgs.
-  mCopyState->m_fromLineSeen = PR_FALSE;
+  mCopyState->m_fromLineSeen = false;
 
   // flush the copied message. We need a close at the end to get the
   // file size and time updated correctly.
   if (mCopyState->m_fileStream)
   {
     seekableStream = do_QueryInterface(mCopyState->m_fileStream);
     if (mCopyState->m_dummyEnvelopeNeeded)
     {
@@ -2304,30 +2304,30 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndC
         {
           newHdr = mCopyState->m_newHdr;
           CopyHdrPropertiesWithSkipList(newHdr, mCopyState->m_message,
                                         NS_LITERAL_CSTRING("storeToken msgOffset"));
 //          UpdateNewMsgHdr(mCopyState->m_message, newHdr);
           // We need to copy more than just what UpdateNewMsgHdr does. In fact,
           // I think we want to copy almost every property other than
           // storeToken and msgOffset.
-          mCopyState->m_destDB->AddNewHdrToDB(newHdr, PR_TRUE);
+          mCopyState->m_destDB->AddNewHdrToDB(newHdr, true);
         }
         else
         {
         rv = mCopyState->m_destDB->CopyHdrFromExistingHdr(mCopyState->m_curDstKey,
-          mCopyState->m_message, PR_TRUE,
+          mCopyState->m_message, true,
           getter_AddRefs(newHdr));
         }
         PRUint32 newHdrFlags;
         if (newHdr)
         {
           // turn off offline flag - it's not valid for local mail folders.
           newHdr->AndFlags(~nsMsgMessageFlags::Offline, &newHdrFlags);
-          mCopyState->m_destMessages->AppendElement(newHdr, PR_FALSE);
+          mCopyState->m_destMessages->AppendElement(newHdr, false);
         }
       }
       // we can do undo with the dest folder db, see bug #198909
       //else
       //  mCopyState->m_undoMsgTxn = nsnull; //null out the transaction because we can't undo w/o the msg db
     }
 
     // if we plan on allowing undo, (if we have a mCopyState->m_parseMsgState or not)
@@ -2378,29 +2378,29 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndC
           PRUint32 newFlags;
           newHdr->GetFlags(&newFlags);
           newHdr->SetFlags( (newFlags & ~readAndNew) | 
                             ((mCopyState->m_flags) & readAndNew));
 
           // Copy other message properties.
           CopyPropertiesToMsgHdr(newHdr, mCopyState->m_message, mCopyState->m_isMove);
         }
-        msgDb->AddNewHdrToDB(newHdr, PR_TRUE);
+        msgDb->AddNewHdrToDB(newHdr, true);
         if (localUndoTxn)
         {
           // ** jt - recording the message size for possible undo use; the
           // message size is different for pop3 and imap4 messages
           PRUint32 msgSize;
           newHdr->GetMessageSize(&msgSize);
           localUndoTxn->AddDstMsgSize(msgSize);
         }
 
-        mCopyState->m_destMessages->AppendElement(newHdr, PR_FALSE);
+        mCopyState->m_destMessages->AppendElement(newHdr, false);
       }
-      // msgDb->SetSummaryValid(PR_TRUE);
+      // msgDb->SetSummaryValid(true);
       // msgDb->Commit(nsMsgDBCommitType::kLargeCommit);
     }
     else
       mCopyState->m_undoMsgTxn = nsnull; //null out the transaction because we can't undo w/o the msg db
 
     mCopyState->m_parseMsgState->Clear();
     if (mCopyState->m_listener) // CopyFileMessage() only
       mCopyState->m_listener->SetMessageKey((PRUint32) mCopyState->m_curDstKey);
@@ -2447,42 +2447,42 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndC
         {
           nsCOMPtr<nsITransactionManager> txnMgr;
           mCopyState->m_msgWindow->GetTransactionManager(getter_AddRefs(txnMgr));
           if (txnMgr)
             txnMgr->DoTransaction(mCopyState->m_undoMsgTxn);
         }
 
         // enable the dest folder
-        EnableNotifications(allMessageCountNotifications, PR_TRUE, PR_FALSE /*dbBatching*/); //dest folder doesn't need db batching
+        EnableNotifications(allMessageCountNotifications, true, false /*dbBatching*/); //dest folder doesn't need db batching
         if (srcFolder && !mCopyState->m_isFolder)
         {
           // I'm not too sure of the proper location of this event. It seems to need to be
           // after the EnableNotifications, or the folder counts can be incorrect
           // during the mDeleteOrMoveMsgCompletedAtom call.
           srcFolder->NotifyFolderEvent(mDeleteOrMoveMsgCompletedAtom);
         }
-        (void) OnCopyCompleted(mCopyState->m_srcSupport, PR_TRUE);
+        (void) OnCopyCompleted(mCopyState->m_srcSupport, true);
       }
     }
     // Send the itemAdded notification in case we didn't send the itemMoveCopyCompleted notification earlier.
     // Posting news messages involves this, yet doesn't have the newHdr initialized, so don't send any
     // notifications in that case.
     if (!numHdrs && newHdr)
     {
       nsCOMPtr<nsIMsgFolderNotificationService> notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
       if (notifier)
       {
         notifier->NotifyMsgAdded(newHdr);
         // We do not appear to trigger classification in this case, so let's
         // paper over the abyss by just sending the classification notification.
         nsCOMPtr <nsIMutableArray> oneHeaderArray =
           do_CreateInstance(NS_ARRAY_CONTRACTID);
-        oneHeaderArray->AppendElement(newHdr, PR_FALSE);
-        notifier->NotifyMsgsClassified(oneHeaderArray, PR_FALSE, PR_FALSE);
+        oneHeaderArray->AppendElement(newHdr, false);
+        notifier->NotifyMsgsClassified(oneHeaderArray, false, false);
         // (We do not add the NotReportedClassified processing flag since we
         // just reported it!)
       }
     }
   }
   return rv;
 }
 
@@ -2492,17 +2492,17 @@ static bool gDeleteFromServerOnMove;
 bool nsMsgLocalMailFolder::GetDeleteFromServerOnMove()
 {
   if (!gGotGlobalPrefs)
   {
     nsCOMPtr<nsIPrefBranch> pPrefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
     if (pPrefBranch)
     {
       pPrefBranch->GetBoolPref("mail.pop3.deleteFromServerOnMove", &gDeleteFromServerOnMove);
-      gGotGlobalPrefs = PR_TRUE;
+      gGotGlobalPrefs = true;
     }
   }
   return gDeleteFromServerOnMove;
 }
 
 NS_IMETHODIMP nsMsgLocalMailFolder::EndMove(bool moveSucceeded)
 {
   nsresult rv;
@@ -2511,23 +2511,23 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndM
 
   if (!moveSucceeded || mCopyState->m_writeFailed)
   {
     //Notify that a completion finished.
     nsCOMPtr<nsIMsgFolder> srcFolder = do_QueryInterface(mCopyState->m_srcSupport, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     srcFolder->NotifyFolderEvent(mDeleteOrMoveMsgFailedAtom);
 
-    /* passing PR_TRUE because the messages that have been successfully copied have their corressponding
+    /* passing true because the messages that have been successfully copied have their corressponding
                hdrs in place. The message that has failed has been truncated so the msf file and berkeley mailbox
                are in sync*/
 
-    (void) OnCopyCompleted(mCopyState->m_srcSupport, PR_TRUE);
+    (void) OnCopyCompleted(mCopyState->m_srcSupport, true);
     // enable the dest folder
-    EnableNotifications(allMessageCountNotifications, PR_TRUE, PR_FALSE /*dbBatching*/ );  //dest folder doesn't need db batching
+    EnableNotifications(allMessageCountNotifications, true, false /*dbBatching*/ );  //dest folder doesn't need db batching
     return NS_OK;
   }
 
   if (mCopyState && mCopyState->m_curCopyIndex >= mCopyState->m_totalMsgCount)
   {
     //Notify that a completion finished.
     nsCOMPtr<nsIMsgFolder> srcFolder = do_QueryInterface(mCopyState->m_srcSupport, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -2541,34 +2541,34 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndM
         // if we're deleting on all moves, we'll mark this message for deletion when
         // we call DeleteMessages on the source folder. So don't mark it for deletion
         // here, in that case.
         if (!GetDeleteFromServerOnMove())
           localSrcFolder->MarkMsgsOnPop3Server(mCopyState->m_messages, POP3_DELETE);
       }
     }
     // lets delete these all at once - much faster that way
-    rv = srcFolder->DeleteMessages(mCopyState->m_messages, mCopyState->m_msgWindow, PR_TRUE, PR_TRUE, nsnull, mCopyState->m_allowUndo);
+    rv = srcFolder->DeleteMessages(mCopyState->m_messages, mCopyState->m_msgWindow, true, true, nsnull, mCopyState->m_allowUndo);
     AutoCompact(mCopyState->m_msgWindow);
 
     // enable the dest folder
-    EnableNotifications(allMessageCountNotifications, PR_TRUE, PR_FALSE /*dbBatching*/); //dest folder doesn't need db batching
+    EnableNotifications(allMessageCountNotifications, true, false /*dbBatching*/); //dest folder doesn't need db batching
     // I'm not too sure of the proper location of this event. It seems to need to be
     // after the EnableNotifications, or the folder counts can be incorrect
     // during the mDeleteOrMoveMsgCompletedAtom call.
     srcFolder->NotifyFolderEvent(NS_SUCCEEDED(rv) ? mDeleteOrMoveMsgCompletedAtom : mDeleteOrMoveMsgFailedAtom);
 
     if (NS_SUCCEEDED(rv) && mCopyState->m_msgWindow && mCopyState->m_undoMsgTxn)
     {
       nsCOMPtr<nsITransactionManager> txnMgr;
       mCopyState->m_msgWindow->GetTransactionManager(getter_AddRefs(txnMgr));
       if (txnMgr)
         txnMgr->DoTransaction(mCopyState->m_undoMsgTxn);
     }
-    (void) OnCopyCompleted(mCopyState->m_srcSupport, NS_SUCCEEDED(rv) ? PR_TRUE : PR_FALSE);  //clear the copy state so that the next message from a different folder can be move
+    (void) OnCopyCompleted(mCopyState->m_srcSupport, NS_SUCCEEDED(rv) ? true : false);  //clear the copy state so that the next message from a different folder can be move
   }
 
   return NS_OK;
 
 }
 
 // this is the beginning of the next message copied
 NS_IMETHODIMP nsMsgLocalMailFolder::StartMessage()
@@ -2592,17 +2592,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndM
   if (localUndoTxn)
   {
     localUndoTxn->GetMsgWindow(getter_AddRefs(msgWindow));
     localUndoTxn->AddSrcKey(key);
     localUndoTxn->AddDstKey(mCopyState->m_curDstKey);
   }
 
   // I think this is always true for online to offline copy
-  mCopyState->m_dummyEnvelopeNeeded = PR_TRUE;
+  mCopyState->m_dummyEnvelopeNeeded = true;
   if (mCopyState->m_dummyEnvelopeNeeded)
   {
     nsCOMPtr <nsISeekableStream> seekableStream = do_QueryInterface(mCopyState->m_fileStream, &rv);
     seekableStream->Seek(nsISeekableStream::NS_SEEK_END, 0);
     PRUint32 bytesWritten;
      mCopyState->m_fileStream->Write(MSG_LINEBREAK, MSG_LINEBREAK_LEN, &bytesWritten);
     if (mCopyState->m_parseMsgState)
       mCopyState->m_parseMsgState->ParseAFolderLine(CRLF, MSG_LINEBREAK_LEN);
@@ -2628,17 +2628,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndM
         nsCOMPtr <nsIMsgDBHdr> srcMsgHdr;
         srcDB->GetMsgHdrForKey(key, getter_AddRefs(srcMsgHdr));
         if (srcMsgHdr)
           CopyPropertiesToMsgHdr(newHdr, srcMsgHdr, mCopyState->m_isMove);
       }
       rv = GetDatabaseWOReparse(getter_AddRefs(msgDb));
       if (NS_SUCCEEDED(rv) && msgDb)
       {
-        msgDb->AddNewHdrToDB(newHdr, PR_TRUE);
+        msgDb->AddNewHdrToDB(newHdr, true);
         if (localUndoTxn)
         {
           // ** jt - recording the message size for possible undo use; the
           // message size is different for pop3 and imap4 messages
           PRUint32 msgSize;
           newHdr->GetMessageSize(&msgSize);
           localUndoTxn->AddDstMsgSize(msgSize);
         }
@@ -2891,25 +2891,25 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Dele
           return rv;
 
         UpdateNewMsgHdr(msgDBHdr, aMsgHdr);
 
 #if DOWNLOAD_NOTIFY_STYLE == DOWNLOAD_NOTIFY_LAST
         msgDBHdr->GetMessageKey(&mDownloadOldKey);
         msgDBHdr->GetThreadParent(&mDownloadOldParent);
         msgDBHdr->GetFlags(&mDownloadOldFlags);
-        mDatabase->DeleteHeader(msgDBHdr, nsnull, PR_FALSE, PR_FALSE);
+        mDatabase->DeleteHeader(msgDBHdr, nsnull, false, false);
         // Tell caller we want to select this message
         if (aDoSelect)
-          *aDoSelect = PR_TRUE;
+          *aDoSelect = true;
 #else
-        mDatabase->DeleteHeader(msgDBHdr, nsnull, PR_FALSE, PR_TRUE);
+        mDatabase->DeleteHeader(msgDBHdr, nsnull, false, true);
         // Tell caller we want to select this message
         if (aDoSelect && mDownloadState == DOWNLOAD_STATE_GOTMSG)
-          *aDoSelect = PR_TRUE;
+          *aDoSelect = true;
 #endif
         mDownloadMessages->DeleteElementAt(i);
         break;
       }
     }
   }
 
   return NS_OK;
@@ -3006,39 +3006,39 @@ nsMsgLocalMailFolder::GetIncomingServerT
     nsCOMPtr<nsIMsgAccountManager> accountManager =
              do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
     if (NS_FAILED(rv))
       return;
 
     nsCOMPtr<nsIMsgIncomingServer> server;
     // try "none" first
     url->SetScheme(NS_LITERAL_CSTRING("none"));
-    rv = accountManager->FindServerByURI(url, PR_FALSE, getter_AddRefs(server));
+    rv = accountManager->FindServerByURI(url, false, getter_AddRefs(server));
     if (NS_SUCCEEDED(rv) && server)
       mType.AssignLiteral("none");
     else
     {
       // next try "pop3"
       url->SetScheme(NS_LITERAL_CSTRING("pop3"));
-      rv = accountManager->FindServerByURI(url, PR_FALSE, getter_AddRefs(server));
+      rv = accountManager->FindServerByURI(url, false, getter_AddRefs(server));
       if (NS_SUCCEEDED(rv) && server)
         mType.AssignLiteral("pop3");
       else
       {
         // next try "rss"
         url->SetScheme(NS_LITERAL_CSTRING("rss"));
-        rv = accountManager->FindServerByURI(url, PR_FALSE, getter_AddRefs(server));
+        rv = accountManager->FindServerByURI(url, false, getter_AddRefs(server));
         if (NS_SUCCEEDED(rv) && server)
           mType.AssignLiteral("rss");
         else
         {
 #ifdef HAVE_MOVEMAIL
           // next try "movemail"
           url->SetScheme(NS_LITERAL_CSTRING("movemail"));
-          rv = accountManager->FindServerByURI(url, PR_FALSE, getter_AddRefs(server));
+          rv = accountManager->FindServerByURI(url, false, getter_AddRefs(server));
           if (NS_SUCCEEDED(rv) && server)
             mType.AssignLiteral("movemail");
 #endif /* HAVE_MOVEMAIL */
         }
       }
     }
   }
   aServerType = mType;
@@ -3108,17 +3108,17 @@ nsMsgLocalMailFolder::OnStopRunningUrl(n
         {
           NS_ENSURE_SUCCESS(rv, rv);
           nsCOMPtr <nsIMsgDBHdr> msgDBHdr;
           rv = GetMsgDBHdrFromURI(messageuri.get(), getter_AddRefs(msgDBHdr));
           if (NS_SUCCEEDED(rv))
           {
             GetDatabase();
             if (mDatabase)
-              mDatabase->DeleteHeader(msgDBHdr, nsnull, PR_TRUE, PR_TRUE);
+              mDatabase->DeleteHeader(msgDBHdr, nsnull, true, true);
           }
 
           nsCOMPtr<nsIPop3Sink> pop3sink;
           nsCString newMessageUri;
           rv = popurl->GetPop3Sink(getter_AddRefs(pop3sink));
           if (NS_SUCCEEDED(rv))
           {
             pop3sink->GetMessageUri(getter_Copies(newMessageUri));
@@ -3137,26 +3137,26 @@ nsMsgLocalMailFolder::OnStopRunningUrl(n
     if (mFlags & nsMsgFolderFlags::Inbox)
     {
       if (mDatabase && mCheckForNewMessagesAfterParsing)
       {
         bool valid;
         mDatabase->GetSummaryValid(&valid);
         if (valid && msgWindow)
           rv = GetNewMessages(msgWindow, nsnull);
-        mCheckForNewMessagesAfterParsing = PR_FALSE;
+        mCheckForNewMessagesAfterParsing = false;
       }
     }
   }
 
   if (m_parsingFolder)
   {
     // Clear this before calling OnStopRunningUrl, in case the url listener
     // tries to get the database.
-    m_parsingFolder = PR_FALSE;
+    m_parsingFolder = false;
     if (mReparseListener)
     {
       nsCOMPtr<nsIUrlListener> saveReparseListener = mReparseListener;
       mReparseListener = nsnull;
       saveReparseListener->OnStopRunningUrl(aUrl, aExitCode);
     }
   }
   if (mFlags & nsMsgFolderFlags::Inbox)
@@ -3164,17 +3164,17 @@ nsMsgLocalMailFolder::OnStopRunningUrl(n
     // if we are the inbox and running pop url
     nsCOMPtr<nsIPop3URL> popurl = do_QueryInterface(aUrl, &rv);
     if (NS_SUCCEEDED(rv))
     {
       nsCOMPtr<nsIMsgIncomingServer> server;
       GetServer(getter_AddRefs(server));
       // this is the deferred to account, in the global inbox case
       if (server)
-        server->SetPerformingBiff(PR_FALSE);  //biff is over
+        server->SetPerformingBiff(false);  //biff is over
     }
   }
   return nsMsgDBFolder::OnStopRunningUrl(aUrl, aExitCode);
 }
 
 nsresult nsMsgLocalMailFolder::DisplayMoveCopyStatusMsg()
 {
   nsresult rv = NS_OK;
@@ -3315,17 +3315,17 @@ nsMsgLocalMailFolder::NotifyCompactCompl
   nsCOMPtr <nsIAtom> compactCompletedAtom;
   compactCompletedAtom = MsgGetAtom("CompactCompleted");
   NotifyFolderEvent(compactCompletedAtom);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgLocalMailFolder::Shutdown(bool shutdownChildren)
 {
-  mInitialized = PR_FALSE;
+  mInitialized = false;
   return nsMsgDBFolder::Shutdown(shutdownChildren);
 }
 
 NS_IMETHODIMP
 nsMsgLocalMailFolder::OnMessageClassified(const char *aMsgURI,
   nsMsgJunkStatus aClassification,
   PRUint32 aJunkPercent)
 
@@ -3376,27 +3376,27 @@ nsMsgLocalMailFolder::OnMessageClassifie
           {
             nsCOMPtr<nsIMsgFolder> folder;
             rv = GetExistingFolder(spamFolderURI, getter_AddRefs(folder));
             if (NS_SUCCEEDED(rv) && folder)
             {
               rv = folder->SetFlag(nsMsgFolderFlags::Junk);
               NS_ENSURE_SUCCESS(rv,rv);
               mSpamKeysToMove.AppendElement(msgKey);
-              willMoveMessage = PR_TRUE;
+              willMoveMessage = true;
             }
             else
             {
               // XXX TODO
               // JUNK MAIL RELATED
               // the listener should do
               // rv = folder->SetFlag(nsMsgFolderFlags::Junk);
               // NS_ENSURE_SUCCESS(rv,rv);
               // mSpamKeysToMove.AppendElement(msgKey);
-              // willMoveMessage = PR_TRUE;
+              // willMoveMessage = true;
               rv = GetOrCreateFolder(spamFolderURI, nsnull /* aListener */);
               NS_ASSERTION(NS_SUCCEEDED(rv), "GetOrCreateFolder failed");
             }
           }
         }
         rv = spamSettings->LogJunkHit(msgHdr, willMoveMessage);
         NS_ENSURE_SUCCESS(rv,rv);
       }
@@ -3419,43 +3419,43 @@ nsMsgLocalMailFolder::OnMessageClassifie
         nsMsgKey msgKey = mSpamKeysToMove.ElementAt(keyIndex);
         nsMsgProcessingFlagType processingFlags;
         GetProcessingFlags(msgKey, &processingFlags);
         if (folder && !(processingFlags & nsMsgProcessingFlags::FilterToMove))
         {
           nsCOMPtr<nsIMsgDBHdr> mailHdr;
           rv = GetMessageHeader(msgKey, getter_AddRefs(mailHdr));
           if (NS_SUCCEEDED(rv) && mailHdr)
-            messages->AppendElement(mailHdr, PR_FALSE);
+            messages->AppendElement(mailHdr, false);
         }
         else
         {
           // We don't need the processing flag any more.
           AndProcessingFlags(msgKey, ~nsMsgProcessingFlags::FilterToMove);
         }
       }
 
       if (folder)
       {
         nsCOMPtr<nsIMsgCopyService> copySvc = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv);
         NS_ENSURE_SUCCESS(rv,rv);
 
-        rv = copySvc->CopyMessages(this, messages, folder, PR_TRUE,
-          /*nsIMsgCopyServiceListener* listener*/ nsnull, nsnull, PR_FALSE /*allowUndo*/);
+        rv = copySvc->CopyMessages(this, messages, folder, true,
+          /*nsIMsgCopyServiceListener* listener*/ nsnull, nsnull, false /*allowUndo*/);
         NS_ASSERTION(NS_SUCCEEDED(rv), "CopyMessages failed");
         if (NS_FAILED(rv))
         {
           nsCAutoString logMsg("failed to copy junk messages to junk folder rv = ");
           logMsg.AppendInt(rv, 16);
           spamSettings->LogJunkString(logMsg.get());
         }
       }
     }
     PRInt32 numNewMessages;
-    GetNumNewMessages(PR_FALSE, &numNewMessages);
+    GetNumNewMessages(false, &numNewMessages);
     PRUint32 length;
     messages->GetLength(&length);
     SetNumNewMessages(numNewMessages - length);
     mSpamKeysToMove.Clear();
     // check if this is the inbox first...
     if (mFlags & nsMsgFolderFlags::Inbox)
       PerformBiffNotifications();
   }
@@ -3597,39 +3597,39 @@ nsMsgLocalMailFolder::AddMessageBatch(PR
   ReleaseSemaphore(static_cast<nsIMsgLocalMailFolder*>(this));
   return rv;
 }
 
 NS_IMETHODIMP
 nsMsgLocalMailFolder::WarnIfLocalFileTooBig(nsIMsgWindow *aWindow, bool *aTooBig)
 {
   NS_ENSURE_ARG_POINTER(aTooBig);
-  *aTooBig = PR_FALSE;
+  *aTooBig = false;
   nsCOMPtr<nsIMsgPluggableStore> msgStore;
   nsresult rv = GetMsgStore(getter_AddRefs(msgStore));
   NS_ENSURE_SUCCESS(rv, rv);
   bool spaceAvailable;
   // check if we have a reasonable amount of space left
   rv = msgStore->HasSpaceAvailable(this, 0xFFFFF, &spaceAvailable);
   if (!spaceAvailable)
     {
       ThrowAlertMsg("mailboxTooLarge", aWindow);
-      *aTooBig = PR_TRUE;
+      *aTooBig = true;
     }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgLocalMailFolder::FetchMsgPreviewText(nsMsgKey *aKeysToFetch, PRUint32 aNumKeys,
                                                  bool aLocalOnly, nsIUrlListener *aUrlListener,
                                                  bool *aAsyncResults)
 {
   NS_ENSURE_ARG_POINTER(aKeysToFetch);
   NS_ENSURE_ARG_POINTER(aAsyncResults);
 
-  *aAsyncResults = PR_FALSE;
+  *aAsyncResults = false;
   nsCOMPtr <nsIInputStream> inputStream;
   nsCOMPtr<nsIMsgPluggableStore> msgStore;
   nsresult rv = GetMsgStore(getter_AddRefs(msgStore));
   NS_ENSURE_SUCCESS(rv, rv);
 
   for (PRUint32 i = 0; i < aNumKeys; i++)
   {
     nsCOMPtr <nsIMsgDBHdr> msgHdr;
@@ -3646,41 +3646,41 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Fetc
     NS_ENSURE_SUCCESS(rv,rv);
     rv = GetMsgPreviewTextFromStream(msgHdr, inputStream);
   }
   return rv;
 }
 
 NS_IMETHODIMP nsMsgLocalMailFolder::AddKeywordsToMessages(nsIArray *aMessages, const nsACString& aKeywords)
 {
-  return ChangeKeywordForMessages(aMessages, aKeywords, PR_TRUE /* add */);
+  return ChangeKeywordForMessages(aMessages, aKeywords, true /* add */);
 }
 nsresult nsMsgLocalMailFolder::ChangeKeywordForMessages(nsIArray *aMessages, const nsACString& aKeywords, bool add)
 {
   nsresult rv = (add) ? nsMsgDBFolder::AddKeywordsToMessages(aMessages, aKeywords)
                       : nsMsgDBFolder::RemoveKeywordsFromMessages(aMessages, aKeywords);
 
     NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr<nsIMsgPluggableStore> msgStore;
   GetMsgStore(getter_AddRefs(msgStore));
     NS_ENSURE_SUCCESS(rv, rv);
   return msgStore->ChangeKeywords(aMessages, aKeywords, add);
 }
 
 NS_IMETHODIMP nsMsgLocalMailFolder::RemoveKeywordsFromMessages(nsIArray *aMessages, const nsACString& aKeywords)
 {
-  return ChangeKeywordForMessages(aMessages, aKeywords, PR_FALSE /* remove */);
+  return ChangeKeywordForMessages(aMessages, aKeywords, false /* remove */);
 }
 
 NS_IMETHODIMP nsMsgLocalMailFolder::UpdateNewMsgHdr(nsIMsgDBHdr* aOldHdr, nsIMsgDBHdr* aNewHdr)
 {
   NS_ENSURE_ARG_POINTER(aOldHdr);
   NS_ENSURE_ARG_POINTER(aNewHdr);
   // Preserve any properties set on the message.
-  CopyPropertiesToMsgHdr(aNewHdr, aOldHdr, PR_TRUE);
+  CopyPropertiesToMsgHdr(aNewHdr, aOldHdr, true);
 
   // Preserve keywords manually, since they are set as don't preserve.
   nsCString keywordString;
   aOldHdr->GetStringProperty("keywords", getter_Copies(keywordString));
   aNewHdr->SetStringProperty("keywords", keywordString.get());
 
   // If the junk score was set by the plugin, remove junkscore to force a new
   // junk analysis, this time using the body.
--- a/mailnews/local/src/nsLocalUndoTxn.cpp
+++ b/mailnews/local/src/nsLocalUndoTxn.cpp
@@ -50,18 +50,18 @@
 #include "nsIMsgDatabase.h"
 #include "nsIMutableArray.h"
 #include "nsServiceManagerUtils.h"
 #include "nsComponentManagerUtils.h"
 #include "nsMsgUtils.h"
 
 NS_IMPL_ISUPPORTS_INHERITED1(nsLocalMoveCopyMsgTxn, nsMsgTxn, nsIFolderListener)
 
-nsLocalMoveCopyMsgTxn::nsLocalMoveCopyMsgTxn()  : m_srcIsImap4(PR_FALSE),
-  m_canUndelete(PR_FALSE)
+nsLocalMoveCopyMsgTxn::nsLocalMoveCopyMsgTxn()  : m_srcIsImap4(false),
+  m_canUndelete(false)
 {
 }
 
 nsLocalMoveCopyMsgTxn::~nsLocalMoveCopyMsgTxn()
 {
 }
 
 nsresult
@@ -74,17 +74,17 @@ nsLocalMoveCopyMsgTxn::Init(nsIMsgFolder
     m_isMove = isMove;
 
     mUndoFolderListener = nsnull;
 
     nsCString protocolType;
     rv = srcFolder->GetURI(protocolType);
     protocolType.SetLength(protocolType.FindChar(':'));
     if (MsgLowerCaseEqualsLiteral(protocolType, "imap"))
-      m_srcIsImap4 = PR_TRUE;
+      m_srcIsImap4 = true;
     return nsMsgTxn::Init();
 }
 nsresult 
 nsLocalMoveCopyMsgTxn::GetSrcIsImap(bool *isImap)
 {
   *isImap = m_srcIsImap4;
   return NS_OK;
 }
@@ -163,24 +163,24 @@ nsLocalMoveCopyMsgTxn::UndoImapDeleteFla
       // folder so use lite select to do the trick
       rv = imapService->LiteSelectFolder(thread, folder,
                                          urlListener, nsnull, nsnull);
       if (!deleteFlag)
           rv =imapService->AddMessageFlags(thread, folder,
                                           urlListener, nsnull,
                                           msgIds,
                                           kImapMsgDeletedFlag,
-                                          PR_TRUE);
+                                          true);
       else
           rv = imapService->SubtractMessageFlags(thread,
                                                 folder,
                                            urlListener, nsnull,
                                            msgIds,
                                            kImapMsgDeletedFlag,
-                                           PR_TRUE);
+                                           true);
       if (NS_SUCCEEDED(rv) && m_msgWindow)
           folder->UpdateFolder(m_msgWindow);
     }
     rv = NS_OK; // always return NS_OK to indicate that the src is imap
   }
   else
     rv = NS_ERROR_FAILURE;
   return rv;
@@ -285,39 +285,39 @@ nsLocalMoveCopyMsgTxn::UndoTransactionIn
       for (i = 0; i < count; i++)
       {
         rv = dstDB->GetMsgHdrForKey(m_dstKeyArray[i], 
                                     getter_AddRefs(oldHdr));
         NS_ASSERTION(oldHdr, "fatal ... cannot get old msg header\n");
         if (NS_SUCCEEDED(rv) && oldHdr)
         {
           rv = srcDB->CopyHdrFromExistingHdr(m_srcKeyArray[i],
-                                             oldHdr, PR_TRUE,
+                                             oldHdr, true,
                                              getter_AddRefs(newHdr));
           NS_ASSERTION(newHdr, 
                        "fatal ... cannot create new msg header\n");
           if (NS_SUCCEEDED(rv) && newHdr)
           {
             newHdr->SetStatusOffset(m_srcStatusOffsetArray[i]);
             srcDB->UndoDelete(newHdr);
-            srcMessages->AppendElement(newHdr, PR_FALSE);
+            srcMessages->AppendElement(newHdr, false);
             // (we want to keep these two lists in sync)
-            dstMessages->AppendElement(oldHdr, PR_FALSE);
+            dstMessages->AppendElement(oldHdr, false);
           }
         }
       }
       srcDB->EndBatch();
 
       nsCOMPtr<nsIMsgFolderNotificationService>
         notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
       if (notifier)
       {
         // Remember that we're actually moving things back from the destination
         //  to the source!
-        notifier->NotifyMsgsMoveCopyCompleted(PR_TRUE, dstMessages,
+        notifier->NotifyMsgsMoveCopyCompleted(true, dstMessages,
                                               srcFolder, srcMessages);
       }
 
       nsCOMPtr <nsIMsgLocalMailFolder> localFolder = do_QueryInterface(srcFolder);
       if (localFolder)
         localFolder->MarkMsgsOnPop3Server(srcMessages, POP3_NONE /*deleteMsgs*/);
     }
     else // undoing a move means moving the messages back.
@@ -330,31 +330,31 @@ nsLocalMoveCopyMsgTxn::UndoTransactionIn
       for (i = 0; i < count; i++)
       {
         dstDB->GetMsgHdrForKey(m_dstKeyArray[i], getter_AddRefs(dstHdr));
         NS_ASSERTION(dstHdr, "fatal ... cannot get old msg header\n");
         if (dstHdr)
         {
           nsCString messageId;
           dstHdr->GetMessageId(getter_Copies(messageId));
-          dstMessages->AppendElement(dstHdr, PR_FALSE);
+          dstMessages->AppendElement(dstHdr, false);
           m_copiedMsgIds.AppendElement(messageId);
         }
       }
       srcFolder->AddFolderListener(this);
-      m_undoing = PR_TRUE;
+      m_undoing = true;
       return srcFolder->CopyMessages(dstFolder, dstMessages,
-                                     PR_TRUE, nsnull, nsnull, PR_FALSE,
-                                     PR_FALSE);
+                                     true, nsnull, nsnull, false,
+                                     false);
     }
-    srcDB->SetSummaryValid(PR_TRUE);
+    srcDB->SetSummaryValid(true);
   }
 
   dstDB->DeleteMessages(m_dstKeyArray.Length(), m_dstKeyArray.Elements(), nsnull);
-  dstDB->SetSummaryValid(PR_TRUE);
+  dstDB->SetSummaryValid(true);
 
   return rv;
 }
 
 NS_IMETHODIMP
 nsLocalMoveCopyMsgTxn::RedoTransaction()
 {
   nsresult rv;
@@ -384,34 +384,34 @@ nsLocalMoveCopyMsgTxn::RedoTransaction()
   {
     rv = srcDB->GetMsgHdrForKey(m_srcKeyArray[i], 
                                 getter_AddRefs(oldHdr));
     NS_ASSERTION(oldHdr, "fatal ... cannot get old msg header\n");
 
     if (NS_SUCCEEDED(rv) && oldHdr)
     {
       msgSupports =do_QueryInterface(oldHdr);
-      srcMessages->AppendElement(msgSupports, PR_FALSE);
+      srcMessages->AppendElement(msgSupports, false);
       
       if (m_canUndelete)
       {
       rv = dstDB->CopyHdrFromExistingHdr(m_dstKeyArray[i],
-                                         oldHdr, PR_TRUE,
+                                         oldHdr, true,
                                          getter_AddRefs(newHdr));
       NS_ASSERTION(newHdr, "fatal ... cannot get new msg header\n");
       if (NS_SUCCEEDED(rv) && newHdr)
       {
         if (i < m_dstSizeArray.Length())
           rv = newHdr->SetMessageSize(m_dstSizeArray[i]);
         dstDB->UndoDelete(newHdr);
       }
     }
   }
   }
-  dstDB->SetSummaryValid(PR_TRUE);
+  dstDB->SetSummaryValid(true);
 
   if (m_isMove)
   {
     if (m_srcIsImap4)
     {
       // protect against a bogus undo txn without any source keys
       // see bug #179856 for details
       NS_ASSERTION(!m_srcKeyArray.IsEmpty(), "no source keys");
@@ -424,17 +424,17 @@ nsLocalMoveCopyMsgTxn::RedoTransaction()
     }
     else if (m_canUndelete)
     {
       nsCOMPtr <nsIMsgLocalMailFolder> localFolder = do_QueryInterface(srcFolder);
       if (localFolder)
         localFolder->MarkMsgsOnPop3Server(srcMessages, POP3_DELETE /*deleteMsgs*/);
 
       rv = srcDB->DeleteMessages(m_srcKeyArray.Length(), m_srcKeyArray.Elements(), nsnull);
-      srcDB->SetSummaryValid(PR_TRUE);
+      srcDB->SetSummaryValid(true);
     }
     else
     {
       nsCOMPtr<nsIMsgDBHdr> srcHdr;
       m_numHdrsCopied = 0;
       m_dstKeyArray.Clear();
       for (i = 0; i < count; i++)
       {
@@ -443,19 +443,19 @@ nsLocalMoveCopyMsgTxn::RedoTransaction()
         if (srcHdr)
         {
           nsCString messageId;
           srcHdr->GetMessageId(getter_Copies(messageId));
           m_copiedMsgIds.AppendElement(messageId);
         }
       }
       dstFolder->AddFolderListener(this);
-      m_undoing = PR_FALSE;
-      return dstFolder->CopyMessages(srcFolder, srcMessages, PR_TRUE, nsnull,
-                                     nsnull, PR_FALSE, PR_FALSE);
+      m_undoing = false;
+      return dstFolder->CopyMessages(srcFolder, srcMessages, true, nsnull,
+                                     nsnull, false, false);
     }
   }
 
   return rv;
 }
 
 NS_IMETHODIMP nsLocalMoveCopyMsgTxn::OnItemAdded(nsIMsgFolder *parentItem, nsISupports *item)
 {
--- a/mailnews/local/src/nsLocalUtils.cpp
+++ b/mailnews/local/src/nsLocalUtils.cpp
@@ -73,59 +73,59 @@ nsGetMailboxServer(const char *uriStr, n
     do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
   if (NS_FAILED(rv)) return rv;
   
   // find all local mail "no servers" matching the given hostname
   nsCOMPtr<nsIMsgIncomingServer> none_server;
   aUrl->SetScheme(NS_LITERAL_CSTRING("none"));
   // No unescaping of username or hostname done here.
   // The unescaping is done inside of FindServerByURI
-  rv = accountManager->FindServerByURI(aUrl, PR_FALSE,
+  rv = accountManager->FindServerByURI(aUrl, false,
                                   getter_AddRefs(none_server));
   if (NS_SUCCEEDED(rv)) {
     NS_ADDREF(*aResult = none_server);
     return rv;
   }
   
   // if that fails, look for the rss hosts matching the given hostname
   nsCOMPtr<nsIMsgIncomingServer> rss_server;
   aUrl->SetScheme(NS_LITERAL_CSTRING("rss"));
-  rv = accountManager->FindServerByURI(aUrl, PR_FALSE,
+  rv = accountManager->FindServerByURI(aUrl, false,
                                   getter_AddRefs(rss_server));
   if (NS_SUCCEEDED(rv))
   {
      NS_ADDREF(*aResult = rss_server);
      return rv;
   }
 #ifdef HAVE_MOVEMAIL
   // find all movemail "servers" matching the given hostname
   nsCOMPtr<nsIMsgIncomingServer> movemail_server;
   aUrl->SetScheme(NS_LITERAL_CSTRING("movemail"));
-  rv = accountManager->FindServerByURI(aUrl, PR_FALSE,
+  rv = accountManager->FindServerByURI(aUrl, false,
                                   getter_AddRefs(movemail_server));
   if (NS_SUCCEEDED(rv)) {
     NS_ADDREF(*aResult = movemail_server);
     return rv;
   }
 #endif /* HAVE_MOVEMAIL */
 
   // if that fails, look for the pop hosts matching the given hostname
   nsCOMPtr<nsIMsgIncomingServer> server;
   if (NS_FAILED(rv)) 
   {
     aUrl->SetScheme(NS_LITERAL_CSTRING("pop3"));
-    rv = accountManager->FindServerByURI(aUrl, PR_FALSE,
+    rv = accountManager->FindServerByURI(aUrl, false,
                                     getter_AddRefs(server));
 
     // if we can't find a pop server, maybe it's a local message 
     // in an imap hierarchy. look for an imap server.
     if (NS_FAILED(rv)) 
     {
       aUrl->SetScheme(NS_LITERAL_CSTRING("imap"));
-      rv = accountManager->FindServerByURI(aUrl, PR_FALSE,
+      rv = accountManager->FindServerByURI(aUrl, false,
                                     getter_AddRefs(server));
     }
   }
   if (NS_SUCCEEDED(rv)) 
   {
     NS_ADDREF(*aResult = server);
     return rv;
   }
--- a/mailnews/local/src/nsMailboxProtocol.cpp
+++ b/mailnews/local/src/nsMailboxProtocol.cpp
@@ -105,17 +105,17 @@ nsresult nsMailboxProtocol::OpenMultiple
   nsresult rv;
 
   nsCOMPtr<nsIStreamTransportService> serv =
       do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // XXX 64-bit
   rv = serv->CreateInputTransport(m_multipleMsgMoveCopyStream, PRInt64(offset),
-                                  PRInt64(size), PR_FALSE,
+                                  PRInt64(size), false,
                                   getter_AddRefs(m_transport));
 
   return rv;
 }
 
 nsresult nsMailboxProtocol::OpenFileSocketForReuse(nsIURI * aURL, PRUint32 aStartPosition, PRInt32 aReadCount)
 {
   NS_ENSURE_ARG_POINTER(aURL);
@@ -128,21 +128,21 @@ nsresult nsMailboxProtocol::OpenFileSock
   rv = GetFileFromURL(aURL, getter_AddRefs(file));
   NS_ENSURE_SUCCESS(rv, rv);
     
   nsCOMPtr<nsIFileInputStream> fileStream = do_CreateInstance(NS_LOCALFILEINPUTSTREAM_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   m_multipleMsgMoveCopyStream = do_QueryInterface(fileStream, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
-  fileStream->Init(file,  PR_RDONLY, 0664, PR_FALSE);  //just have to read the messages
+  fileStream->Init(file,  PR_RDONLY, 0664, false);  //just have to read the messages
 
   rv = OpenMultipleMsgTransport(aStartPosition, aReadCount);
 
-  m_socketIsOpen = PR_FALSE;
+  m_socketIsOpen = false;
   return rv;
 }
 
 
 nsresult nsMailboxProtocol::Initialize(nsIURI * aURL)
 {
   NS_PRECONDITION(aURL, "invalid URL passed into MAILBOX Protocol");
   nsresult rv = NS_OK;
@@ -154,17 +154,17 @@ nsresult nsMailboxProtocol::Initialize(n
       nsCOMPtr <nsIMsgWindow> window;
       rv = m_runningUrl->GetMailboxAction(&m_mailboxAction); 
       // clear stopped flag on msg window, because we care.
       nsCOMPtr <nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(m_runningUrl);
       if (mailnewsUrl)
       {
         mailnewsUrl->GetMsgWindow(getter_AddRefs(window));
         if (window)
-          window->SetStopped(PR_FALSE);
+          window->SetStopped(false);
       }
 
       if (m_mailboxAction == nsIMailboxUrl::ActionParseMailbox)
       {
         // Set the length of the file equal to the max progress
         nsCOMPtr<nsIFile> file;
         GetFileFromURL(aURL, getter_AddRefs(file));
         if (file)
@@ -229,32 +229,32 @@ nsresult nsMailboxProtocol::Initialize(n
               NS_ENSURE_SUCCESS(rv, rv);
               seekableStream->Tell(&offset);
               // create input stream transport
               nsCOMPtr<nsIStreamTransportService> sts =
                   do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv);
               if (NS_FAILED(rv)) return rv;
               m_readCount = aMsgSize;
               rv = sts->CreateInputTransport(stream, offset,
-                                             PRInt64(aMsgSize), PR_TRUE,
+                                             PRInt64(aMsgSize), true,
                                              getter_AddRefs(m_transport));
 
-              m_socketIsOpen = PR_FALSE;
+              m_socketIsOpen = false;
              
             }
           }
           else // must be a .eml file
           rv = OpenFileSocket(aURL, (PRUint32) aMsgKey, aMsgSize);
         }
         NS_ASSERTION(NS_SUCCEEDED(rv), "oops....i messed something up");
       }
     }
   }
   
-  m_lineStreamBuffer = new nsMsgLineStreamBuffer(OUTPUT_BUFFER_SIZE, PR_TRUE);
+  m_lineStreamBuffer = new nsMsgLineStreamBuffer(OUTPUT_BUFFER_SIZE, true);
   
   m_nextState = MAILBOX_READ_FOLDER;
   m_initialState = MAILBOX_READ_FOLDER;
   mCurrentProgress = 0;
   
   // do we really need both?
   m_tempMessageFile = m_tempMsgFile;
   return rv;
@@ -279,19 +279,19 @@ NS_IMETHODIMP nsMailboxProtocol::OnStart
 
 bool nsMailboxProtocol::RunningMultipleMsgUrl()
 {
   if (m_mailboxAction == nsIMailboxUrl::ActionCopyMessage || m_mailboxAction == nsIMailboxUrl::ActionMoveMessage)
   {
     PRUint32 numMoveCopyMsgs;
     nsresult rv = m_runningUrl->GetNumMoveCopyMsgs(&numMoveCopyMsgs);
     if (NS_SUCCEEDED(rv) && numMoveCopyMsgs > 1)
-      return PR_TRUE;
+      return true;
   }
-  return PR_FALSE;
+  return false;
 }
 
 // stop binding is a "notification" informing us that the stream associated with aURL is going away. 
 NS_IMETHODIMP nsMailboxProtocol::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult aStatus)
 {
   nsresult rv;
   if (m_nextState == MAILBOX_READ_FOLDER && m_mailboxParser)
   {
@@ -384,17 +384,17 @@ NS_IMETHODIMP nsMailboxProtocol::OnStopR
                         m_request = pump;
                     }
                   }
                 }
                 
                 NS_ASSERTION(NS_SUCCEEDED(rv), "AsyncRead failed");
                 if (m_loadGroup)
                   m_loadGroup->RemoveRequest(static_cast<nsIRequest *>(this), nsnull, aStatus);
-                m_socketIsOpen = PR_TRUE; // mark the channel as open
+                m_socketIsOpen = true; // mark the channel as open
                 return aStatus;
               }
             }
           }
         }
         else
         {
         }
@@ -462,17 +462,17 @@ PRInt32 nsMailboxProtocol::SetupMessageE
       NS_ENSURE_SUCCESS(rv,rv);
       rv = msgUrl->GetMessageHeader(getter_AddRefs(msgHdr));
       if (NS_SUCCEEDED(rv) && msgHdr)
       {
         msgHdr->GetMessageSize(&messageSize);
         m_runningUrl->SetMessageSize(messageSize);
       }
       else
-        NS_ASSERTION(PR_FALSE, "couldn't get message header");
+        NS_ASSERTION(false, "couldn't get message header");
     }
   }
   return rv;
 }
 
 /////////////////////////////////////////////////////////////////////////////////////////////
 // Begin protocol state machine functions...
 //////////////////////////////////////////////////////////////////////////////////////////////
@@ -511,17 +511,17 @@ nsresult nsMailboxProtocol::LoadUrl(nsIU
         convertData = (queryStr.Find("header=filter") != -1 ||
                        queryStr.Find("header=attach") != -1);
       }
       else if (m_mailboxAction == nsIMailboxUrl::ActionFetchPart)
       {
         // when fetching a part, we need to insert a converter into the listener chain order to
         // force just the part out of the message. Our channel listener is the consumer we'll
         // pass in to AsyncConvertData.
-        convertData = PR_TRUE;
+        convertData = true;
         consumer = m_channelListener;
       }
       if (convertData)
       {
           nsCOMPtr<nsIStreamConverterService> streamConverter = do_GetService("@mozilla.org/streamConverters;1", &rv);
           NS_ENSURE_SUCCESS(rv, rv);
           nsCOMPtr <nsIStreamListener> conversionListener;
           nsCOMPtr<nsIChannel> channel;
@@ -735,17 +735,17 @@ nsresult nsMailboxProtocol::ProcessProto
       else
         status = ReadFolderResponse(inputStream, offset, length);
       break;
     case MAILBOX_DONE:
     case MAILBOX_ERROR_DONE:
       {
         nsCOMPtr <nsIMsgMailNewsUrl> anotherUrl = do_QueryInterface(m_runningUrl);
         rv = m_nextState == MAILBOX_DONE ? NS_OK : NS_ERROR_FAILURE;
-        anotherUrl->SetUrlState(PR_FALSE, rv);
+        anotherUrl->SetUrlState(false, rv);
         m_nextState = MAILBOX_FREE;
       }
       break;
       
     case MAILBOX_FREE:
       // MAILBOX is a one time use connection so kill it if we get here...
       CloseSocket(); 
       return rv; /* final end */
--- a/mailnews/local/src/nsMailboxService.cpp
+++ b/mailnews/local/src/nsMailboxService.cpp
@@ -57,17 +57,17 @@
 #include "nsIDocShellLoadInfo.h"
 #include "nsIWebNavigation.h"
 #include "prprf.h"
 #include "nsIMsgHdr.h"
 #include "nsIFileURL.h"
 
 nsMailboxService::nsMailboxService()
 {
-    mPrintingOperation = PR_FALSE;
+    mPrintingOperation = false;
 }
 
 nsMailboxService::~nsMailboxService()
 {}
 
 NS_IMPL_ISUPPORTS4(nsMailboxService, nsIMailboxService, nsIMsgMessageService, nsIProtocolHandler, nsIMsgMessageFetchPartService)
 
 nsresult nsMailboxService::ParseMailbox(nsIMsgWindow *aMsgWindow, nsILocalFile *aMailboxPath, nsIStreamListener *aMailboxParser,
@@ -84,17 +84,17 @@ nsresult nsMailboxService::ParseMailbox(
     // okay now generate the url string
     nsCString mailboxPath;
 
     aMailboxPath->GetNativePath(mailboxPath);
     nsCAutoString buf;
     MsgEscapeURL(mailboxPath,
                  nsINetUtil::ESCAPE_URL_MINIMAL | nsINetUtil::ESCAPE_URL_FORCED, buf);
     nsEscapeNativePath(buf);
-    url->SetUpdatingFolder(PR_TRUE);
+    url->SetUpdatingFolder(true);
     url->SetMsgWindow(aMsgWindow);
     nsCAutoString uriSpec("mailbox://");
     uriSpec.Append(buf);
     url->SetSpec(uriSpec);
 
     mailboxurl->SetMailboxParser(aMailboxParser);
     if (aUrlListener)
       url->RegisterListener(aUrlListener);
@@ -263,17 +263,17 @@ nsresult nsMailboxService::FetchMessage(
     // DIRTY LITTLE HACK --> if we are opening an attachment we want the docshell to
     // treat this load as if it were a user click event. Then the dispatching stuff will be much
     // happier.
     if (mailboxAction == nsIMailboxUrl::ActionFetchPart)
     {
       docShell->CreateLoadInfo(getter_AddRefs(loadInfo));
       loadInfo->SetLoadType(nsIDocShellLoadInfo::loadLink);
     }
-    rv = docShell->LoadURI(url, loadInfo, nsIWebNavigation::LOAD_FLAGS_NONE, PR_FALSE);
+    rv = docShell->LoadURI(url, loadInfo, nsIWebNavigation::LOAD_FLAGS_NONE, false);
   }
   else
     rv = RunMailboxUrl(url, aDisplayConsumer);
 
   if (aURL && mailboxurl)
     CallQueryInterface(mailboxurl, aURL);
 
   return rv;
@@ -391,17 +391,17 @@ NS_IMETHODIMP nsMailboxService::OpenAtta
   if (NS_SUCCEEDED(rv) && docShell)
   {
     nsCOMPtr<nsIDocShellLoadInfo> loadInfo;
     // DIRTY LITTLE HACK --> since we are opening an attachment we want the docshell to
     // treat this load as if it were a user click event. Then the dispatching stuff will be much
     // happier.
     docShell->CreateLoadInfo(getter_AddRefs(loadInfo));
     loadInfo->SetLoadType(nsIDocShellLoadInfo::loadLink);
-    return docShell->LoadURI(URL, loadInfo, nsIWebNavigation::LOAD_FLAGS_NONE, PR_FALSE);
+    return docShell->LoadURI(URL, loadInfo, nsIWebNavigation::LOAD_FLAGS_NONE, false);
   }
   return RunMailboxUrl(URL, aDisplayConsumer);
 
 }
 
 
 NS_IMETHODIMP
 nsMailboxService::SaveMessageToDisk(const char *aMessageURI,
@@ -549,17 +549,17 @@ NS_IMETHODIMP nsMailboxService::GetDefau
   *aDefaultPort = -1;  // mailbox doesn't use a port!!!!!
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMailboxService::AllowPort(PRInt32 port, const char *scheme, bool *_retval)
 {
   NS_ENSURE_ARG_POINTER(_retval);
   // don't override anything.
-  *_retval = PR_FALSE;
+  *_retval = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMailboxService::GetProtocolFlags(PRUint32 *result)
 {
   NS_ENSURE_ARG_POINTER(result);
   *result = URI_STD | URI_FORBIDS_AUTOMATIC_DOCUMENT_REPLACEMENT |
             URI_DANGEROUS_TO_LOAD | URI_FORBIDS_COOKIE_ACCESS
@@ -639,20 +639,20 @@ NS_IMETHODIMP nsMailboxService::NewChann
 }
 
 nsresult nsMailboxService::DisplayMessageForPrinting(const char* aMessageURI,
                                                      nsISupports * aDisplayConsumer,
                                                      nsIMsgWindow * aMsgWindow,
                                                      nsIUrlListener * aUrlListener,
                                                      nsIURI ** aURL)
 {
-  mPrintingOperation = PR_TRUE;
+  mPrintingOperation = true;
   nsresult rv = FetchMessage(aMessageURI, aDisplayConsumer, aMsgWindow,aUrlListener, nsnull,
     nsIMailboxUrl::ActionFetchMessage, nsnull, aURL);
-  mPrintingOperation = PR_FALSE;
+  mPrintingOperation = false;
   return rv;
 }
 
 NS_IMETHODIMP nsMailboxService::Search(nsIMsgSearchSession *aSearchSession, nsIMsgWindow *aMsgWindow, nsIMsgFolder *aMsgFolder, const char *aMessageUri)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
--- a/mailnews/local/src/nsMailboxUrl.cpp
+++ b/mailnews/local/src/nsMailboxUrl.cpp
@@ -72,18 +72,18 @@ char * extractAttributeValue(const char 
 nsMailboxUrl::nsMailboxUrl()
 {
   m_mailboxAction = nsIMailboxUrl::ActionParseMailbox;
   m_filePath = nsnull;
   m_messageID = nsnull;
   m_messageKey = nsMsgKey_None;
   m_messageSize = 0;
   m_messageFile = nsnull;
-  m_addDummyEnvelope = PR_FALSE;
-  m_canonicalLineEnding = PR_FALSE;
+  m_addDummyEnvelope = false;
+  m_canonicalLineEnding = false;
   m_curMsgIndex = 0;
 }
 
 nsMailboxUrl::~nsMailboxUrl()
 {
     PR_Free(m_messageID);
 }
 
@@ -216,18 +216,18 @@ nsresult nsMailboxUrl::GetMsgHdrForKey(n
   nsresult rv = NS_OK;
   if (aMsgHdr && m_filePath)
   {
     nsCOMPtr<nsIMsgDatabase> mailDBFactory;
     nsCOMPtr<nsIMsgDatabase> mailDB;
     nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
 
     if (msgDBService)
-      rv = msgDBService->OpenMailDBFromFile(m_filePath, nsnull, PR_FALSE,
-                                            PR_FALSE, getter_AddRefs(mailDB));
+      rv = msgDBService->OpenMailDBFromFile(m_filePath, nsnull, false,
+                                            false, getter_AddRefs(mailDB));
     if (NS_SUCCEEDED(rv) && mailDB) // did we get a db back?
       rv = mailDB->GetMsgHdrForKey(msgKey, aMsgHdr);
     else
     {
       nsCOMPtr<nsIMsgWindow> msgWindow(do_QueryReferent(m_msgWindowWeak));
       if (!msgWindow)
       {
         nsCOMPtr<nsIMsgMailSession> mailSession = do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv);
@@ -320,17 +320,17 @@ NS_IMETHODIMP nsMailboxUrl::IsUrlType(PR
       break;
     case nsIMsgMailNewsUrl::eMove:
       *isType = (m_mailboxAction == nsIMailboxUrl::ActionMoveMessage);
       break;
     case nsIMsgMailNewsUrl::eDisplay:
       *isType = (m_mailboxAction == nsIMailboxUrl::ActionFetchMessage);
       break;
     default:
-      *isType = PR_FALSE;
+      *isType = false;
   };
 
   return NS_OK;
 
 }
 
 ////////////////////////////////////////////////////////////////////////////////////
 // End nsIMailboxUrl specific support
--- a/mailnews/local/src/nsMovemailIncomingServer.cpp
+++ b/mailnews/local/src/nsMovemailIncomingServer.cpp
@@ -53,28 +53,28 @@ NS_IMPL_ISUPPORTS_INHERITED2(nsMovemailI
                              nsMsgIncomingServer,
                              nsIMovemailIncomingServer,
                              nsILocalMailIncomingServer)
 
                             
 
 nsMovemailIncomingServer::nsMovemailIncomingServer()
 {    
-    m_canHaveFilters = PR_TRUE;
+    m_canHaveFilters = true;
 }
 
 nsMovemailIncomingServer::~nsMovemailIncomingServer()
 {
 }
 
 NS_IMETHODIMP
 nsMovemailIncomingServer::GetIsSecureServer(bool *aIsSecureServer)
 {
     NS_ENSURE_ARG_POINTER(aIsSecureServer);
-    *aIsSecureServer = PR_FALSE;
+    *aIsSecureServer = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP 
 nsMovemailIncomingServer::PerformBiff(nsIMsgWindow *aMsgWindow)
 {
     nsresult rv;
     nsCOMPtr<nsIMovemailService> movemailService(do_GetService(
@@ -86,17 +86,17 @@ nsMovemailIncomingServer::PerformBiff(ns
     rv = GetRootMsgFolder(getter_AddRefs(rootMsgFolder));
     if(NS_SUCCEEDED(rv) && rootMsgFolder)
     {
          rootMsgFolder->GetFolderWithFlags(nsMsgFolderFlags::Inbox,
                                            getter_AddRefs(inbox));
          if (!inbox) return NS_ERROR_FAILURE;
     }
 
-    SetPerformingBiff(PR_TRUE);
+    SetPerformingBiff(true);
     urlListener = do_QueryInterface(inbox);
 
     bool downloadOnBiff = false;
     rv = GetDownloadOnBiff(&downloadOnBiff);
     if (downloadOnBiff)
     {
        nsCOMPtr <nsIMsgLocalMailFolder> localInbox = do_QueryInterface(inbox,
                                                                        &rv);
@@ -119,17 +119,17 @@ nsMovemailIncomingServer::PerformBiff(ns
               bool isLocked;
               inbox->GetLocked(&isLocked);
               if (!isLocked)
               {
                  rv = localInbox->ParseFolder(aMsgWindow, urlListener);
               }
               if (NS_SUCCEEDED(rv))
               {
-                 rv = localInbox->SetCheckForNewMessagesAfterParsing(PR_TRUE);
+                 rv = localInbox->SetCheckForNewMessagesAfterParsing(true);
               }
            }
        }
     }
     else
     {
         movemailService->CheckForNewMail(urlListener, inbox, this, nsnull); 
     }
@@ -244,41 +244,41 @@ nsMovemailIncomingServer::GetNewMail(nsI
 
     return rv;
 }        
 
 NS_IMETHODIMP
 nsMovemailIncomingServer::GetDownloadMessagesAtStartup(bool *getMessagesAtStartup)
 {
     NS_ENSURE_ARG_POINTER(getMessagesAtStartup);
-    *getMessagesAtStartup = PR_TRUE;
+    *getMessagesAtStartup = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMovemailIncomingServer::GetCanBeDefaultServer(bool *aCanBeDefaultServer)
 {
   NS_ENSURE_ARG_POINTER(aCanBeDefaultServer);
-  *aCanBeDefaultServer = PR_TRUE;
+  *aCanBeDefaultServer = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMovemailIncomingServer::GetCanSearchMessages(bool *canSearchMessages)
 {
     NS_ENSURE_ARG_POINTER(canSearchMessages);
-    *canSearchMessages = PR_TRUE;
+    *canSearchMessages = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP 
 nsMovemailIncomingServer::GetServerRequiresPasswordForBiff(bool *aServerRequiresPasswordForBiff)
 {
     NS_ENSURE_ARG_POINTER(aServerRequiresPasswordForBiff);
-    *aServerRequiresPasswordForBiff = PR_FALSE;
+    *aServerRequiresPasswordForBiff = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP 
 nsMovemailIncomingServer::GetAccountManagerChrome(nsAString& aResult)
 {
     aResult.AssignLiteral("am-main.xul");
     return NS_OK;
--- a/mailnews/local/src/nsMovemailService.cpp
+++ b/mailnews/local/src/nsMovemailService.cpp
@@ -158,45 +158,45 @@ nsMovemailService::Error(PRInt32 errorCo
   }
 }
 
 
 bool ObtainSpoolLock(const char *aSpoolName,
                        int aSeconds /* number of seconds to retry */,
                        bool *aUsingLockFile)
 {
-  NS_ENSURE_TRUE(aUsingLockFile, PR_FALSE);
+  NS_ENSURE_TRUE(aUsingLockFile, false);
 
   /*
    * Locking procedures:
    * If the directory is not writable, we want to use the appropriate system
    * utilites to lock the file.
    * If the directory is writable, we want to go through the create-and-link
    * locking procedures to make it atomic for certain networked file systems.
    * This involves creating a .mozlock file and attempting to hard-link it to
    * the customary .lock file.
    */
   nsCOMPtr<nsILocalFile> spoolFile;
   nsresult rv = NS_NewNativeLocalFile(nsDependentCString(aSpoolName),
-                                      PR_TRUE,
+                                      true,
                                       getter_AddRefs(spoolFile));
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   nsCOMPtr<nsIFile> directory;
   rv = spoolFile->GetParent(getter_AddRefs(directory));
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   rv = directory->IsWritable(aUsingLockFile);
-  NS_ENSURE_SUCCESS(rv, PR_FALSE);
+  NS_ENSURE_SUCCESS(rv, false);
 
   if (!*aUsingLockFile) {
     LOG(("Attempting to use kernel file lock"));
     PRFileDesc *fd;
     rv = spoolFile->OpenNSPRFileDesc(PR_RDWR, 0, &fd);
-    NS_ENSURE_SUCCESS(rv, PR_FALSE);
+    NS_ENSURE_SUCCESS(rv, false);
     PRStatus lock_result;
     int retry_count = 0;
 
     do {
       lock_result = PR_TLockFile(fd);
   
       retry_count++;
       LOG(("Attempt %d of %d to lock file", retry_count, aSeconds));
@@ -225,28 +225,28 @@ bool ObtainSpoolLock(const char *aSpoolN
 
   nsCAutoString mozlockstr(aSpoolName);
   mozlockstr.Append(".mozlock");
   nsCAutoString lockstr(aSpoolName);
   lockstr.Append(".lock");
 
   // Create nsILocalFile for the spool.mozlock file
   nsCOMPtr<nsILocalFile> tmplocfile;
-  rv = NS_NewNativeLocalFile(mozlockstr, PR_TRUE, getter_AddRefs(tmplocfile));
+  rv = NS_NewNativeLocalFile(mozlockstr, true, getter_AddRefs(tmplocfile));
   if (NS_FAILED(rv))
-    return PR_FALSE;
+    return false;
   // THOUGHT: hmm, perhaps use MakeUnique to generate us a unique mozlock?
   // ... perhaps not, MakeUnique implementation looks racey -- use mktemp()?
 
   // step 1: create SPOOLNAME.mozlock
   rv = tmplocfile->Create(nsIFile::NORMAL_FILE_TYPE, 0666);
   if (NS_FAILED(rv) && rv != NS_ERROR_FILE_ALREADY_EXISTS) {
     // can't create our .mozlock file... game over already
     LOG(("Failed to create file %s\n", mozlockstr.get()));
-    return PR_FALSE;
+    return false;
   }
 
   // step 2: hard-link .mozlock file to .lock file (this wackiness
   //         is necessary for non-racey locking on NFS-mounted spool dirs)
   // n.b. XPCOM utilities don't support hard-linking yet, so we
   // skip out to <unistd.h> and the POSIX interface for link()
   int link_result = 0;
   int retry_count = 0;
@@ -261,17 +261,17 @@ bool ObtainSpoolLock(const char *aSpoolN
       // pause 1sec, waiting for .lock to go away
       PRIntervalTime sleepTime = 1000; // 1 second
       PR_Sleep(sleepTime);
     }
   } while (link_result == -1 && retry_count < aSeconds);
   LOG(("Link result: %d", link_result));
 
   // step 3: remove .mozlock file, in any case
-  rv = tmplocfile->Remove(PR_FALSE /* non-recursive */);
+  rv = tmplocfile->Remove(false /* non-recursive */);
   if (NS_FAILED(rv)) {
     // Could not delete our .mozlock file... very unusual, but
     // not fatal.
     LOG(("Unable to delete %s", mozlockstr.get()));
   }
 
   // step 4: now we know whether we succeeded or failed
   return link_result == 0;
@@ -282,69 +282,69 @@ bool ObtainSpoolLock(const char *aSpoolN
 // we're the ones who made the lock in the first place!)
 bool YieldSpoolLock(const char *aSpoolName, bool aUsingLockFile)
 {
   LOG(("YieldSpoolLock(%s)", aSpoolName));
 
   if (!aUsingLockFile) {
     nsCOMPtr<nsILocalFile> spoolFile;
     nsresult rv = NS_NewNativeLocalFile(nsDependentCString(aSpoolName),
-                                        PR_TRUE,
+                                        true,
                                         getter_AddRefs(spoolFile));
-    NS_ENSURE_SUCCESS(rv, PR_FALSE);
+    NS_ENSURE_SUCCESS(rv, false);
 
     PRFileDesc *fd;
     rv = spoolFile->OpenNSPRFileDesc(PR_RDWR, 0, &fd);
-    NS_ENSURE_SUCCESS(rv, PR_FALSE);
+    NS_ENSURE_SUCCESS(rv, false);
 
     bool unlockSucceeded = PR_UnlockFile(fd) == PR_SUCCESS;
     PR_Close(fd);
     if (unlockSucceeded)
       LOG(("YieldSpoolLock was successful."));
     return unlockSucceeded;
   }
 
   nsCAutoString lockstr(aSpoolName);
   lockstr.Append(".lock");
 
   nsresult rv;
 
   // Create nsILocalFile for the spool.lock file
   nsCOMPtr<nsILocalFile> locklocfile;
-  rv = NS_NewNativeLocalFile(lockstr, PR_TRUE, getter_AddRefs(locklocfile));
+  rv = NS_NewNativeLocalFile(lockstr, true, getter_AddRefs(locklocfile));
   if (NS_FAILED(rv))
-    return PR_FALSE;
+    return false;
 
   // Check if the lock file exists
   bool exists;
   rv = locklocfile->Exists(&exists);
   if (NS_FAILED(rv))
-    return PR_FALSE;
+    return false;
 
   // Delete the file if it exists
   if (exists) {
-    rv = locklocfile->Remove(PR_FALSE /* non-recursive */);
+    rv = locklocfile->Remove(false /* non-recursive */);
     if (NS_FAILED(rv))
-      return PR_FALSE;
+      return false;
   }
 
   LOG(("YieldSpoolLock was successful."));
 
   // Success.
-  return PR_TRUE;
+  return true;
 }
 
 static nsresult
 LocateSpoolFile(nsACString & spoolPath)
 {
   bool isFile;
   nsresult rv;
 
   nsCOMPtr<nsILocalFile> spoolFile;
-  rv = NS_NewNativeLocalFile(EmptyCString(), PR_TRUE, getter_AddRefs(spoolFile));
+  rv = NS_NewNativeLocalFile(EmptyCString(), true, getter_AddRefs(spoolFile));
   NS_ENSURE_SUCCESS(rv, rv);
 
   char * mailEnv = PR_GetEnv("MAIL");
   char * userEnv = PR_GetEnv("USER");
   if (!userEnv)
     userEnv = PR_GetEnv("USERNAME");
 
   if (mailEnv) {
@@ -396,17 +396,17 @@ nsMovemailService::GetNewMail(nsIMsgWind
   rv = LocateSpoolFile(spoolPath);
   if (NS_FAILED(rv) || spoolPath.IsEmpty()) {
     Error(MOVEMAIL_SPOOL_FILE_NOT_FOUND, nsnull, 0);
     return NS_ERROR_FAILURE;
   }
 
   // Create an input stream for the spool file
   nsCOMPtr<nsILocalFile> spoolFile;
-  rv = NS_NewNativeLocalFile(spoolPath, PR_TRUE, getter_AddRefs(spoolFile));
+  rv = NS_NewNativeLocalFile(spoolPath, true, getter_AddRefs(spoolFile));
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr<nsIInputStream> spoolInputStream;
   rv = NS_NewLocalFileInputStream(getter_AddRefs(spoolInputStream), spoolFile);
   if (NS_FAILED(rv)) {
     const PRUnichar *params[] = {
       NS_ConvertUTF8toUTF16(spoolPath).get()
     };
     Error(MOVEMAIL_CANT_OPEN_SPOOL_FILE, params, 1);
@@ -446,17 +446,17 @@ nsMovemailService::GetNewMail(nsIMsgWind
   // create a new mail parser
   nsRefPtr<nsParseNewMailState> newMailParser = new nsParseNewMailState;
   NS_ENSURE_TRUE(newMailParser, NS_ERROR_OUT_OF_MEMORY);
 
   rv = newMailParser->Init(serverFolder, inbox,
                            nsnull, newHdr, outputStream);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  in_server->SetServerBusy(PR_TRUE);
+  in_server->SetServerBusy(true);
 
   // Try and obtain the lock for the spool file
   bool usingLockFile;
   if (!ObtainSpoolLock(spoolPath.get(), 5, &usingLockFile)) {
     nsAutoString lockFile = NS_ConvertUTF8toUTF16(spoolPath);
     lockFile.AppendLiteral(".lock");
     const PRUnichar *params[] = {
       lockFile.get()
@@ -514,17 +514,17 @@ nsMovemailService::GetNewMail(nsIMsgWind
     nsAutoString spoolLock = NS_ConvertUTF8toUTF16(spoolPath);
     spoolLock.AppendLiteral(".lock");
     const PRUnichar *params[] = {
       spoolLock.get()
     };
     Error(MOVEMAIL_CANT_DELETE_LOCK, params, 1);
   }
 
-  in_server->SetServerBusy(PR_FALSE);
+  in_server->SetServerBusy(false);
 
   LOG(("GetNewMail returning rv=%d", rv));
   return rv;
 }
 
 
 NS_IMETHODIMP
 nsMovemailService::SetDefaultLocalPath(nsILocalFile *aPath)
@@ -571,84 +571,84 @@ nsMovemailService::GetServerIID(nsIID* *
   *aServerIID = new nsIID(NS_GET_IID(nsIMovemailIncomingServer));
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMovemailService::GetRequiresUsername(bool *aRequiresUsername)
 {
   NS_ENSURE_ARG_POINTER(aRequiresUsername);
-  *aRequiresUsername = PR_FALSE;
+  *aRequiresUsername = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMovemailService::GetPreflightPrettyNameWithEmailAddress(bool *aPreflightPrettyNameWithEmailAddress)
 {
   NS_ENSURE_ARG_POINTER(aPreflightPrettyNameWithEmailAddress);
-  *aPreflightPrettyNameWithEmailAddress = PR_TRUE;
+  *aPreflightPrettyNameWithEmailAddress = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMovemailService::GetCanLoginAtStartUp(bool *aCanLoginAtStartUp)
 {
   NS_ENSURE_ARG_POINTER(aCanLoginAtStartUp);
-  *aCanLoginAtStartUp = PR_TRUE;
+  *aCanLoginAtStartUp = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMovemailService::GetCanDelete(bool *aCanDelete)
 {
   NS_ENSURE_ARG_POINTER(aCanDelete);
-  *aCanDelete = PR_TRUE;
+  *aCanDelete = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMovemailService::GetCanGetMessages(bool *aCanGetMessages)
 {
   NS_ENSURE_ARG_POINTER(aCanGetMessages);
-  *aCanGetMessages = PR_TRUE;
+  *aCanGetMessages = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMovemailService::GetCanGetIncomingMessages(bool *aCanGetIncomingMessages)
 {
   NS_ENSURE_ARG_POINTER(aCanGetIncomingMessages);
-  *aCanGetIncomingMessages = PR_TRUE;
+  *aCanGetIncomingMessages = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMovemailService::GetCanDuplicate(bool *aCanDuplicate)
 {
   NS_ENSURE_ARG_POINTER(aCanDuplicate);
-  *aCanDuplicate = PR_FALSE;
+  *aCanDuplicate = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMovemailService::GetDefaultDoBiff(bool *aDoBiff)
 {
   NS_ENSURE_ARG_POINTER(aDoBiff);
   // by default, do biff for movemail
-  *aDoBiff = PR_TRUE;
+  *aDoBiff = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMovemailService::GetDefaultServerPort(bool isSecure, PRInt32 *aDefaultPort)
 {
   NS_ENSURE_ARG_POINTER(aDefaultPort);
   *aDefaultPort = -1;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMovemailService::GetShowComposeMsgLink(bool *showComposeMsgLink)
 {
   NS_ENSURE_ARG_POINTER(showComposeMsgLink);
-  *showComposeMsgLink = PR_TRUE;
+  *showComposeMsgLink = true;
   return NS_OK;
 }
--- a/mailnews/local/src/nsMsgLocalStoreUtils.cpp
+++ b/mailnews/local/src/nsMsgLocalStoreUtils.cpp
@@ -55,39 +55,39 @@ nsMsgLocalStoreUtils::AddDirectorySepara
 }
 
 bool
 nsMsgLocalStoreUtils::nsShouldIgnoreFile(nsAString& name)
 {
   PRUnichar firstChar = name.First();
   if (firstChar == '.' || firstChar == '#' ||
       name.CharAt(name.Length() - 1) == '~')
-    return PR_TRUE;
+    return true;
 
   if (name.LowerCaseEqualsLiteral("msgfilterrules.dat") ||
       name.LowerCaseEqualsLiteral("rules.dat") ||
       name.LowerCaseEqualsLiteral("filterlog.html") ||
       name.LowerCaseEqualsLiteral("junklog.html") ||
       name.LowerCaseEqualsLiteral("rulesbackup.dat"))
-    return PR_TRUE;
+    return true;
 
   // don't add summary files to the list of folders;
   // don't add popstate files to the list either, or rules (sort.dat).
   if (StringEndsWith(name, NS_LITERAL_STRING(".snm")) ||
       name.LowerCaseEqualsLiteral("popstate.dat") ||
       name.LowerCaseEqualsLiteral("sort.dat") ||
       name.LowerCaseEqualsLiteral("mailfilt.log") ||
       name.LowerCaseEqualsLiteral("filters.js") ||
       StringEndsWith(name, NS_LITERAL_STRING(".toc")))
-    return PR_TRUE;
+    return true;
 
   // ignore RSS data source files
   if (name.LowerCaseEqualsLiteral("feeds.rdf") ||
       name.LowerCaseEqualsLiteral("feeditems.rdf"))
-    return PR_TRUE;
+    return true;
 
   // The .mozmsgs dir is for spotlight support
     return (StringEndsWith(name, NS_LITERAL_STRING(".mozmsgs")) ||
             StringEndsWith(name, NS_LITERAL_STRING(".sbd")) ||
             StringEndsWith(name, NS_LITERAL_STRING(SUMMARY_SUFFIX)));
 }
 
 /**
@@ -145,53 +145,53 @@ nsMsgLocalStoreUtils::ChangeKeywordsHelp
       nsCString keywordHeaders;
       nsresult rv = NS_ReadLine(inputStream, lineBuffer, keywordHeaders, &more);
       if (NS_SUCCEEDED(rv))
       {
         if (keywordHeaders.IsEmpty())
           break; // passed headers; no x-mozilla-keywords header; give up.
         if (StringBeginsWith(keywordHeaders,
                              NS_LITERAL_CSTRING(HEADER_X_MOZILLA_KEYWORDS)))
-          inKeywordHeader = PR_TRUE;
+          inKeywordHeader = true;
         else if (inKeywordHeader && (keywordHeaders.CharAt(0) == ' ' ||
                                      keywordHeaders.CharAt(0) == '\t'))
           ; // continuation header line
         else if (inKeywordHeader)
           break;
         else
           continue;
         PRUint32 keywordHdrLength = keywordHeaders.Length();
         PRInt32 startOffset, keywordLength;
         // check if we have the keyword
         if (MsgFindKeyword(keywordArray[i], keywordHeaders, &startOffset,
                            &keywordLength))
         {
-          foundKeyword = PR_TRUE;
+          foundKeyword = true;
           if (!aAdd) // if we're removing, remove it, and break;
           {
             keywordHeaders.Cut(startOffset, keywordLength);
             for (PRInt32 j = keywordLength; j > 0; j--)
               keywordHeaders.Append(' ');
             seekableStream->Seek(nsISeekableStream::NS_SEEK_SET, lineStartPos);
             outputStream->Write(keywordHeaders.get(), keywordHeaders.Length(),
                                 &bytesWritten);
           }
           offsetToAddKeyword = 0;
           // if adding and we already have the keyword, done
-          done = PR_TRUE;
+          done = true;
           break;
         }
         // argh, we need to check all the lines to see if we already have the
         // keyword, but if we don't find it, we want to remember the line and
         // position where we have room to add the keyword.
         if (aAdd)
         {
           nsCAutoString curKeywordHdr(keywordHeaders);
           // strip off line ending spaces.
-          curKeywordHdr.Trim(" ", PR_FALSE, PR_TRUE);
+          curKeywordHdr.Trim(" ", false, true);
           if (!offsetToAddKeyword && curKeywordHdr.Length() +
                 keywordToWrite.Length() < keywordHdrLength)
             offsetToAddKeyword = lineStartPos + curKeywordHdr.Length();
         }
       }
     }
     if (aAdd && !foundKeyword)
     {
--- a/mailnews/local/src/nsNoIncomingServer.cpp
+++ b/mailnews/local/src/nsNoIncomingServer.cpp
@@ -220,21 +220,21 @@ nsNoIncomingServer::GetNewMail(nsIMsgWin
   return rv;
 }
 
 
 NS_IMETHODIMP
 nsNoIncomingServer::GetCanSearchMessages(bool *canSearchMessages)
 {
   NS_ENSURE_ARG_POINTER(canSearchMessages);
-  *canSearchMessages = PR_TRUE;
+  *canSearchMessages = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNoIncomingServer::GetServerRequiresPasswordForBiff(bool *aServerRequiresPasswordForBiff)
 {
   NS_ENSURE_ARG_POINTER(aServerRequiresPasswordForBiff);
-  *aServerRequiresPasswordForBiff = PR_FALSE;  // for local folders, we don't require a password
+  *aServerRequiresPasswordForBiff = false;  // for local folders, we don't require a password
   return NS_OK;
 }
 
 
--- a/mailnews/local/src/nsNoneService.cpp
+++ b/mailnews/local/src/nsNoneService.cpp
@@ -111,84 +111,84 @@ nsNoneService::GetServerIID(nsIID* *aSer
     *aServerIID = new nsIID(NS_GET_IID(nsINoIncomingServer));
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNoneService::GetRequiresUsername(bool *aRequiresUsername)
 {
   NS_ENSURE_ARG_POINTER(aRequiresUsername);
-  *aRequiresUsername = PR_TRUE;
+  *aRequiresUsername = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNoneService::GetPreflightPrettyNameWithEmailAddress(bool *aPreflightPrettyNameWithEmailAddress)
 {
   NS_ENSURE_ARG_POINTER(aPreflightPrettyNameWithEmailAddress);
-  *aPreflightPrettyNameWithEmailAddress = PR_TRUE;
+  *aPreflightPrettyNameWithEmailAddress = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNoneService::GetCanLoginAtStartUp(bool *aCanLoginAtStartUp)
 {
   NS_ENSURE_ARG_POINTER(aCanLoginAtStartUp);
-  *aCanLoginAtStartUp = PR_FALSE;
+  *aCanLoginAtStartUp = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNoneService::GetCanDelete(bool *aCanDelete)
 {
   NS_ENSURE_ARG_POINTER(aCanDelete);
-  *aCanDelete = PR_FALSE;
+  *aCanDelete = false;
   return NS_OK;
 }  
 
 NS_IMETHODIMP
 nsNoneService::GetCanDuplicate(bool *aCanDuplicate)
 {
   NS_ENSURE_ARG_POINTER(aCanDuplicate);
-  *aCanDuplicate = PR_FALSE;
+  *aCanDuplicate = false;
   return NS_OK;
 }  
 
 NS_IMETHODIMP
 nsNoneService::GetCanGetMessages(bool *aCanGetMessages)
 {
     NS_ENSURE_ARG_POINTER(aCanGetMessages);
-    *aCanGetMessages = PR_FALSE;
+    *aCanGetMessages = false;
     return NS_OK;
 }  
 
 NS_IMETHODIMP
 nsNoneService::GetCanGetIncomingMessages(bool *aCanGetIncomingMessages)
 {
     NS_ENSURE_ARG_POINTER(aCanGetIncomingMessages);
-    *aCanGetIncomingMessages = PR_FALSE;
+    *aCanGetIncomingMessages = false;
     return NS_OK;
 } 
 
 NS_IMETHODIMP 
 nsNoneService::GetDefaultDoBiff(bool *aDoBiff)
 {
     NS_ENSURE_ARG_POINTER(aDoBiff);
     // by default, don't do biff for "none" servers
-    *aDoBiff = PR_FALSE;    
+    *aDoBiff = false;    
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNoneService::GetDefaultServerPort(bool isSecure, PRInt32 *aDefaultPort)
 {
     NS_ENSURE_ARG_POINTER(aDefaultPort);
     *aDefaultPort = -1;
     return NS_OK;
 }
 
 NS_IMETHODIMP 
 nsNoneService::GetShowComposeMsgLink(bool *showComposeMsgLink)
 {
     NS_ENSURE_ARG_POINTER(showComposeMsgLink);
-    *showComposeMsgLink = PR_FALSE;    
+    *showComposeMsgLink = false;    
     return NS_OK;
 }
--- a/mailnews/local/src/nsParseMailbox.cpp
+++ b/mailnews/local/src/nsParseMailbox.cpp
@@ -153,17 +153,17 @@ NS_IMETHODIMP nsMsgMailboxParser::OnStar
             m_graph_progress_total = (PRUint32) fileSize;
             UpdateStatusText(LOCAL_STATUS_SELECTING_MAILBOX);
 
             nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
             if (msgDBService)
             {
                 // Use OpenFolderDB to always open the db so that db's m_folder
                 // is set correctly.
-                rv = msgDBService->OpenFolderDB(folder, PR_TRUE,
+                rv = msgDBService->OpenFolderDB(folder, true,
                                                 getter_AddRefs(m_mailDB));
                 if (rv == NS_MSG_ERROR_FOLDER_SUMMARY_MISSING)
                   rv = msgDBService->CreateNewDB(folder,
                                                  getter_AddRefs(m_mailDB));
 
                 if (m_mailDB)
                     m_mailDB->AddListener(this);
             }
@@ -193,17 +193,17 @@ NS_IMETHODIMP nsMsgMailboxParser::OnStar
     return rv;
 }
 
 // stop binding is a "notification" informing us that the stream associated with aURL is going away.
 NS_IMETHODIMP nsMsgMailboxParser::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult aStatus)
 {
     DoneParsingFolder(aStatus);
     // what can we do? we can close the stream?
-    m_urlInProgress = PR_FALSE;  // don't close the connection...we may be re-using it.
+    m_urlInProgress = false;  // don't close the connection...we may be re-using it.
 
     if (m_mailDB)
         m_mailDB->RemoveListener(this);
     // and we want to mark ourselves for deletion or some how inform our protocol manager that we are
     // available for another url if there is one....
 
     ReleaseFolderLock();
     // be sure to clear any status text and progress info..
@@ -283,22 +283,22 @@ nsParseMailMessageState::OnReadChanged(n
 
 /* void OnJunkScoreChanged (in nsIDBChangeListener instigator); */
 NS_IMETHODIMP
 nsParseMailMessageState::OnJunkScoreChanged(nsIDBChangeListener *instigator)
 {
     return NS_OK;
 }
 
-nsMsgMailboxParser::nsMsgMailboxParser() : nsMsgLineBuffer(nsnull, PR_FALSE)
+nsMsgMailboxParser::nsMsgMailboxParser() : nsMsgLineBuffer(nsnull, false)
 {
   Init();
 }
 
-nsMsgMailboxParser::nsMsgMailboxParser(nsIMsgFolder *aFolder) : nsMsgLineBuffer(nsnull, PR_FALSE)
+nsMsgMailboxParser::nsMsgMailboxParser(nsIMsgFolder *aFolder) : nsMsgLineBuffer(nsnull, false)
 {
   m_folder = do_GetWeakReference(aFolder);
 }
 
 nsMsgMailboxParser::~nsMsgMailboxParser()
 {
   ReleaseFolderLock();
 }
@@ -377,17 +377,17 @@ void nsMsgMailboxParser::DoneParsingFold
   /* End of file.  Flush out any partial line remaining in the buffer. */
   FlushLastLine();
   PublishMsgHeader(nsnull);
 
   // only mark the db valid if we've succeeded.
   if (NS_SUCCEEDED(status) && m_mailDB)  // finished parsing, so flush db folder info
     UpdateDBFolderInfo();
   else if (m_mailDB)
-    m_mailDB->SetSummaryValid(PR_FALSE);
+    m_mailDB->SetSummaryValid(false);
 
   // remove the backup database
   if (m_backupMailDB)
   {
     nsCOMPtr<nsIMsgFolder> folder = do_QueryReferent(m_folder);
     if (folder)
       folder->RemoveBackupMsgDatabase();
     m_backupMailDB = nsnull;
@@ -409,17 +409,17 @@ void nsMsgMailboxParser::FreeBuffers()
 void nsMsgMailboxParser::UpdateDBFolderInfo()
 {
   UpdateDBFolderInfo(m_mailDB);
 }
 
 // update folder info in db so we know not to reparse.
 void nsMsgMailboxParser::UpdateDBFolderInfo(nsIMsgDatabase *mailDB)
 {
-  mailDB->SetSummaryValid(PR_TRUE);
+  mailDB->SetSummaryValid(true);
 }
 
 // Tell the world about the message header (add to db, and view, if any)
 PRInt32 nsMsgMailboxParser::PublishMsgHeader(nsIMsgWindow *msgWindow)
 {
   FinishHeader();
   if (m_newMsgHdr)
   {
@@ -437,21 +437,21 @@ PRInt32 nsMsgMailboxParser::PublishMsgHe
       (void)m_newMsgHdr->GetMessageSize(&size);
       folderInfo->ChangeExpungedBytes(size);
       m_newMsgHdr = nsnull;
     }
     else if (m_mailDB)
     {
       // add hdr but don't notify - shouldn't be requiring notifications
       // during summary file rebuilding
-      m_mailDB->AddNewHdrToDB(m_newMsgHdr, PR_FALSE);
+      m_mailDB->AddNewHdrToDB(m_newMsgHdr, false);
       m_newMsgHdr = nsnull;
     }
     else
-      NS_ASSERTION(PR_FALSE, "no database while parsing local folder");  // should have a DB, no?
+      NS_ASSERTION(false, "no database while parsing local folder");  // should have a DB, no?
   }
   else if (m_mailDB)
   {
     nsCOMPtr<nsIDBFolderInfo> folderInfo;
     m_mailDB->GetDBFolderInfo(getter_AddRefs(folderInfo));
     if (folderInfo)
       folderInfo->ChangeExpungedBytes(m_position - m_envelope_pos);
   }
@@ -551,17 +551,17 @@ nsMsgMailboxParser::AcquireFolderLock()
   return folder->AcquireSemaphore(supports);
 }
 
 NS_IMPL_ISUPPORTS2(nsParseMailMessageState, nsIMsgParseMailMsgState, nsIDBChangeListener)
 
 nsParseMailMessageState::nsParseMailMessageState()
 {
   m_position = 0;
-  m_IgnoreXMozillaStatus = PR_FALSE;
+  m_IgnoreXMozillaStatus = false;
   m_state = nsIMsgParseMailMsgState::ParseBodyState;
 
   // setup handling of custom db headers, headers that are added to .msf files
   // as properties of the nsMsgHdr objects, controlled by the
   // pref mailnews.customDBHeaders, a space-delimited list of headers.
   // E.g., if mailnews.customDBHeaders is "X-Spam-Score", and we're parsing
   // a mail message with the X-Spam-Score header, we'll set the
   // "x-spam-score" property of nsMsgHdr to the value of the header.
@@ -760,88 +760,88 @@ nsParseMailMessageState::IsEnvelopeLine(
    XP_ParseTimeString() may be too lenient for our purposes.
 
    DANGER!!  The released version of 2.0b1 was (on some systems,
    some Unix, some NT, possibly others) writing out envelope lines
    like "From - 10/13/95 11:22:33" which STRICT_ENVELOPE will reject!
    */
   const char *date, *end;
 
-  if (buf_size < 29) return PR_FALSE;
-  if (*buf != 'F') return PR_FALSE;
-  if (strncmp(buf, "From ", 5)) return PR_FALSE;
+  if (buf_size < 29) return false;
+  if (*buf != 'F') return false;
+  if (strncmp(buf, "From ", 5)) return false;
 
   end = buf + buf_size;
   date = buf + 5;
 
   /* Skip horizontal whitespace between "From " and user name. */
   while ((*date == ' ' || *date == '\t') && date < end)
   date++;
 
   /* If at the end, it doesn't match. */
   if (IS_SPACE(*date) || date == end)
-  return PR_FALSE;
+  return false;
 
   /* Skip over user name. */
   while (!IS_SPACE(*date) && date < end)
   date++;
 
   /* Skip horizontal whitespace between user name and date. */
   while ((*date == ' ' || *date == '\t') && date < end)
   date++;
 
   /* Don't want this to be localized. */
 # define TMP_ISALPHA(x) (((x) >= 'A' && (x) <= 'Z') || \
              ((x) >= 'a' && (x) <= 'z'))
 
   /* take off day-of-the-week. */
   if (date >= end - 3)
-  return PR_FALSE;
+  return false;
   if (!TMP_ISALPHA(date[0]) || !TMP_ISALPHA(date[1]) || !TMP_ISALPHA(date[2]))
-  return PR_FALSE;
+  return false;
   date += 3;
   /* Skip horizontal whitespace (and commas) between dotw and month. */
   if (*date != ' ' && *date != '\t' && *date != ',')
-  return PR_FALSE;
+  return false;
   while ((*date == ' ' || *date == '\t' || *date == ',') && date < end)
   date++;
 
   /* take off month. */
   if (date >= end - 3)
-  return PR_FALSE;
+  return false;
   if (!TMP_ISALPHA(date[0]) || !TMP_ISALPHA(date[1]) || !TMP_ISALPHA(date[2]))
-  return PR_FALSE;
+  return false;
   date += 3;
   /* Skip horizontal whitespace between month and dotm. */
   if (date == end || (*date != ' ' && *date != '\t'))
-  return PR_FALSE;
+  return false;
   while ((*date == ' ' || *date == '\t') && date < end)
   date++;
 
   /* Skip over digits and whitespace. */
   while (((*date >= '0' && *date <= '9') || *date == ' ' || *date == '\t') &&
      date < end)
   date++;
   /* Next character should be a colon. */
   if (date >= end || *date != ':')
-  return PR_FALSE;
+  return false;
 
   /* Ok, that ought to be enough... */
 
 # undef TMP_ISALPHA
 
 #else  /* !STRICT_ENVELOPE */
 
-  if (buf_size < 5) return PR_FALSE;
-  if (*buf != 'F') return PR_FALSE;
-  if (strncmp(buf, "From ", 5)) return PR_FALSE;
+  if (buf_size < 5) return false;
+  if (*buf != 'F') return false;
+  if (strncmp(buf, "From ", 5)) return false;
 
 #endif /* !STRICT_ENVELOPE */
 
-  return PR_TRUE;
+  return true;
 }
 
 // We've found the start of the next message, so finish this one off.
 NS_IMETHODIMP nsParseMailMessageState::FinishHeader()
 {
   if (m_newMsgHdr)
   {
     m_newMsgHdr->SetMessageOffset(m_envelope_pos);
@@ -1158,17 +1158,17 @@ SEARCH_NEWLINE:
         nsCAutoString receivedHdr(header->value, header->length);
         PRInt32 lastSemicolon = receivedHdr.RFindChar(';');
         if (lastSemicolon != -1)
         {
           nsCAutoString receivedDate;
           receivedDate = Substring(receivedHdr, lastSemicolon + 1);
           receivedDate.Trim(" \t\b\r\n");
           PRTime resultTime;
-          if (PR_ParseTimeString (receivedDate.get(), PR_FALSE, &resultTime) == PR_SUCCESS)
+          if (PR_ParseTimeString (receivedDate.get(), false, &resultTime) == PR_SUCCESS)
             m_receivedTime = resultTime;
         }
       }
     }
   }
   return 0;
 }
 
@@ -1388,17 +1388,17 @@ int nsParseMailMessageState::FinalizeHea
     nsresult ret = NS_OK;
 
     if (m_backupMailDB && !rawMsgId.IsEmpty())
       ret = m_backupMailDB->GetMsgHdrForMessageID(
               rawMsgId.get(), getter_AddRefs(oldHeader));
 
     if (NS_SUCCEEDED(ret) && oldHeader)
         ret = m_mailDB->CopyHdrFromExistingHdr(m_envelope_pos,
-                oldHeader, PR_FALSE, getter_AddRefs(m_newMsgHdr));
+                oldHeader, false, getter_AddRefs(m_newMsgHdr));
     else if (!m_newMsgHdr)
     {
       // Should assert that this is not a local message
       ret = m_mailDB->CreateNewHdr(m_envelope_pos, getter_AddRefs(m_newMsgHdr));
     }
 
     if (NS_SUCCEEDED(ret) && m_newMsgHdr)
     {
@@ -1529,17 +1529,17 @@ int nsParseMailMessageState::FinalizeHea
           nsCAutoString hash;
           const char *md5_b64 = "dummy.message.id";
           nsresult rv;
           nsCOMPtr<nsICryptoHash> hasher = do_CreateInstance("@mozilla.org/security/hash;1", &rv);
           if (NS_SUCCEEDED(rv))
           {
             if (NS_SUCCEEDED(hasher->Init(nsICryptoHash::MD5)) &&
                 NS_SUCCEEDED(hasher->Update((const PRUint8*) m_headers.GetBuffer(), m_headers.GetSize())) &&
-                NS_SUCCEEDED(hasher->Finish(PR_TRUE, hash)))
+                NS_SUCCEEDED(hasher->Finish(true, hash)))
               md5_b64 = hash.get();
           }
           PR_snprintf (md5_data, sizeof(md5_data), "<md5:%s>", md5_b64);
           md5_header.value = md5_data;
           md5_header.length = strlen(md5_data);
           id = &md5_header;
         }
 
@@ -1589,17 +1589,17 @@ int nsParseMailMessageState::FinalizeHea
         //
         // date is:
         // Date: -> m_envelope_date
 
         PRUint32 rcvTimeSecs = 0;
         if (date)
         {  // Date:
           PRTime resultTime;
-          PRStatus timeStatus = PR_ParseTimeString (date->value, PR_FALSE, &resultTime);
+          PRStatus timeStatus = PR_ParseTimeString (date->value, false, &resultTime);
           if (PR_SUCCESS == timeStatus)
           {
             m_newMsgHdr->SetDate(resultTime);
             PRTime2Seconds(resultTime, &rcvTimeSecs);
           }
         }
         else
         {  // PR_Now()
@@ -1614,17 +1614,17 @@ int nsParseMailMessageState::FinalizeHea
         }
         if (!LL_IS_ZERO(m_receivedTime))
         {  // Upgrade 'Received' to Received: ?
           PRTime2Seconds(m_receivedTime, &rcvTimeSecs);
         }
         else if (deliveryDate)
         {  // Upgrade 'Received' to Delivery-date: ?
           PRTime resultTime;
-          PRStatus timeStatus = PR_ParseTimeString (deliveryDate->value, PR_FALSE, &resultTime);
+          PRStatus timeStatus = PR_ParseTimeString (deliveryDate->value, false, &resultTime);
           if (PR_SUCCESS == timeStatus)
             PRTime2Seconds(resultTime, &rcvTimeSecs);
         }
         m_newMsgHdr->SetUint32Property("dateReceived", rcvTimeSecs);
 
         if (priority)
           m_newMsgHdr->SetPriorityString(priority->value);
         else if (priorityFlags == nsMsgPriority::notSet)
@@ -1691,34 +1691,34 @@ int nsParseMailMessageState::FinalizeHea
             PRUint32 newFlags;
             m_newMsgHdr->OrFlags(nsMsgMessageFlags::Attachment, &newFlags);
           }
         }
       }
     }
     else
     {
-      NS_ASSERTION(PR_FALSE, "error creating message header");
+      NS_ASSERTION(false, "error creating message header");
       status = NS_ERROR_OUT_OF_MEMORY;
     }
   }
   else
     status = 0;
 
   //### why is this stuff const?
   char *tmp = (char*) to.value;
   PR_Free(tmp);
   tmp = (char*) cc.value;
   PR_Free(tmp);
 
   return status;
 }
 
 nsParseNewMailState::nsParseNewMailState()
-    : m_disableFilters(PR_FALSE)
+    : m_disableFilters(false)
 {
   m_ibuffer = nsnull;
   m_ibuffer_size = 0;
   m_ibuffer_fp = 0;
   m_numNotNewMessages = 0;
  }
 
 NS_IMPL_ISUPPORTS_INHERITED1(nsParseNewMailState, nsMsgMailboxParser, nsIMsgFilterHitNotify)
@@ -1734,17 +1734,17 @@ nsParseNewMailState::Init(nsIMsgFolder *
   m_downloadFolder = downloadFolder;
 
   m_newMsgHdr = aHdr;
   m_outputStream = aOutputStream;
   // the new mail parser isn't going to get the stream input, it seems, so we can't use
   // the OnStartRequest mechanism the mailbox parser uses. So, let's open the db right now.
   nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
   if (msgDBService)
-    rv = msgDBService->OpenFolderDB(downloadFolder, PR_FALSE,
+    rv = msgDBService->OpenFolderDB(downloadFolder, false,
                                     getter_AddRefs(m_mailDB));
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr <nsIMsgFolder> rootMsgFolder = do_QueryInterface(serverFolder, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIMsgIncomingServer> server;
   rv = rootMsgFolder->GetServer(getter_AddRefs(server));
   if (NS_SUCCEEDED(rv))
@@ -1760,24 +1760,24 @@ nsParseNewMailState::Init(nsIMsgFolder *
     if (rootMsgFolder != deferredToRootFolder)
     {
       nsCOMPtr <nsIMsgIncomingServer> deferredToServer;
       deferredToRootFolder->GetServer(getter_AddRefs(deferredToServer));
       if (deferredToServer)
         deferredToServer->GetFilterList(aMsgWindow, getter_AddRefs(m_deferredToServerFilterList));
     }
   }
-  m_disableFilters = PR_FALSE;
+  m_disableFilters = false;
   return NS_OK;
 }
 
 nsParseNewMailState::~nsParseNewMailState()
 {
   if (m_mailDB)
-    m_mailDB->Close(PR_TRUE);
+    m_mailDB->Close(true);
   if (m_backupMailDB)
     m_backupMailDB->ForceClosed();
 #ifdef DOING_JSFILTERS
   JSFilter_cleanup();
 #endif
 }
 
 // not an IMETHOD so we don't need to do error checking or return an error.
@@ -1884,31 +1884,31 @@ PRInt32 nsParseNewMailState::PublishMsgH
                 }
               }
               break;
             case nsIMsgIncomingServer::markDupsRead:
               MarkFilteredMessageRead(m_newMsgHdr);
               break;
           }
           PRInt32 numNewMessages;
-          m_downloadFolder->GetNumNewMessages(PR_FALSE, &numNewMessages);
+          m_downloadFolder->GetNumNewMessages(false, &numNewMessages);
           m_downloadFolder->SetNumNewMessages(numNewMessages - 1);
 
           m_newMsgHdr = nsnull;
           return 0;
         }
       }
 
       ApplyFilters(&moved, msgWindow, msgOffset);
     }
     if (!moved)
     {
       if (m_mailDB)
       {
-        m_mailDB->AddNewHdrToDB(m_newMsgHdr, PR_TRUE);
+        m_mailDB->AddNewHdrToDB(m_newMsgHdr, true);
         nsCOMPtr<nsIMsgFolderNotificationService> notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
         if (notifier)
           notifier->NotifyMsgAdded(m_newMsgHdr);
         // mark the header as not yet reported classified
         nsMsgKey msgKey;
         m_newMsgHdr->GetMessageKey(&msgKey);
         m_downloadFolder->OrProcessingFlags(
            msgKey, nsMsgProcessingFlags::NotReportedClassified);
@@ -1949,17 +1949,17 @@ nsresult nsParseNewMailState::GetTrashFo
         rv = NS_ERROR_FAILURE;
     }
   }
   return rv;
 }
 
 void nsParseNewMailState::ApplyFilters(bool *pMoved, nsIMsgWindow *msgWindow, PRUint32 msgOffset)
 {
-  m_msgMovedByFilter = m_msgCopiedByFilter = PR_FALSE;
+  m_msgMovedByFilter = m_msgCopiedByFilter = false;
   m_curHdrOffset = msgOffset;
 
   if (!m_disableFilters)
   {
     nsCOMPtr<nsIMsgDBHdr> msgHdr = m_newMsgHdr;
     nsCOMPtr<nsIMsgFolder> downloadFolder = m_downloadFolder;
     nsCOMPtr <nsIMsgFolder> rootMsgFolder = do_QueryInterface(m_rootFolder);
     if (rootMsgFolder)
@@ -1993,17 +1993,17 @@ NS_IMETHODIMP nsParseNewMailState::Apply
 {
   NS_ENSURE_ARG_POINTER(applyMore);
 
   nsMsgRuleActionType actionType;
   nsCString actionTargetFolderUri;
   PRUint32 newFlags;
   nsresult rv = NS_OK;
 
-  *applyMore = PR_TRUE;
+  *applyMore = true;
 
   nsCOMPtr<nsIMsgDBHdr> msgHdr = m_newMsgHdr;
 
   nsCOMPtr<nsISupportsArray> filterActionList;
   rv = NS_NewISupportsArray(getter_AddRefs(filterActionList));
   NS_ENSURE_SUCCESS(rv, rv);
   rv = filter->GetSortedActionList(filterActionList);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -2027,32 +2027,32 @@ NS_IMETHODIMP nsParseNewMailState::Apply
     if (NS_SUCCEEDED(filterAction->GetType(&actionType)))
     {
       if (actionType == nsMsgFilterAction::MoveToFolder ||
           actionType == nsMsgFilterAction::CopyToFolder)
       {
         filterAction->GetTargetFolderUri(actionTargetFolderUri);
         if (actionTargetFolderUri.IsEmpty())
         {
-          NS_ASSERTION(PR_FALSE, "actionTargetFolderUri is empty");
+          NS_ASSERTION(false, "actionTargetFolderUri is empty");
           continue;
         }
       }
       switch (actionType)
       {
       case nsMsgFilterAction::Delete:
         {
           nsCOMPtr <nsIMsgFolder> trash;
           // set value to trash folder
           rv = GetTrashFolder(getter_AddRefs(trash));
           if (NS_SUCCEEDED(rv) && trash)
             rv = trash->GetURI(actionTargetFolderUri);
 
           msgHdr->OrFlags(nsMsgMessageFlags::Read, &newFlags); // mark read in trash.
-          msgIsNew = PR_FALSE;
+          msgIsNew = false;
         }
       case nsMsgFilterAction::MoveToFolder:
         // if moving to a different file, do it.
         if (actionTargetFolderUri.get() && !m_inboxUri.Equals(actionTargetFolderUri,
                                                               nsCaseInsensitiveCStringComparator()))
         {
           nsresult err;
           nsCOMPtr<nsIRDFService> rdf(do_GetService(kRDFServiceCID, &err));
@@ -2076,17 +2076,17 @@ NS_IMETHODIMP nsParseNewMailState::Apply
               m_moveCoalescer = new nsImapMoveCoalescer(m_downloadFolder, m_msgWindow);
             NS_ENSURE_TRUE(m_moveCoalescer, NS_ERROR_OUT_OF_MEMORY);
             nsMsgKey msgKey;
             (void) msgHdr->GetMessageKey(&msgKey);
             m_moveCoalescer->AddMove(destIFolder , msgKey);
             if (loggingEnabled)
               (void)filter->LogRuleHit(filterAction, msgHdr);
             err = NS_OK;
-            msgIsNew = PR_FALSE;
+            msgIsNew = false;
           }
           else
           {
             nsCOMPtr<nsIMsgPluggableStore> msgStore;
             err = m_downloadFolder->GetMsgStore(getter_AddRefs(msgStore));
             if (NS_SUCCEEDED(err))
               msgStore->MoveNewlyDownloadedMessage(msgHdr, destIFolder, &msgMoved);
             if (!msgMoved)
@@ -2095,40 +2095,40 @@ NS_IMETHODIMP nsParseNewMailState::Apply
             m_msgMovedByFilter = NS_SUCCEEDED(err);
             if (m_msgMovedByFilter)
             {
               if (loggingEnabled)
                 (void)filter->LogRuleHit(filterAction, msgHdr);
             }
           }
         }
-        *applyMore = PR_FALSE;
+        *applyMore = false;
         break;
         case nsMsgFilterAction::CopyToFolder:
         {
           nsCString uri;
           rv = m_rootFolder->GetURI(uri);
 
           if (!actionTargetFolderUri.IsEmpty() && !actionTargetFolderUri.Equals(uri))
           {
             nsCOMPtr<nsIMutableArray> messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID));
-            messageArray->AppendElement(msgHdr, PR_FALSE);
+            messageArray->AppendElement(msgHdr, false);
 
             nsCOMPtr<nsIMsgFolder> dstFolder;
             rv = GetExistingFolder(actionTargetFolderUri,
                                    getter_AddRefs(dstFolder));
             NS_ENSURE_SUCCESS(rv, rv);
 
             nsCOMPtr<nsIMsgCopyService> copyService =
               do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv);
             NS_ENSURE_SUCCESS(rv, rv);
             rv = copyService->CopyMessages(m_downloadFolder, messageArray, dstFolder,
-                                           PR_FALSE, nsnull, msgWindow, PR_FALSE);
+                                           false, nsnull, msgWindow, false);
             NS_ENSURE_SUCCESS(rv, rv);
-            m_msgCopiedByFilter = PR_TRUE;
+            m_msgCopiedByFilter = true;
           }
         }
         break;
       case nsMsgFilterAction::MarkRead:
         msgIsNew = false;
         MarkFilteredMessageRead(msgHdr);
         break;
       case nsMsgFilterAction::MarkUnread:
@@ -2140,29 +2140,29 @@ NS_IMETHODIMP nsParseNewMailState::Apply
         break;
       case nsMsgFilterAction::KillSubthread:
         msgHdr->OrFlags(nsMsgMessageFlags::Ignored, &newFlags);
         break;
       case nsMsgFilterAction::WatchThread:
         msgHdr->OrFlags(nsMsgMessageFlags::Watched, &newFlags);
         break;
       case nsMsgFilterAction::MarkFlagged:
-        msgHdr->MarkFlagged(PR_TRUE);
+        msgHdr->MarkFlagged(true);
         break;
       case nsMsgFilterAction::ChangePriority:
         nsMsgPriorityValue filterPriority;
         filterAction->GetPriority(&filterPriority);
         msgHdr->SetPriority(filterPriority);
         break;
       case nsMsgFilterAction::AddTag:
       {
         nsCString keyword;
         filterAction->GetStrValue(keyword);
         nsCOMPtr<nsIMutableArray> messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID));
-        messageArray->AppendElement(msgHdr, PR_FALSE);
+        messageArray->AppendElement(msgHdr, false);
         m_downloadFolder->AddKeywordsToMessages(messageArray, keyword);
         break;
       }
       case nsMsgFilterAction::Label:
         nsMsgLabelValue filterLabel;
         filterAction->GetLabel(&filterLabel);
         nsMsgKey msgKey;
         msgHdr->GetMessageKey(&msgKey);
@@ -2170,17 +2170,17 @@ NS_IMETHODIMP nsParseNewMailState::Apply
         break;
       case nsMsgFilterAction::JunkScore:
       {
         nsCAutoString junkScoreStr;
         PRInt32 junkScore;
         filterAction->GetJunkScore(&junkScore);
         junkScoreStr.AppendInt(junkScore);
         if (junkScore == nsIJunkMailPlugin::IS_SPAM_SCORE)
-          msgIsNew = PR_FALSE;
+          msgIsNew = false;
         nsMsgKey msgKey;
         msgHdr->GetMessageKey(&msgKey);
         msgHdr->SetStringProperty("junkscore", junkScoreStr.get());
         msgHdr->SetStringProperty("junkscoreorigin", "filter");
         break;
       }
       case nsMsgFilterAction::Forward:
         {
@@ -2204,74 +2204,74 @@ NS_IMETHODIMP nsParseNewMailState::Apply
           nsCOMPtr <nsIMsgFolder> downloadFolder;
           msgHdr->GetFolder(getter_AddRefs(downloadFolder));
           nsCOMPtr <nsIMsgLocalMailFolder> localFolder = do_QueryInterface(downloadFolder);
           msgHdr->GetFlags(&flags);
           if (localFolder)
           {
             nsCOMPtr<nsIMutableArray> messages = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
             NS_ENSURE_SUCCESS(rv, rv);
-            messages->AppendElement(msgHdr, PR_FALSE);
+            messages->AppendElement(msgHdr, false);
             // This action ignores the deleteMailLeftOnServer preference
             localFolder->MarkMsgsOnPop3Server(messages, POP3_FORCE_DEL);
 
             // If this is just a header, throw it away. It's useless now
             // that the server copy is being deleted.
             if (flags & nsMsgMessageFlags::Partial)
             {
-              m_msgMovedByFilter = PR_TRUE;
-              msgIsNew = PR_FALSE;
+              m_msgMovedByFilter = true;
+              msgIsNew = false;
             }
           }
         }
         break;
       case nsMsgFilterAction::FetchBodyFromPop3Server:
         {
           PRUint32 flags = 0;
           nsCOMPtr <nsIMsgFolder> downloadFolder;
           msgHdr->GetFolder(getter_AddRefs(downloadFolder));
           nsCOMPtr <nsIMsgLocalMailFolder> localFolder = do_QueryInterface(downloadFolder);
           msgHdr->GetFlags(&flags);
           if (localFolder && (flags & nsMsgMessageFlags::Partial))
           {
             nsCOMPtr<nsIMutableArray> messages = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
             NS_ENSURE_SUCCESS(rv, rv);
-            messages->AppendElement(msgHdr, PR_FALSE);
+            messages->AppendElement(msgHdr, false);
             localFolder->MarkMsgsOnPop3Server(messages, POP3_FETCH_BODY);
             // Don't add this header to the DB, we're going to replace it
             // with the full message.
-            m_msgMovedByFilter = PR_TRUE;
-            msgIsNew = PR_FALSE;
+            m_msgMovedByFilter = true;
+            msgIsNew = false;
             // Don't do anything else in this filter, wait until we
             // have the full message.
-            *applyMore = PR_FALSE;
+            *applyMore = false;
           }
         }
         break;
 
       case nsMsgFilterAction::StopExecution:
       {
         // don't apply any more filters
-        *applyMore = PR_FALSE;
+        *applyMore = false;
       }
       break;
 
       case nsMsgFilterAction::Custom:
       {
         nsCOMPtr<nsIMsgFilterCustomAction> customAction;
         rv = filterAction->GetCustomAction(getter_AddRefs(customAction));
         NS_ENSURE_SUCCESS(rv, rv);
 
         nsCAutoString value;
         filterAction->GetStrValue(value);
 
         nsCOMPtr<nsIMutableArray> messageArray(
             do_CreateInstance(NS_ARRAY_CONTRACTID, &rv));
         NS_ENSURE_TRUE(messageArray, rv);
-        messageArray->AppendElement(msgHdr, PR_FALSE);
+        messageArray->AppendElement(msgHdr, false);
 
         customAction->Apply(messageArray, value, nsnull,
                             nsMsgFilterType::InboxRule, msgWindow);
       }
       break;
 
 
       default:
@@ -2279,17 +2279,17 @@ NS_IMETHODIMP nsParseNewMailState::Apply
       }
       if (loggingEnabled && actionType != nsMsgFilterAction::MoveToFolder && actionType != nsMsgFilterAction::Delete)
         (void)filter->LogRuleHit(filterAction, msgHdr);
     }
   }
   if (!msgIsNew)
   {
     PRInt32 numNewMessages;
-    m_downloadFolder->GetNumNewMessages(PR_FALSE, &numNewMessages);
+    m_downloadFolder->GetNumNewMessages(false, &numNewMessages);
     if (numNewMessages > 0)
       m_downloadFolder->SetNumNewMessages(numNewMessages - 1);
     m_numNotNewMessages++;
   }
   return rv;
 }
 
 // this gets run in a second pass, after apply filters to a header.
@@ -2475,17 +2475,17 @@ nsresult nsParseNewMailState::MoveIncorp
   nsCOMPtr<nsIMsgFolder> parentFolder;
   destIFolder->GetParent(getter_AddRefs(parentFolder));
   if (parentFolder)
     destIFolder->GetCanFileMessages(&canFileMessages);
   if (!parentFolder || !canFileMessages)
   {
     if (filter)
     {
-      filter->SetEnabled(PR_FALSE);
+      filter->SetEnabled(false);
       // we need to explicitly save the filter file.
       if (m_filterList)
         m_filterList->SaveToDefaultFile();
       destIFolder->ThrowAlertMsg("filterDisabled", msgWindow);
     }
     return NS_MSG_NOT_A_MAIL_FOLDER;
   }
 
@@ -2538,17 +2538,17 @@ nsresult nsParseNewMailState::MoveIncorp
   PRUint32 messageLength;
   mailHdr->GetMessageSize(&messageLength);
   rv = AppendMsgFromStream(inputStream, newHdr, messageLength,
                            destIFolder);
 
   if (NS_FAILED(rv))
   {
     if (destMailDB)
-      destMailDB->Close(PR_TRUE);
+      destMailDB->Close(true);
 
     if (destIFolder)
     {
       destIFolder->ReleaseSemaphore(myISupports);
       destIFolder->ThrowAlertMsg("filterFolderWriteFailed", msgWindow);
     }
     return NS_MSG_ERROR_WRITING_MAIL_FOLDER;
   }
@@ -2565,44 +2565,44 @@ nsresult nsParseNewMailState::MoveIncorp
     if (! (newFlags & nsMsgMessageFlags::Read))
     {
       nsCString junkScoreStr;
       (void) newHdr->GetStringProperty("junkscore", getter_Copies(junkScoreStr));
       if (atoi(junkScoreStr.get()) == nsIJunkMailPlugin::IS_HAM_SCORE)
       {
         newHdr->OrFlags(nsMsgMessageFlags::New, &newFlags);
         destMailDB->AddToNewList(msgKey);
-        movedMsgIsNew = PR_TRUE;
+        movedMsgIsNew = true;
       }
     }
     nsCOMPtr<nsIMsgFolderNotificationService> notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
     if (notifier)
       notifier->NotifyMsgAdded(newHdr);
     // mark the header as not yet reported classified
     destIFolder->OrProcessingFlags(
     msgKey, nsMsgProcessingFlags::NotReportedClassified);
     m_msgToForwardOrReply = newHdr;
   }
   if (movedMsgIsNew)
-    destIFolder->SetHasNewMessages(PR_TRUE);
+    destIFolder->SetHasNewMessages(true);
   if (m_filterTargetFolders.IndexOf(destIFolder) == -1)
     m_filterTargetFolders.AppendObject(destIFolder);
 
   if (destIFolder)
     destIFolder->ReleaseSemaphore (myISupports);
 
 
   (void) localFolder->RefreshSizeOnDisk();
   if (destIFolder)
     destIFolder->SetFlag(nsMsgFolderFlags::GotNew);
 
   if (destMailDB)
   {
     // update the folder size so we won't reparse.
     UpdateDBFolderInfo(destMailDB);
     if (destIFolder != nsnull)
-      destIFolder->UpdateSummaryTotals(PR_TRUE);
+      destIFolder->UpdateSummaryTotals(true);
 
     destMailDB->Commit(nsMsgDBCommitType::kLargeCommit);
   }
   return rv;
 }
 
--- a/mailnews/local/src/nsParseMailbox.h
+++ b/mailnews/local/src/nsParseMailbox.h
@@ -241,17 +241,17 @@ public:
   NS_IMETHOD FinishHeader();
 
   nsresult Init(nsIMsgFolder *rootFolder, nsIMsgFolder *downloadFolder,
                 nsIMsgWindow *aMsgWindow, nsIMsgDBHdr *aHdr,
                 nsIOutputStream *aOutputStream);
 
   virtual void  DoneParsingFolder(nsresult status);
 
-  void DisableFilters() {m_disableFilters = PR_TRUE;}
+  void DisableFilters() {m_disableFilters = true;}
 
   NS_DECL_NSIMSGFILTERHITNOTIFY
 
   nsOutputFileStream *GetLogFile();
   virtual PRInt32 PublishMsgHeader(nsIMsgWindow *msgWindow);
   void            GetMsgWindow(nsIMsgWindow **aMsgWindow);
   nsresult EndMsgDownload();
 
--- a/mailnews/local/src/nsPop3IncomingServer.cpp
+++ b/mailnews/local/src/nsPop3IncomingServer.cpp
@@ -90,18 +90,18 @@ nsPop3IncomingServer::nsPop3IncomingServ
   m_capabilityFlags =
   POP3_AUTH_MECH_UNDEFINED |
   POP3_HAS_AUTH_USER |               // should be always there
   POP3_GURL_UNDEFINED |
   POP3_UIDL_UNDEFINED |
   POP3_TOP_UNDEFINED |
   POP3_XTND_XLST_UNDEFINED;
 
-  m_canHaveFilters = PR_TRUE;
-  m_authenticated = PR_FALSE;
+  m_canHaveFilters = true;
+  m_authenticated = false;
 }
 
 nsPop3IncomingServer::~nsPop3IncomingServer()
 {
 }
 
 NS_IMPL_SERVERPREF_BOOL(nsPop3IncomingServer,
                         LeaveMessagesOnServer,
@@ -206,18 +206,18 @@ NS_IMETHODIMP nsPop3IncomingServer::GetD
                   {
                     // Look for a folder with the same name in Local Folders.
                     nsCOMPtr<nsIMsgFolder> dest;
                     nsString folderName;
                     subFolder->GetName(folderName);
                     localFoldersRoot->GetChildNamed(folderName,
                                                     getter_AddRefs(dest));
                     if (dest)
-                      dest->CopyMessages(subFolder, hdrsToCopy, PR_FALSE,
-                                         nsnull, nsnull, PR_FALSE,PR_FALSE);
+                      dest->CopyMessages(subFolder, hdrsToCopy, false,
+                                         nsnull, nsnull, false,false);
                     // Should we copy the folder if the dest doesn't exist?
                   }
                 }
               }
             }
           }
         }
       }
@@ -385,17 +385,17 @@ nsresult nsPop3IncomingServer::GetInbox(
   nsCOMPtr<nsIMsgLocalMailFolder> localInbox = do_QueryInterface(*inbox, &rv);
   if (NS_SUCCEEDED(rv) && localInbox)
   {
     nsCOMPtr <nsIMsgDatabase> db;
     rv = (*inbox)->GetMsgDatabase(getter_AddRefs(db));
     if (NS_FAILED(rv))
     {
       (*inbox)->SetMsgDatabase(nsnull);
-      (void) localInbox->SetCheckForNewMessagesAfterParsing(PR_TRUE);
+      (void) localInbox->SetCheckForNewMessagesAfterParsing(true);
       // this will cause a reparse of the mail folder.
       localInbox->GetDatabaseWithReparse(nsnull, msgWindow, getter_AddRefs(db));
       rv = NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE;
     }
   }
   return rv;
 }
 
@@ -414,17 +414,17 @@ NS_IMETHODIMP nsPop3IncomingServer::Perf
   rootMsgFolder->GetFolderWithFlags(nsMsgFolderFlags::Inbox,
                                     getter_AddRefs(inbox));
   if (!inbox)
     return NS_ERROR_FAILURE;
 
   nsCOMPtr <nsIMsgIncomingServer> server;
   inbox->GetServer(getter_AddRefs(server));
 
-  server->SetPerformingBiff(PR_TRUE);
+  server->SetPerformingBiff(true);
 
   urlListener = do_QueryInterface(inbox);
 
   bool downloadOnBiff = false;
   rv = GetDownloadOnBiff(&downloadOnBiff);
   if (downloadOnBiff)
   {
     nsCOMPtr <nsIMsgLocalMailFolder> localInbox = do_QueryInterface(inbox, &rv);
@@ -439,17 +439,17 @@ NS_IMETHODIMP nsPop3IncomingServer::Perf
         rv = pop3Service->GetNewMail(aMsgWindow, urlListener, inbox, this, nsnull);
       else
       {
         bool isLocked;
         inbox->GetLocked(&isLocked);
         if (!isLocked)
           rv = localInbox->GetDatabaseWithReparse(urlListener, aMsgWindow, getter_AddRefs(db));
         if (NS_SUCCEEDED(rv))
-          rv = localInbox->SetCheckForNewMessagesAfterParsing(PR_TRUE);
+          rv = localInbox->SetCheckForNewMessagesAfterParsing(true);
       }
     }
   }
   else
     rv = pop3Service->CheckForNewMail(aMsgWindow, urlListener, inbox, this, nsnull);
   return NS_OK;
 }
 
@@ -585,25 +585,25 @@ nsPop3IncomingServer::GetNewMessages(nsI
 }
 
 NS_IMETHODIMP
 nsPop3IncomingServer::GetDownloadMessagesAtStartup(bool *getMessagesAtStartup)
 {
   NS_ENSURE_ARG_POINTER(getMessagesAtStartup);
   // GetMessages is not automatically done for pop servers at startup.
   // We need to trigger that action. Return true.
-  *getMessagesAtStartup = PR_TRUE;
+  *getMessagesAtStartup = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPop3IncomingServer::GetCanBeDefaultServer(bool *canBeDefaultServer)
 {
   NS_ENSURE_ARG_POINTER(canBeDefaultServer);
-  *canBeDefaultServer = PR_TRUE;
+  *canBeDefaultServer = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPop3IncomingServer::GetCanSearchMessages(bool *canSearchMessages)
 {
   // this will return false if this server is deferred, which is what we want.
   return GetCanFileMessagesOnServer(canSearchMessages);
--- a/mailnews/local/src/nsPop3Protocol.cpp
+++ b/mailnews/local/src/nsPop3Protocol.cpp
@@ -290,17 +290,17 @@ net_pop3_load_state(const char* searchho
           char flag = flags->CharAt(0);
           if ((flag == KEEP) || (flag == DELETE_CHAR) ||
             (flag == TOO_BIG) || (flag == FETCH_BODY))
           {
             put_hash(current->hash, uidl->get(), flag, dateReceived);
           }
           else
           {
-            NS_ASSERTION(PR_FALSE, "invalid flag in popstate.dat");
+            NS_ASSERTION(false, "invalid flag in popstate.dat");
           }
         }
       }
     }
   }
   fileStream->Close();
 
   return result;
@@ -428,17 +428,17 @@ void nsPop3Protocol::MarkMsgInHashTable(
   if (uidlE->uidl)
   {
     Pop3UidlEntry *uidlEntry = (Pop3UidlEntry *) PL_HashTableLookup(hashTable, uidlE->uidl);
     if (uidlEntry)
     {
       if (uidlEntry->status != uidlE->status)
       {
         uidlEntry->status = uidlE->status;
-        *changed = PR_TRUE;
+        *changed = true;
       }
     }
   }
 }
 
 /* static */
 nsresult
 nsPop3Protocol::MarkMsgForHost(const char *hostName, const char *userName,
@@ -502,23 +502,23 @@ nsresult nsPop3Protocol::Initialize(nsIU
   if(!m_pop3ConData)
     return NS_ERROR_OUT_OF_MEMORY;
 
   m_totalBytesReceived = 0;
   m_bytesInMsgReceived = 0;
   m_totalFolderSize = 0;
   m_totalDownloadSize = 0;
   m_totalBytesReceived = 0;
-  m_tlsEnabled = PR_FALSE;
+  m_tlsEnabled = false;
   m_socketType = nsMsgSocketType::trySTARTTLS;
   m_prefAuthMethods = POP3_AUTH_MECH_UNDEFINED;
   m_failedAuthMethods = 0;
-  m_password_already_sent = PR_FALSE;
+  m_password_already_sent = false;
   m_currentAuthMethod = POP3_AUTH_MECH_UNDEFINED;
-  m_needToRerunUrl = PR_FALSE;
+  m_needToRerunUrl = false;
 
   if (aURL)
   {
     // extract out message feedback if there is any.
     nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(aURL);
     if (mailnewsUrl)
     {
       nsCOMPtr<nsIMsgIncomingServer> server;
@@ -591,17 +591,17 @@ nsresult nsPop3Protocol::Initialize(nsIU
       m_socketType = nsMsgSocketType::plain;
       rv = OpenNetworkSocketWithInfo(hostName.get(), port, nsnull, proxyInfo, ir);
     }
 
     if(NS_FAILED(rv))
       return rv;
   } // if we got a url...
 
-  m_lineStreamBuffer = new nsMsgLineStreamBuffer(OUTPUT_BUFFER_SIZE, PR_TRUE);
+  m_lineStreamBuffer = new nsMsgLineStreamBuffer(OUTPUT_BUFFER_SIZE, true);
   if(!m_lineStreamBuffer)
     return NS_ERROR_OUT_OF_MEMORY;
 
   nsCOMPtr<nsIStringBundleService> bundleService(do_GetService("@mozilla.org/intl/stringbundle;1", &rv));
   NS_ENSURE_SUCCESS(rv, rv);
   return bundleService->CreateBundle("chrome://messenger/locale/localMsgs.properties", getter_AddRefs(mLocalBundle));
 }
 
@@ -773,33 +773,33 @@ nsresult nsPop3Protocol::StartGetAsyncPa
     do_GetService(NS_MSGASYNCPROMPTER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   m_pop3ConData->next_state = aNextState;
 
   // Although we're not actually pausing for a read, we'll do so anyway to let
   // the async prompt run. Once it is our turn again we'll call back into
   // ProcessProtocolState.
-  m_pop3ConData->pause_for_read = PR_TRUE;
+  m_pop3ConData->pause_for_read = true;
 
   nsCString server("unknown");
   m_url->GetPrePath(server);
 
-  rv = asyncPrompter->QueueAsyncAuthPrompt(server, PR_FALSE, this);
+  rv = asyncPrompter->QueueAsyncAuthPrompt(server, false, this);
   // Explict NS_ENSURE_SUCCESS for debug purposes as errors tend to get
   // hidden.
   NS_ENSURE_SUCCESS(rv, rv);
   return rv;
 }
 
 NS_IMETHODIMP nsPop3Protocol::OnPromptStart(bool *aResult)
 {
   PR_LOG(POP3LOGMODULE, PR_LOG_MAX, ("OnPromptStart()"));
 
-  *aResult = PR_FALSE;
+  *aResult = false;
 
   nsresult rv;
   nsCOMPtr<nsIMsgIncomingServer> server = do_QueryInterface(m_pop3Server, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCAutoString passwordResult;
 
   // pass the failed password into the password prompt so that
@@ -930,23 +930,23 @@ NS_IMETHODIMP nsPop3Protocol::OnPromptSt
 
   // If it failed or the user cancelled the prompt, just abort the
   // connection.
   if (NS_FAILED(rv) ||
       rv == NS_MSG_PASSWORD_PROMPT_CANCELLED)
   {
     m_pop3ConData->next_state = POP3_ERROR_DONE;
     m_passwordResult.Truncate();
-    *aResult = PR_FALSE;
+    *aResult = false;
   }
   else
   {
     m_passwordResult = passwordResult;
     m_pop3ConData->next_state = GetNextPasswordObtainState();
-    *aResult = PR_TRUE;
+    *aResult = true;
   }
   // Because this was done asynchronously, now call back into
   // ProcessProtocolState to get the protocol going again.
   ProcessProtocolState(nsnull, nsnull, 0, 0);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsPop3Protocol::OnPromptAuthAvailable()
@@ -983,18 +983,18 @@ NS_IMETHODIMP nsPop3Protocol::OnStopRequ
     // If we got the auth error, the next state would be
     // POP3_OBTAIN_PASSWORD_EARLY.
     if ((m_pop3ConData->next_state_after_response == POP3_NEXT_AUTH_STEP ||
          m_pop3ConData->next_state_after_response == POP3_AUTH_LOGIN_RESPONSE) &&
         m_pop3ConData->next_state != POP3_OBTAIN_PASSWORD_EARLY)
     {
       PR_LOG(POP3LOGMODULE, PR_LOG_MAX, ("dropped connection before auth error"));
       SetFlag(POP3_AUTH_FAILURE);
-      m_pop3ConData->command_succeeded = PR_FALSE;
-      m_needToRerunUrl = PR_TRUE;
+      m_pop3ConData->command_succeeded = false;
+      m_needToRerunUrl = true;
       m_pop3ConData->next_state = POP3_NEXT_AUTH_STEP;
       ProcessProtocolState(nsnull, nsnull, 0, 0);
     }
     // We can't call nsMsgProtocol::OnStopRequest because it calls SetUrlState,
     // which notifies the URLListeners, but we need to do a bit of cleanup
     // before running the url again.
     CloseSocket();
     if (m_loadGroup)
@@ -1005,20 +1005,20 @@ NS_IMETHODIMP nsPop3Protocol::OnStopRequ
   }
   nsresult rv = nsMsgProtocol::OnStopRequest(aRequest, aContext, aStatus);
 
   // turn off the server busy flag on stop request - we know we're done, right?
   nsCOMPtr<nsIMsgIncomingServer> server = do_QueryInterface(m_pop3Server);
   if (server)
   {
     PR_LOG(POP3LOGMODULE, PR_LOG_MAX, ("Clearing server busy in OnStopRequest"));
-    server->SetServerBusy(PR_FALSE); // the server is not busy
+    server->SetServerBusy(false); // the server is not busy
   }
   if(m_pop3ConData->list_done)
-    CommitState(PR_TRUE);
+    CommitState(true);
   if (NS_FAILED(aStatus) && aStatus != NS_BINDING_ABORTED)
     Abort();
   return rv;
 }
 
 void nsPop3Protocol::Abort()
 {
   if(m_pop3ConData->msg_closure)
@@ -1107,17 +1107,17 @@ nsresult nsPop3Protocol::LoadUrl(nsIURI*
   nsCString userName;
 
   nsCOMPtr<nsIMsgIncomingServer> server = do_QueryInterface(m_pop3Server);
   if (server)
   {
     rv = server->GetLocalPath(getter_AddRefs(mailDirectory));
     NS_ENSURE_SUCCESS(rv, rv);
     PR_LOG(POP3LOGMODULE, PR_LOG_MAX, ("Setting server busy in nsPop3Protocol::LoadUrl"));
-    server->SetServerBusy(PR_TRUE); // the server is now busy
+    server->SetServerBusy(true); // the server is now busy
     server->GetHostName(hostName);
     server->GetUsername(userName);
   }
 
   if (!m_pop3ConData->verify_logon)
     m_pop3ConData->uidlinfo = net_pop3_load_state(hostName.get(), userName.get(), mailDirectory);
 
   m_pop3ConData->biffstate = nsIMsgFolder::nsMsgBiffState_NoMail;
@@ -1134,17 +1134,17 @@ nsresult nsPop3Protocol::LoadUrl(nsIURI*
 
   if (uidl)
   {
     uidl += 5;
     nsCString unescapedData;
     MsgUnescapeString(nsDependentCString(uidl), 0, unescapedData);
     m_pop3ConData->only_uidl = PL_strdup(unescapedData.get());
 
-    mSuppressListenerNotifications = PR_TRUE; // suppress on start and on stop because this url won't have any content to display
+    mSuppressListenerNotifications = true; // suppress on start and on stop because this url won't have any content to display
   }
 
   m_pop3ConData->next_state = POP3_START_CONNECT;
   m_pop3ConData->next_state_after_response = POP3_FINISH_CONNECT;
   if (NS_SUCCEEDED(rv))
   {
     m_pop3Server->SetRunningProtocol(this);
     return nsMsgProtocol::LoadUrl(aURL);
@@ -1181,24 +1181,24 @@ nsPop3Protocol::WaitForStartOfConnection
   line = m_lineStreamBuffer->ReadNextLine(aInputStream, line_length, pauseForMoreData, &rv);
 
   PR_LOG(POP3LOGMODULE, PR_LOG_ALWAYS,("RECV: %s", line));
   if (NS_FAILED(rv))
     return -1;
 
   if(pauseForMoreData || !line)
   {
-    m_pop3ConData->pause_for_read = PR_TRUE; /* pause */
+    m_pop3ConData->pause_for_read = true; /* pause */
     PR_Free(line);
     return(line_length);
   }
 
   if(*line == '+')
   {
-    m_pop3ConData->command_succeeded = PR_TRUE;
+    m_pop3ConData->command_succeeded = true;
     if(PL_strlen(line) > 4)
       m_commandResponse = line + 4;
     else
       m_commandResponse = line;
 
     if (m_prefAuthMethods & POP3_HAS_AUTH_APOP)
     {
         nsresult rv;
@@ -1211,17 +1211,17 @@ nsPop3Protocol::WaitForStartOfConnection
         }
     }
     else
       ClearCapFlag(POP3_HAS_AUTH_APOP);
 
     m_pop3Server->SetPop3CapabilityFlags(m_pop3ConData->capability_flags);
 
     m_pop3ConData->next_state = POP3_PROCESS_AUTH;
-    m_pop3ConData->pause_for_read = PR_FALSE; /* don't pause */
+    m_pop3ConData->pause_for_read = false; /* don't pause */
   }
 
   PR_Free(line);
   return(1);  /* everything ok */
 }
 
 PRInt32
 nsPop3Protocol::WaitForResponse(nsIInputStream* inputStream, PRUint32 length)
@@ -1231,70 +1231,70 @@ nsPop3Protocol::WaitForResponse(nsIInput
   bool pauseForMoreData = false;
   nsresult rv;
   line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData, &rv);
   if (NS_FAILED(rv))
     return -1;
 
   if(pauseForMoreData || !line)
   {
-    m_pop3ConData->pause_for_read = PR_TRUE; /* pause */
+    m_pop3ConData->pause_for_read = true; /* pause */
 
     PR_Free(line);
     return(ln);
   }
 
   PR_LOG(POP3LOGMODULE, PR_LOG_ALWAYS,("RECV: %s", line));
 
   if(*line == '+')
   {
-    m_pop3ConData->command_succeeded = PR_TRUE;
+    m_pop3ConData->command_succeeded = true;
     if(PL_strlen(line) > 4)
     {
       if(!PL_strncasecmp(line, "+OK", 3))
         m_commandResponse = line + 4;
       else  // challenge answer to AUTH CRAM-MD5 and LOGIN username/password
         m_commandResponse = line + 2;
     }
     else
       m_commandResponse = line;
   }
   else
   {
-    m_pop3ConData->command_succeeded = PR_FALSE;
+    m_pop3ConData->command_succeeded = false;
     if(PL_strlen(line) > 5)
       m_commandResponse = line + 5;
     else
       m_commandResponse  = line;
 
     // search for the response codes (RFC 2449, chapter 8 and RFC 3206)
     if(TestCapFlag(POP3_HAS_RESP_CODES | POP3_HAS_AUTH_RESP_CODE))
     {
         // code for authentication failure due to the user's credentials
-        if(m_commandResponse.Find("[AUTH", PR_TRUE) >= 0)
+        if(m_commandResponse.Find("[AUTH", true) >= 0)
         {
           PR_LOG(POP3LOGMODULE, PR_LOG_DEBUG, ("setting auth failure"));
           SetFlag(POP3_AUTH_FAILURE);
         }
 
         // codes for failures due to other reasons
-        if(m_commandResponse.Find("[LOGIN-DELAY", PR_TRUE) >= 0 ||
-           m_commandResponse.Find("[IN-USE", PR_TRUE) >= 0 ||
-           m_commandResponse.Find("[SYS", PR_TRUE) >= 0)
+        if(m_commandResponse.Find("[LOGIN-DELAY", true) >= 0 ||
+           m_commandResponse.Find("[IN-USE", true) >= 0 ||
+           m_commandResponse.Find("[SYS", true) >= 0)
       SetFlag(POP3_STOPLOGIN);
 
       // remove the codes from the response string presented to the user
       PRInt32 i = m_commandResponse.FindChar(']');
       if(i >= 0)
         m_commandResponse.Cut(0, i + 2);
     }
   }
 
   m_pop3ConData->next_state = m_pop3ConData->next_state_after_response;
-  m_pop3ConData->pause_for_read = PR_FALSE; /* don't pause */
+  m_pop3ConData->pause_for_read = false; /* don't pause */
 
   PR_Free(line);
   return(1);  /* everything ok */
 }
 
 PRInt32
 nsPop3Protocol::Error(PRInt32 err_code)
 {
@@ -1341,17 +1341,17 @@ nsPop3Protocol::Error(PRInt32 err_code)
                 message.AppendLiteral(" ");
                 message.Append(NS_ConvertASCIItoUTF16(m_commandResponse));
                 dialog->Alert(nsnull,message.get());
               }
             }
         }
     }
     m_pop3ConData->next_state = POP3_ERROR_DONE;
-    m_pop3ConData->pause_for_read = PR_FALSE;
+    m_pop3ConData->pause_for_read = false;
     return -1;
 }
 
 PRInt32 nsPop3Protocol::SendData(nsIURI * aURL, const char * dataBuffer, bool aSuppressLogging)
 {
   // remove any leftover bytes in the line buffer
   // this can happen if the last message line doesn't end with a (CR)LF
   // or a server sent two reply lines
@@ -1361,17 +1361,17 @@ PRInt32 nsPop3Protocol::SendData(nsIURI 
 
   if (!aSuppressLogging)
       PR_LOG(POP3LOGMODULE, PR_LOG_ALWAYS, ("SEND: %s", dataBuffer));
   else
       PR_LOG(POP3LOGMODULE, PR_LOG_ALWAYS, ("Logging suppressed for this command (it probably contained authentication information)"));
 
   if (result >= 0) // yeah this sucks...i need an error code....
   {
-    m_pop3ConData->pause_for_read = PR_TRUE;
+    m_pop3ConData->pause_for_read = true;
     m_pop3ConData->next_state = POP3_WAIT_FOR_RESPONSE;
   }
   else
   {
     m_pop3ConData->next_state = POP3_ERROR_DONE;
     PR_LOG(POP3LOGMODULE, PR_LOG_ALWAYS, ("SendData faild: %lx", result));
   }
 
@@ -1406,43 +1406,43 @@ PRInt32 nsPop3Protocol::AuthResponse(nsI
         m_pop3Server->SetPop3CapabilityFlags(m_pop3ConData->capability_flags);
     }
 
     if (!m_pop3ConData->command_succeeded)
     {
         /* AUTH command not implemented
          * so no secure mechanisms available
          */
-        m_pop3ConData->command_succeeded = PR_TRUE;
+        m_pop3ConData->command_succeeded = true;
         m_pop3Server->SetPop3CapabilityFlags(m_pop3ConData->capability_flags);
         m_pop3ConData->next_state = POP3_SEND_CAPA;
         return 0;
     }
 
     bool pauseForMoreData = false;
     line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData, &rv);
     if (NS_FAILED(rv))
       return -1;
 
     if(pauseForMoreData || !line)
     {
-        m_pop3ConData->pause_for_read = PR_TRUE; /* pause */
+        m_pop3ConData->pause_for_read = true; /* pause */
         PR_Free(line);
         return(0);
     }
 
     PR_LOG(POP3LOGMODULE, PR_LOG_ALWAYS,("RECV: %s", line));
 
     if (!PL_strcmp(line, "."))
     {
         m_pop3Server->SetPop3CapabilityFlags(m_pop3ConData->capability_flags);
 
         // now that we've read all the AUTH responses, go for it
         m_pop3ConData->next_state = POP3_SEND_CAPA;
-        m_pop3ConData->pause_for_read = PR_FALSE; /* don't pause */
+        m_pop3ConData->pause_for_read = false; /* don't pause */
     }
     else if (!PL_strcasecmp (line, "CRAM-MD5"))
     {
         nsCOMPtr<nsISignatureVerifier> verifier = do_GetService(SIGNATURE_VERIFIER_CONTRACTID, &rv);
         // this checks if psm is installed...
         if (NS_SUCCEEDED(rv))
             SetCapFlag(POP3_HAS_AUTH_CRAM_MD5);
     }
@@ -1491,42 +1491,42 @@ PRInt32 nsPop3Protocol::CapaResponse(nsI
                              PRUint32 length)
 {
     char * line;
     PRUint32 ln = 0;
 
     if (!m_pop3ConData->command_succeeded)
     {
         /* CAPA command not implemented */
-        m_pop3ConData->command_succeeded = PR_TRUE;
+        m_pop3ConData->command_succeeded = true;
         m_pop3Server->SetPop3CapabilityFlags(m_pop3ConData->capability_flags);
         m_pop3ConData->next_state = POP3_PROCESS_AUTH;
         return 0;
     }
 
     bool pauseForMoreData = false;
     nsresult rv;
     line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData, &rv);
     if (NS_FAILED(rv))
       return -1;
 
     if(pauseForMoreData || !line)
     {
-        m_pop3ConData->pause_for_read = PR_TRUE; /* pause */
+        m_pop3ConData->pause_for_read = true; /* pause */
         PR_Free(line);
         return(0);
     }
 
     PR_LOG(POP3LOGMODULE, PR_LOG_ALWAYS,("RECV: %s", line));
 
     if (!PL_strcmp(line, "."))
     {
         // now that we've read all the CAPA responses, go for it
         m_pop3ConData->next_state = POP3_PROCESS_AUTH;
-        m_pop3ConData->pause_for_read = PR_FALSE; /* don't pause */
+        m_pop3ConData->pause_for_read = false; /* don't pause */
     }
     else
     if (!PL_strcasecmp(line, "XSENDER"))
     {
         SetCapFlag(POP3_HAS_XSENDER);
         m_pop3Server->SetPop3CapabilityFlags(m_pop3ConData->capability_flags);
     }
     else
@@ -1614,17 +1614,17 @@ PRInt32 nsPop3Protocol::SendTLSResponse(
 
           if (NS_SUCCEEDED(rv) && sslControl)
               rv = sslControl->StartTLS();
       }
 
     if (NS_SUCCEEDED(rv))
     {
       m_pop3ConData->next_state = POP3_SEND_AUTH;
-      m_tlsEnabled = PR_TRUE;
+      m_tlsEnabled = true;
 
       // certain capabilities like POP3_HAS_AUTH_APOP should be
       // preserved across the connections.
       PRUint32 preservedCapFlags = m_pop3ConData->capability_flags & POP3_HAS_AUTH_APOP;
       m_pop3ConData->capability_flags =     // resetting the flags
         POP3_AUTH_MECH_UNDEFINED |
         POP3_HAS_AUTH_USER |                // should be always there
         POP3_GURL_UNDEFINED |
@@ -1781,17 +1781,17 @@ PRInt32 nsPop3Protocol::ProcessAuth()
       }
       else if (m_socketType == nsMsgSocketType::alwaysSTARTTLS)
       {
           m_pop3ConData->next_state = POP3_ERROR_DONE;
           return(Error(NS_ERROR_COULD_NOT_CONNECT_VIA_TLS));
       }
     }
 
-    m_password_already_sent = PR_FALSE;
+    m_password_already_sent = false;
 
     nsresult rv = ChooseAuthMethod();
     if (NS_FAILED(rv))
     {
       // Pref doesn't match server. Now, find an appropriate error msg.
       PR_LOG(POP3LOGMODULE, PR_LOG_DEBUG,
            ("ProcessAuth() early exit because no auth methods"));
 
@@ -1859,17 +1859,17 @@ PRInt32 nsPop3Protocol::ProcessAuth()
         m_pop3ConData->next_state = POP3_NEXT_AUTH_STEP;
         break;
       default:
         PR_LOG(POP3LOGMODULE, PR_LOG_ERROR,
              ("POP: m_currentAuthMethod has unknown value"));
         return Error(POP3_AUTH_MECH_NOT_SUPPORTED);
     }
 
-    m_pop3ConData->pause_for_read = PR_FALSE;
+    m_pop3ConData->pause_for_read = false;
 
     return 0;
 }
 
 /**
  * state POP3_NEXT_AUTH_STEP
  * This is called when we finished one auth step (e.g. sending username
  * or password are separate steps, similarly for AUTH LOGIN, NTLM etc.)
@@ -1879,17 +1879,17 @@ PRInt32 nsPop3Protocol::NextAuthStep()
 {
     PR_LOG(POP3LOGMODULE, PR_LOG_MAX, ("NextAuthStep()"));
     if (m_pop3ConData->command_succeeded)
     {
         if (m_password_already_sent || // (also true for GSSAPI)
             m_currentAuthMethod == POP3_HAS_AUTH_NONE)
         {
             PR_LOG(POP3LOGMODULE, PR_LOG_DEBUG, ("login succeeded"));
-            m_nsIPop3Sink->SetUserAuthenticated(PR_TRUE);
+            m_nsIPop3Sink->SetUserAuthenticated(true);
             ClearFlag(POP3_PASSWORD_FAILED);
             if (m_pop3ConData->verify_logon)
               m_pop3ConData->next_state = POP3_SEND_QUIT;
             else
               m_pop3ConData->next_state = (m_pop3ConData->get_url)
                                           ? POP3_SEND_GURL : POP3_SEND_STAT;
         }
         else
@@ -1954,40 +1954,40 @@ PRInt32 nsPop3Protocol::NextAuthStep()
             return 0;
         }
         PR_LOG(POP3LOGMODULE, PR_LOG_DEBUG,
            ("still have some auth methods to try"));
 
         // TODO needed?
         //m_pop3Server->SetPop3CapabilityFlags(m_pop3ConData->capability_flags);
 
-        m_pop3ConData->command_succeeded = PR_TRUE;
+        m_pop3ConData->command_succeeded = true;
 
         m_pop3ConData->next_state = POP3_PROCESS_AUTH;
     }
 
     if (TestCapFlag(POP3_AUTH_MECH_UNDEFINED))
     {
         ClearCapFlag(POP3_AUTH_MECH_UNDEFINED);
         m_pop3Server->SetPop3CapabilityFlags(m_pop3ConData->capability_flags);
     }
 
-    m_pop3ConData->pause_for_read = PR_FALSE;
+    m_pop3ConData->pause_for_read = false;
 
     return 0;
 }
 
 // LOGIN consists of three steps not two as USER/PASS or CRAM-MD5,
 // so we've to start here and continue in SendUsername if the server
 // responds + to "AUTH LOGIN"
 PRInt32 nsPop3Protocol::AuthLogin()
 {
     nsCAutoString command("AUTH LOGIN" CRLF);
     m_pop3ConData->next_state_after_response = POP3_AUTH_LOGIN_RESPONSE;
-    m_pop3ConData->pause_for_read = PR_TRUE;
+    m_pop3ConData->pause_for_read = true;
 
     return SendData(m_url, command.get());
 }
 
 PRInt32 nsPop3Protocol::AuthLoginResponse()
 {
     // need the test to be here instead in NextAuthStep() to
     // differentiate between command AUTH LOGIN failed and
@@ -1996,30 +1996,30 @@ PRInt32 nsPop3Protocol::AuthLoginRespons
     {
         // we failed with LOGIN, remove it
         MarkAuthMethodAsFailed(POP3_HAS_AUTH_LOGIN);
         m_pop3ConData->next_state = POP3_PROCESS_AUTH;
     }
     else
         m_pop3ConData->next_state = POP3_SEND_USERNAME;
 
-    m_pop3ConData->pause_for_read = PR_FALSE;
+    m_pop3ConData->pause_for_read = false;
 
     return 0;
 }
 
 // NTLM, like LOGIN consists of three steps not two as USER/PASS or CRAM-MD5,
 // so we've to start here and continue in SendUsername if the server
 // responds + to "AUTH NTLM"
 PRInt32 nsPop3Protocol::AuthNtlm()
 {
     nsCAutoString command (m_currentAuthMethod == POP3_HAS_AUTH_MSN
           ? "AUTH MSN" CRLF : "AUTH NTLM" CRLF);
     m_pop3ConData->next_state_after_response = POP3_AUTH_NTLM_RESPONSE;
-    m_pop3ConData->pause_for_read = PR_TRUE;
+    m_pop3ConData->pause_for_read = true;
 
     return SendData(m_url, command.get());
 }
 
 PRInt32 nsPop3Protocol::AuthNtlmResponse()
 {
     // need the test to be here instead in NextAuthStep() to
     // differentiate between command AUTH NTLM failed and
@@ -2028,17 +2028,17 @@ PRInt32 nsPop3Protocol::AuthNtlmResponse
     {
         MarkAuthMethodAsFailed(POP3_HAS_AUTH_NTLM);
         MarkAuthMethodAsFailed(POP3_HAS_AUTH_MSN);
         m_pop3ConData->next_state = POP3_PROCESS_AUTH;
     }
     else
         m_pop3ConData->next_state = POP3_SEND_USERNAME;
 
-    m_pop3ConData->pause_for_read = PR_FALSE;
+    m_pop3ConData->pause_for_read = false;
 
     return 0;
 }
 
 PRInt32 nsPop3Protocol::AuthGSSAPI()
 {
     PR_LOG(POP3LOGMODULE, PR_LOG_DEBUG, ("AuthGSSAPI()"));
     nsCOMPtr<nsIMsgIncomingServer> server = do_QueryInterface(m_pop3Server);
@@ -2048,58 +2048,58 @@ PRInt32 nsPop3Protocol::AuthGSSAPI()
         nsCString hostName;
         nsresult rv;
         server->GetRealHostName(hostName);
         service.Append(hostName);
         rv = DoGSSAPIStep1(service.get(), m_username.get(), cmd);
         if (NS_SUCCEEDED(rv)) {
             m_GSSAPICache.Assign(cmd);
             m_pop3ConData->next_state_after_response = POP3_AUTH_GSSAPI_FIRST;
-            m_pop3ConData->pause_for_read = PR_TRUE;
+            m_pop3ConData->pause_for_read = true;
             return SendData(m_url, "AUTH GSSAPI" CRLF);
         }
     }
 
     MarkAuthMethodAsFailed(POP3_HAS_AUTH_GSSAPI);
     m_pop3ConData->next_state = POP3_PROCESS_AUTH;
-    m_pop3ConData->pause_for_read = PR_FALSE;
+    m_pop3ConData->pause_for_read = false;
     return NS_OK;
 }
 
 PRInt32 nsPop3Protocol::AuthGSSAPIResponse(bool first)
 {
     if (!m_pop3ConData->command_succeeded)
     {
         if (first)
             m_GSSAPICache.Truncate();
         MarkAuthMethodAsFailed(POP3_HAS_AUTH_GSSAPI);
         m_pop3ConData->next_state = POP3_PROCESS_AUTH;
-        m_pop3ConData->pause_for_read = PR_FALSE;
+        m_pop3ConData->pause_for_read = false;
         return NS_OK;
     }
 
     nsresult rv;
 
     m_pop3ConData->next_state_after_response = POP3_AUTH_GSSAPI_STEP;
-    m_pop3ConData->pause_for_read = PR_TRUE;
+    m_pop3ConData->pause_for_read = true;
 
     if (first) {
         m_GSSAPICache += CRLF;
         rv = SendData(m_url, m_GSSAPICache.get());
         m_GSSAPICache.Truncate();
     }
     else {
         nsCAutoString cmd;
         PR_LOG(POP3LOGMODULE, PR_LOG_DEBUG, ("GSSAPI step 2"));
         rv = DoGSSAPIStep2(m_commandResponse, cmd);
         if (NS_FAILED(rv))
             cmd = "*";
         if (rv == NS_SUCCESS_AUTH_FINISHED) {
             m_pop3ConData->next_state_after_response = POP3_NEXT_AUTH_STEP;
-            m_password_already_sent = PR_TRUE;
+            m_password_already_sent = true;
         }
         cmd += CRLF;
         rv = SendData(m_url, cmd.get());
     }
 
     return rv;
 }
 
@@ -2149,17 +2149,17 @@ PRInt32 nsPop3Protocol::SendUsername()
           "but that is unexpected", m_currentAuthMethod));
       return Error(POP3_AUTH_INTERNAL_ERROR);
     }
 
     cmd += CRLF;
 
     m_pop3ConData->next_state_after_response = POP3_NEXT_AUTH_STEP;
 
-    m_pop3ConData->pause_for_read = PR_TRUE;
+    m_pop3ConData->pause_for_read = true;
 
     return SendData(m_url, cmd.get());
 }
 
 PRInt32 nsPop3Protocol::SendPassword()
 {
   PR_LOG(POP3LOGMODULE, PR_LOG_MAX, ("SendPassword()"));
   if (m_username.IsEmpty())
@@ -2256,17 +2256,17 @@ PRInt32 nsPop3Protocol::SendPassword()
     {
       // disable PLAIN and enable LOGIN (in case it's not already enabled)
       ClearCapFlag(POP3_HAS_AUTH_PLAIN);
       SetCapFlag(POP3_HAS_AUTH_LOGIN);
       m_pop3Server->SetPop3CapabilityFlags(m_pop3ConData->capability_flags);
 
       // reenter authentication again at LOGIN response handler
       m_pop3ConData->next_state = POP3_AUTH_LOGIN_RESPONSE;
-      m_pop3ConData->pause_for_read = PR_FALSE;
+      m_pop3ConData->pause_for_read = false;
       return 0;
     }
 
     char plain_string[512]; // TODO nsCString
     int len = 1; /* first <NUL> char */
     memset(plain_string, 0, 512);
     PR_snprintf(&plain_string[1], 510, "%s", m_username.get());
     len += m_username.Length();
@@ -2303,21 +2303,21 @@ PRInt32 nsPop3Protocol::SendPassword()
 
   cmd += CRLF;
 
   // TODO needed?
   //m_pop3Server->SetPop3CapabilityFlags(m_pop3ConData->capability_flags);
 
   m_pop3ConData->next_state_after_response = POP3_NEXT_AUTH_STEP;
 
-  m_pop3ConData->pause_for_read = PR_TRUE;
-
-  m_password_already_sent = PR_TRUE;
+  m_pop3ConData->pause_for_read = true;
+
+  m_password_already_sent = true;
   m_lastPasswordSent = m_passwordResult;
-  return SendData(m_url, cmd.get(), PR_TRUE);
+  return SendData(m_url, cmd.get(), true);
 }
 
 PRInt32 nsPop3Protocol::SendStatOrGurl(bool sendStat)
 {
   nsCAutoString cmd;
   if (sendStat)
   {
     cmd  = "STAT" CRLF;
@@ -2330,17 +2330,17 @@ PRInt32 nsPop3Protocol::SendStatOrGurl(b
   }
   return SendData(m_url, cmd.get());
 }
 
 
 PRInt32
 nsPop3Protocol::SendStat()
 {
-  return SendStatOrGurl(PR_TRUE);
+  return SendStatOrGurl(true);
 }
 
 
 PRInt32
 nsPop3Protocol::GetStat()
 {
   // check stat response
   if (!m_pop3ConData->command_succeeded)
@@ -2372,31 +2372,31 @@ nsPop3Protocol::GetStat()
   m_totalDownloadSize = -1; // Means we need to calculate it, later.
 
   if (m_pop3ConData->number_of_messages <= 0)
   {
     // We're all done. We know we have no mail.
     m_pop3ConData->next_state = POP3_SEND_QUIT;
     PL_HashTableEnumerateEntries(m_pop3ConData->uidlinfo->hash, hash_clear_mapper, nsnull);
     // Hack - use nsPop3Sink to wipe out any stale Partial messages
-    m_nsIPop3Sink->BeginMailDelivery(PR_FALSE, nsnull, nsnull);
+    m_nsIPop3Sink->BeginMailDelivery(false, nsnull, nsnull);
     m_nsIPop3Sink->AbortMailDelivery(this);
     return(0);
   }
 
   /* We're just checking for new mail, and we're not playing any games that
      involve keeping messages on the server.  Therefore, we now know enough
      to finish up.  If we had no messages, that would have been handled
      above; therefore, we know we have some new messages. 
   */
   if (m_pop3ConData->only_check_for_new_mail && !m_pop3ConData->leave_on_server)
   {
     m_nsIPop3Sink->SetBiffStateAndUpdateFE(nsIMsgFolder::nsMsgBiffState_NewMail,
                                            m_pop3ConData->number_of_messages,
-                                           PR_TRUE);
+                                           true);
     m_pop3ConData->next_state = POP3_SEND_QUIT;
     return(0);
   }
 
 
   if (!m_pop3ConData->only_check_for_new_mail)
   {
       /* The following was added to prevent the loss of Data when we try and
@@ -2432,17 +2432,17 @@ nsPop3Protocol::GetStat()
 
 
 
 PRInt32
 nsPop3Protocol::SendGurl()
 {
     if (m_pop3ConData->capability_flags == POP3_CAPABILITY_UNDEFINED ||
         TestCapFlag(POP3_GURL_UNDEFINED | POP3_HAS_GURL))
-        return SendStatOrGurl(PR_FALSE);
+        return SendStatOrGurl(false);
     else
         return -1;
 }
 
 
 PRInt32
 nsPop3Protocol::GurlResponse()
 {
@@ -2504,17 +2504,17 @@ nsPop3Protocol::GetList(nsIInputStream* 
   bool pauseForMoreData = false;
   nsresult rv;
   char *line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData, &rv);
   if (NS_FAILED(rv))
     return -1;
 
   if (pauseForMoreData || !line)
   {
-    m_pop3ConData->pause_for_read = PR_TRUE;
+    m_pop3ConData->pause_for_read = true;
     PR_Free(line);
     return(ln);
   }
 
   PR_LOG(POP3LOGMODULE, PR_LOG_ALWAYS,("RECV: %s", line));
 
   /* parse the line returned from the list command
   * it looks like
@@ -2523,17 +2523,17 @@ nsPop3Protocol::GetList(nsIInputStream* 
   * list data is terminated by a ".CRLF" line
   */
   if (!PL_strcmp(line, "."))
   {
     // limit the list if fewer entries than given in STAT response
     if(m_listpos < m_pop3ConData->number_of_messages)
       m_pop3ConData->number_of_messages = m_listpos;
     m_pop3ConData->next_state = POP3_SEND_UIDL_LIST;
-    m_pop3ConData->pause_for_read = PR_FALSE;
+    m_pop3ConData->pause_for_read = false;
     PR_Free(line);
     return(0);
   }
 
   char *newStr = line;
   char *token = NS_strtok(" ", &newStr);
   if (token)
   {
@@ -2574,17 +2574,17 @@ nsPop3Protocol::GetList(nsIInputStream* 
 
    In other cases the user has to join the 20th century.
    Tell the user this, and refuse to download any messages until
    they've gone into preferences and turned off any of the above
    prefs.
 */
 PRInt32 nsPop3Protocol::HandleNoUidListAvailable()
 {
-  m_pop3ConData->pause_for_read = PR_FALSE;
+  m_pop3ConData->pause_for_read = false;
 
   if(!m_pop3ConData->leave_on_server &&
      !m_pop3ConData->headers_only &&
      m_pop3ConData->size_limit <= 0 &&
      !m_pop3ConData->only_uidl)
     m_pop3ConData->next_state = POP3_GET_MSG;
   else
   {
@@ -2650,17 +2650,17 @@ PRInt32 nsPop3Protocol::HandleNoUidListA
  * POP3_GET_XTND_XLST_MSGID state
  *
 */
 PRInt32 nsPop3Protocol::SendXtndXlstMsgid()
 {
   if (TestCapFlag(POP3_HAS_XTND_XLST | POP3_XTND_XLST_UNDEFINED))
   {
     m_pop3ConData->next_state_after_response = POP3_GET_XTND_XLST_MSGID;
-    m_pop3ConData->pause_for_read = PR_TRUE;
+    m_pop3ConData->pause_for_read = true;
     m_listpos = 0;
     return SendData(m_url, "XTND XLST Message-Id" CRLF);
   }
   else
     return HandleNoUidListAvailable();
 }
 
 
@@ -2702,17 +2702,17 @@ nsPop3Protocol::GetXtndXlstMsgid(nsIInpu
   bool pauseForMoreData = false;
   nsresult rv;
   char *line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData, &rv);
   if (NS_FAILED(rv))
     return -1;
 
   if (pauseForMoreData || !line)
   {
-    m_pop3ConData->pause_for_read = PR_TRUE;
+    m_pop3ConData->pause_for_read = true;
     PR_Free(line);
     return ln;
   }
 
   PR_LOG(POP3LOGMODULE, PR_LOG_ALWAYS,("RECV: %s", line));
 
   /* parse the line returned from the list command
   * it looks like
@@ -2720,19 +2720,19 @@ nsPop3Protocol::GetXtndXlstMsgid(nsIInpu
   *
   * list data is terminated by a ".CRLF" line
   */
   if (!PL_strcmp(line, "."))
   {
     // limit the list if fewer entries than given in STAT response
     if(m_listpos < m_pop3ConData->number_of_messages)
       m_pop3ConData->number_of_messages = m_listpos;
-    m_pop3ConData->list_done = PR_TRUE;
+    m_pop3ConData->list_done = true;
     m_pop3ConData->next_state = POP3_GET_MSG;
-    m_pop3ConData->pause_for_read = PR_FALSE;
+    m_pop3ConData->pause_for_read = false;
     PR_Free(line);
     return(0);
   }
 
   char *newStr = line;
   char *token = NS_strtok(" ", &newStr);  // msg num
   if (token)
   {
@@ -2776,17 +2776,17 @@ nsPop3Protocol::GetXtndXlstMsgid(nsIInpu
 }
 
 
 PRInt32 nsPop3Protocol::SendUidlList()
 {
     if (TestCapFlag(POP3_HAS_UIDL | POP3_UIDL_UNDEFINED))
     {
       m_pop3ConData->next_state_after_response = POP3_GET_UIDL_LIST;
-      m_pop3ConData->pause_for_read = PR_TRUE;
+      m_pop3ConData->pause_for_read = true;
       m_listpos = 0;
       return SendData(m_url,"UIDL" CRLF);
     }
     else
       return SendXtndXlstMsgid();
 }
 
 
@@ -2798,17 +2798,17 @@ PRInt32 nsPop3Protocol::GetUidlList(nsII
      * but it's alright since command_succeeded
      * will remain constant
      */
     ClearCapFlag(POP3_UIDL_UNDEFINED);
 
     if (!m_pop3ConData->command_succeeded)
     {
       m_pop3ConData->next_state = POP3_SEND_XTND_XLST_MSGID;
-      m_pop3ConData->pause_for_read = PR_FALSE;
+      m_pop3ConData->pause_for_read = false;
       ClearCapFlag(POP3_HAS_UIDL);
       m_pop3Server->SetPop3CapabilityFlags(m_pop3ConData->capability_flags);
       return(0);
     }
     else
     {
       SetCapFlag(POP3_HAS_UIDL);
       m_pop3Server->SetPop3CapabilityFlags(m_pop3ConData->capability_flags);
@@ -2819,36 +2819,36 @@ PRInt32 nsPop3Protocol::GetUidlList(nsII
     nsresult rv;
     char *line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData, &rv);
     if (NS_FAILED(rv))
       return -1;
 
     if (pauseForMoreData || !line)
     {
       PR_Free(line);
-      m_pop3ConData->pause_for_read = PR_TRUE;
+      m_pop3ConData->pause_for_read = true;
       return ln;
     }
 
     PR_LOG(POP3LOGMODULE, PR_LOG_ALWAYS,("RECV: %s", line));
 
     /* parse the line returned from the list command
      * it looks like
      * #msg_number uidl
      *
      * list data is terminated by a ".CRLF" line
      */
     if (!PL_strcmp(line, "."))
     {
       // limit the list if fewer entries than given in STAT response
       if (m_listpos < m_pop3ConData->number_of_messages)
         m_pop3ConData->number_of_messages = m_listpos;
-      m_pop3ConData->list_done = PR_TRUE;
+      m_pop3ConData->list_done = true;
       m_pop3ConData->next_state = POP3_GET_MSG;
-      m_pop3ConData->pause_for_read = PR_FALSE;
+      m_pop3ConData->pause_for_read = false;
       PR_Free(line);
       return(0);
     }
 
     char *newStr = line;
     char *token = NS_strtok(" ", &newStr);  // msg num
     if (token)
     {
@@ -2902,20 +2902,20 @@ PRInt32 nsPop3Protocol::GetMsg()
   if (m_pop3ConData->last_accessed_msg >= m_pop3ConData->number_of_messages)
   {
     /* Oh, gee, we're all done. */
     if(m_pop3ConData->msg_del_started)
     {
       if (!m_pop3ConData->only_uidl)
       {
         if (m_pop3ConData->only_check_for_new_mail)
-          m_nsIPop3Sink->SetBiffStateAndUpdateFE(m_pop3ConData->biffstate, m_pop3ConData->really_new_messages, PR_TRUE);
+          m_nsIPop3Sink->SetBiffStateAndUpdateFE(m_pop3ConData->biffstate, m_pop3ConData->really_new_messages, true);
         /* update old style biff */
         else
-          m_nsIPop3Sink->SetBiffStateAndUpdateFE(nsIMsgFolder::nsMsgBiffState_NewMail, m_pop3ConData->really_new_messages, PR_FALSE);
+          m_nsIPop3Sink->SetBiffStateAndUpdateFE(nsIMsgFolder::nsMsgBiffState_NewMail, m_pop3ConData->really_new_messages, false);
       }
       m_nsIPop3Sink->EndMailDelivery(this);
     }
 
     m_pop3ConData->next_state = POP3_SEND_QUIT;
     return 0;
   }
 
@@ -2992,17 +2992,17 @@ PRInt32 nsPop3Protocol::GetMsg()
     {
       m_totalDownloadSize = m_totalFolderSize;
     }
     if (m_pop3ConData->only_check_for_new_mail)
     {
       if (m_totalDownloadSize > 0)
       {
         m_pop3ConData->biffstate = nsIMsgFolder::nsMsgBiffState_NewMail;
-        m_nsIPop3Sink->SetBiffStateAndUpdateFE(nsIMsgFolder::nsMsgBiffState_NewMail, m_pop3ConData->really_new_messages, PR_TRUE);
+        m_nsIPop3Sink->SetBiffStateAndUpdateFE(nsIMsgFolder::nsMsgBiffState_NewMail, m_pop3ConData->really_new_messages, true);
       }
       m_pop3ConData->next_state = POP3_SEND_QUIT;
       return(0);
     }
     /* get the amount of available space on the drive
      * and make sure there is enough
      */
     if (m_totalDownloadSize > 0) // skip all this if there aren't any messages
@@ -3079,18 +3079,18 @@ PRInt32 nsPop3Protocol::GetMsg()
 
   // if this is a message we've seen for the first time, we won't find it in
   // m_pop3ConData-uidlinfo->hash.  By default, we retrieve messages, unless they have a status,
   // or are too big, in which case we figure out what to do.
   if (m_prefAuthMethods != POP3_HAS_AUTH_USER && TestCapFlag(POP3_HAS_XSENDER))
     m_pop3ConData->next_state = POP3_SEND_XSENDER;
   else
     m_pop3ConData->next_state = POP3_SEND_RETR;
-  m_pop3ConData->truncating_cur_msg = PR_FALSE;
-  m_pop3ConData->pause_for_read = PR_FALSE;
+  m_pop3ConData->truncating_cur_msg = false;
+  m_pop3ConData->pause_for_read = false;
   if (m_pop3ConData->msg_info)
   {
     Pop3MsgInfo* info = m_pop3ConData->msg_info + m_pop3ConData->last_accessed_msg;
     if (m_pop3ConData->only_uidl)
     {
       if (info->uidl == NULL || PL_strcmp(info->uidl, m_pop3ConData->only_uidl))
         m_pop3ConData->next_state = POP3_GET_MSG;
       else
@@ -3133,32 +3133,32 @@ PRInt32 nsPop3Protocol::GetMsg()
         (TestCapFlag(POP3_TOP_UNDEFINED | POP3_HAS_TOP)) &&
         (m_pop3ConData->headers_only ||
          ((m_pop3ConData->size_limit > 0) &&
           (info->size > m_pop3ConData->size_limit) &&
           !m_pop3ConData->only_uidl)) &&
         info->uidl && *info->uidl)
       {
         // message is too big
-        m_pop3ConData->truncating_cur_msg = PR_TRUE;
+        m_pop3ConData->truncating_cur_msg = true;
         m_pop3ConData->next_state = POP3_SEND_TOP;
         put_hash(m_pop3ConData->newuidl, info->uidl, TOO_BIG, popstateTimestamp);
       }
       else if (c == TOO_BIG)
       {
         /* message previously left on server, see if the max download size
         has changed, because we may want to download the message this time
         around. Otherwise ignore the message, we have the header. */
         if ((m_pop3ConData->size_limit > 0) && (info->size <=
           m_pop3ConData->size_limit))
           PL_HashTableRemove (m_pop3ConData->uidlinfo->hash, (void*)info->uidl);
         // remove from our table, and download
         else
         {
-          m_pop3ConData->truncating_cur_msg = PR_TRUE;
+          m_pop3ConData->truncating_cur_msg = true;
           m_pop3ConData->next_state = POP3_GET_MSG;
           // ignore this message and get next one
           put_hash(m_pop3ConData->newuidl, info->uidl, TOO_BIG, popstateTimestamp);
         }
       }
 
       if (m_pop3ConData->next_state != POP3_SEND_DELE &&
           info->uidl)
@@ -3221,17 +3221,17 @@ PRInt32 nsPop3Protocol::SendXsender()
     status = SendData(m_url, cmd);
     PR_Free(cmd);
   }
   return status;
 }
 
 PRInt32 nsPop3Protocol::XsenderResponse()
 {
-    m_pop3ConData->seenFromHeader = PR_FALSE;
+    m_pop3ConData->seenFromHeader = false;
     m_senderInfo = "";
 
     if (m_pop3ConData->command_succeeded) {
         if (m_commandResponse.Length() > 4)
             m_senderInfo = m_commandResponse;
     }
     else {
         ClearCapFlag(POP3_HAS_XSENDER);
@@ -3264,17 +3264,17 @@ nsPop3Protocol::SendRetr()
     */
     m_bytesInMsgReceived = 0;
 
     if (m_pop3ConData->only_uidl)
     {
       /* Display bytes if we're only downloading one message. */
       PR_ASSERT(!m_pop3ConData->graph_progress_bytes_p);
       UpdateProgressPercent(0, m_totalDownloadSize);
-      m_pop3ConData->graph_progress_bytes_p = PR_TRUE;
+      m_pop3ConData->graph_progress_bytes_p = true;
     }
     else
     {
       nsString finalString;
       nsresult rv = FormatCounterString(NS_LITERAL_STRING("receivingMsgs"),
                           m_pop3ConData->real_new_counter,
                           m_pop3ConData->really_new_messages,
                           finalString);
@@ -3343,17 +3343,17 @@ nsPop3Protocol::RetrResponse(nsIInputStr
         }
 
         if (m_pop3ConData->msg_info &&
             m_pop3ConData->msg_info[m_pop3ConData->last_accessed_msg].uidl)
             uidl = m_pop3ConData->msg_info[m_pop3ConData->last_accessed_msg].uidl;
 
         m_pop3ConData->parsed_bytes = 0;
         m_pop3ConData->pop3_size = m_pop3ConData->cur_msg_size;
-        m_pop3ConData->assumed_end = PR_FALSE;
+        m_pop3ConData->assumed_end = false;
 
         m_pop3Server->GetDotFix(&m_pop3ConData->dot_fix);
 
         PR_LOG(POP3LOGMODULE,PR_LOG_ALWAYS,
                ("Opening message stream: MSG_IncorporateBegin"));
 
         /* open the message stream so we have someplace
          * to put the data
@@ -3364,20 +3364,20 @@ nsPop3Protocol::RetrResponse(nsIInputStr
                                         &m_pop3ConData->msg_closure);
 
         PR_LOG(POP3LOGMODULE, PR_LOG_ALWAYS, ("Done opening message stream!"));
 
         if(!m_pop3ConData->msg_closure || NS_FAILED(rv))
             return(Error(POP3_MESSAGE_WRITE_ERROR));
     }
 
-    m_pop3ConData->pause_for_read = PR_TRUE;
+    m_pop3ConData->pause_for_read = true;
 
     bool pauseForMoreData = false;
-    char *line = m_lineStreamBuffer->ReadNextLine(inputStream, status, pauseForMoreData, &rv, PR_TRUE);
+    char *line = m_lineStreamBuffer->ReadNextLine(inputStream, status, pauseForMoreData, &rv, true);
     PR_LOG(POP3LOGMODULE, PR_LOG_ALWAYS,("RECV: %s", line));
     if (NS_FAILED(rv))
       return -1;
 
     buffer_size = status;
 
     if (status == 0 && !line)  // no bytes read in...
       return (0);
@@ -3399,17 +3399,17 @@ nsPop3Protocol::RetrResponse(nsIInputStr
           // but not really sure we always had CRLF in input since
           // we also treat a single LF as line ending!
           m_pop3ConData->parsed_bytes += buffer_size - MSG_LINEBREAK_LEN + 2;
         }
 
         // now read in the next line
         PR_Free(line);
         line = m_lineStreamBuffer->ReadNextLine(inputStream, buffer_size,
-                                                pauseForMoreData, &rv, PR_TRUE);
+                                                pauseForMoreData, &rv, true);
         if (NS_FAILED(rv))
           return -1;
 
         PR_LOG(POP3LOGMODULE, PR_LOG_ALWAYS,("RECV: %s", line));
         // buffer_size already includes MSG_LINEBREAK_LEN so
         // subtract and add CRLF
         // but not really sure we always had CRLF in input since
         // we also treat a single LF as line ending!
@@ -3450,17 +3450,17 @@ nsPop3Protocol::RetrResponse(nsIInputStr
                            : POP3_MESSAGE_WRITE_ERROR));
 
         m_pop3ConData->msg_closure = nsnull;
     }
 
     if (!m_pop3ConData->msg_closure)
         /* meaning _handle_line read ".\r\n" at end-of-msg */
     {
-        m_pop3ConData->pause_for_read = PR_FALSE;
+        m_pop3ConData->pause_for_read = false;
 
         if (m_pop3ConData->truncating_cur_msg ||
             m_pop3ConData->leave_on_server )
         {
             Pop3UidlEntry *uidlEntry = NULL;
             Pop3MsgInfo* info = m_pop3ConData->msg_info + m_pop3ConData->last_accessed_msg;
 
             /* Check for filter actions - FETCH or DELETE */
@@ -3538,17 +3538,17 @@ nsPop3Protocol::TopResponse(nsIInputStre
   if(m_pop3ConData->cur_msg_size == -1 &&  /* first line after TOP command sent */
     !m_pop3ConData->command_succeeded)  /* and TOP command failed */
   {
   /* TOP doesn't work so we can't retrieve the first part of this msg.
   So just go download the whole thing, and warn the user.
 
     Note that the progress bar will not be accurate in this case.
     Oops. #### */
-    m_pop3ConData->truncating_cur_msg = PR_FALSE;
+    m_pop3ConData->truncating_cur_msg = false;
 
     nsString statusTemplate;
     mLocalBundle->GetStringFromID(POP3_SERVER_DOES_NOT_SUPPORT_THE_TOP_COMMAND, getter_Copies(statusTemplate));
     if (!statusTemplate.IsEmpty())
     {
       nsCAutoString hostName;
       PRUnichar * statusString = nsnull;
       m_url->GetHost(hostName);
@@ -3579,27 +3579,27 @@ nsPop3Protocol::HandleLine(char *line, P
     NS_ASSERTION(m_pop3ConData->msg_closure, "m_pop3ConData->msg_closure is null in nsPop3Protocol::HandleLine()");
     if (!m_pop3ConData->msg_closure)
         return NS_ERROR_NULL_POINTER;
 
     if (!m_senderInfo.IsEmpty() && !m_pop3ConData->seenFromHeader)
     {
         if (line_length > 6 && !PL_strncasecmp("From: ", line, 6))
         {
-            m_pop3ConData->seenFromHeader = PR_TRUE;
+            m_pop3ConData->seenFromHeader = true;
             if (PL_strstr(line, m_senderInfo.get()) == NULL)
                 m_nsIPop3Sink->SetSenderAuthedFlag(m_pop3ConData->msg_closure,
-                                                     PR_FALSE);
+                                                     false);
         }
     }
 
     // line contains only a single dot and linebreak -> message end
     if (line_length == 1 + MSG_LINEBREAK_LEN && line[0] == '.')
     {
-        m_pop3ConData->assumed_end = PR_TRUE;  /* in case byte count from server is */
+        m_pop3ConData->assumed_end = true;  /* in case byte count from server is */
                                     /* wrong, mark we may have had the end */
         if (!m_pop3ConData->dot_fix || m_pop3ConData->truncating_cur_msg ||
             (m_pop3ConData->parsed_bytes >= (m_pop3ConData->pop3_size -3)))
         {
             nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(m_url, &rv);
             nsCOMPtr<nsIMsgWindow> msgWindow;
             if (NS_SUCCEEDED(rv))
               rv = mailnewsUrl->GetMsgWindow(getter_AddRefs(msgWindow));
@@ -3690,17 +3690,17 @@ PRInt32 nsPop3Protocol::DeleResponse()
         }
       else
         PL_HashTableRemove(host->hash,
             (void*) m_pop3ConData->msg_info[m_pop3ConData->last_accessed_msg-1].uidl);
     }
   }
 
   m_pop3ConData->next_state = POP3_GET_MSG;
-  m_pop3ConData->pause_for_read = PR_FALSE;
+  m_pop3ConData->pause_for_read = false;
 
   return(0);
 }
 
 
 PRInt32
 nsPop3Protocol::CommitState(bool remove_last_entry)
 {
@@ -3769,21 +3769,21 @@ nsresult nsPop3Protocol::ProcessProtocol
 {
   PRInt32 status = 0;
   bool urlStatusSet = false;
   nsCOMPtr<nsIMsgMailNewsUrl> mailnewsurl = do_QueryInterface(m_url);
 
   PR_LOG(POP3LOGMODULE, PR_LOG_ALWAYS, ("Entering NET_ProcessPop3 %d",
     aLength));
 
-  m_pop3ConData->pause_for_read = PR_FALSE; /* already paused; reset */
+  m_pop3ConData->pause_for_read = false; /* already paused; reset */
 
   if(m_username.IsEmpty())
   {
-    // net_pop3_block = PR_FALSE;
+    // net_pop3_block = false;
     return(Error(POP3_USERNAME_UNDEFINED));
   }
 
   while(!m_pop3ConData->pause_for_read)
   {
     PR_LOG(POP3LOGMODULE, PR_LOG_ALWAYS,
       ("POP3: Entering state: %d", m_pop3ConData->next_state));
 
@@ -3798,25 +3798,25 @@ nsresult nsPop3Protocol::ProcessProtocol
         status = -1;
       break;
     case POP3_FINISH_OBTAIN_PASSWORD_EARLY:
       {
         if (m_passwordResult.IsEmpty() || m_username.IsEmpty())
         {
           status = MK_POP3_PASSWORD_UNDEFINED;
           m_pop3ConData->biffstate = nsIMsgFolder::nsMsgBiffState_Unknown;
-          m_nsIPop3Sink->SetBiffStateAndUpdateFE(m_pop3ConData->biffstate, 0, PR_FALSE);
+          m_nsIPop3Sink->SetBiffStateAndUpdateFE(m_pop3ConData->biffstate, 0, false);
 
           /* update old style biff */
           m_pop3ConData->next_state = POP3_FREE;
-          m_pop3ConData->pause_for_read = PR_FALSE;
+          m_pop3ConData->pause_for_read = false;
           break;
         }
 
-        m_pop3ConData->pause_for_read = PR_FALSE;
+        m_pop3ConData->pause_for_read = false;
         // we are already connected so just go on and send the username
         if (m_prefAuthMethods == POP3_HAS_AUTH_USER)
         {
           m_currentAuthMethod = POP3_HAS_AUTH_USER;
           m_pop3ConData->next_state = POP3_SEND_USERNAME;
         }
         else
         {
@@ -3827,23 +3827,23 @@ nsresult nsPop3Protocol::ProcessProtocol
         }
         break;
       }
 
 
     case POP3_START_CONNECT:
       {
         m_pop3ConData->next_state = POP3_FINISH_CONNECT;
-        m_pop3ConData->pause_for_read = PR_FALSE;
+        m_pop3ConData->pause_for_read = false;
         break;
       }
 
     case POP3_FINISH_CONNECT:
       {
-        m_pop3ConData->pause_for_read = PR_FALSE;
+        m_pop3ConData->pause_for_read = false;
         m_pop3ConData->next_state = POP3_WAIT_FOR_START_OF_CONNECTION_RESPONSE;
         break;
       }
 
     case POP3_WAIT_FOR_RESPONSE:
       status = WaitForResponse(aInputStream, aLength);
       break;
 
@@ -4079,26 +4079,26 @@ nsresult nsPop3Protocol::ProcessProtocol
       }
       else
       {
         m_pop3ConData->next_state = POP3_ERROR_DONE;
       }
       break;
 
     case POP3_DONE:
-      CommitState(PR_FALSE);
+      CommitState(false);
       m_pop3ConData->urlStatus = NS_OK;
-      urlStatusSet = PR_TRUE;
+      urlStatusSet = true;
       m_pop3ConData->next_state = POP3_FREE;
       break;
 
     case POP3_ERROR_DONE:
       /*  write out the state */
       if(m_pop3ConData->list_done)
-        CommitState(PR_TRUE);
+        CommitState(true);
 
       if(m_pop3ConData->msg_closure)
       {
         m_nsIPop3Sink->IncorporateAbort(m_pop3ConData->only_uidl != nsnull);
         m_pop3ConData->msg_closure = NULL;
         m_nsIPop3Sink->AbortMailDelivery(this);
       }
 
@@ -4124,59 +4124,59 @@ nsresult nsPop3Protocol::ProcessProtocol
         if (TestFlag(POP3_PASSWORD_FAILED) && msgWindow)
         {
           // We get here because the password was wrong.
           if (!m_socketIsOpen && mailnewsurl)
           {
             // The server dropped the connection, so we're going
             // to re-run the url.
             PR_LOG(POP3LOGMODULE, PR_LOG_MAX, ("need to rerun url because connection dropped during auth"));
-            m_needToRerunUrl = PR_TRUE;
+            m_needToRerunUrl = true;
             return NS_OK;
           }
           m_pop3ConData->next_state = POP3_READ_PASSWORD;
-          m_pop3ConData->command_succeeded = PR_TRUE;
+          m_pop3ConData->command_succeeded = true;
           status = 0;
           break;
         }
         else
           /* Else we got a "real" error, so finish up. */
           m_pop3ConData->next_state = POP3_FREE;
       }
       m_pop3ConData->urlStatus = NS_ERROR_FAILURE;
-      urlStatusSet = PR_TRUE;
-      m_pop3ConData->pause_for_read = PR_FALSE;
+      urlStatusSet = true;
+      m_pop3ConData->pause_for_read = false;
       break;
 
     case POP3_FREE:
       {
         UpdateProgressPercent(0,0); // clear out the progress meter
         nsCOMPtr<nsIMsgIncomingServer> server = do_QueryInterface(m_pop3Server);
         if (server)
         {
           PR_LOG(POP3LOGMODULE, PR_LOG_MAX, ("Clearing server busy in POP3_FREE"));
-          server->SetServerBusy(PR_FALSE); // the server is now not busy
+          server->SetServerBusy(false); // the server is now not busy
         }
         PR_LOG(POP3LOGMODULE, PR_LOG_MAX, ("Clearing running protocol in POP3_FREE"));
         m_pop3Server->SetRunningProtocol(nsnull);
         if (mailnewsurl && urlStatusSet)
-          mailnewsurl->SetUrlState(PR_FALSE, m_pop3ConData->urlStatus);
+          mailnewsurl->SetUrlState(false, m_pop3ConData->urlStatus);
 
         CloseSocket();
         m_url = nsnull;
         return NS_OK;
       }
     default:
       NS_ERROR("Got to unexpected state in nsPop3Protocol::ProcessProtocolState");
 
     }  /* end switch */
 
     if((status < 0) && m_pop3ConData->next_state != POP3_FREE)
     {
-      m_pop3ConData->pause_for_read = PR_FALSE;
+      m_pop3ConData->pause_for_read = false;
       m_pop3ConData->next_state = POP3_ERROR_DONE;
     }
 
   }  /* end while */
 
   return NS_OK;
 
 }
@@ -4204,29 +4204,29 @@ NS_IMETHODIMP nsPop3Protocol::CheckMessa
   if (aUidl)
   {
     if (m_pop3ConData->newuidl)
       uidlEntry = (Pop3UidlEntry *) PL_HashTableLookup(m_pop3ConData->newuidl, aUidl);
     else if (m_pop3ConData->uidlinfo)
       uidlEntry = (Pop3UidlEntry *) PL_HashTableLookup(m_pop3ConData->uidlinfo->hash, aUidl);
   }
 
-  *aBool = uidlEntry ? PR_TRUE : PR_FALSE;
+  *aBool = uidlEntry ? true : false;
   return NS_OK;
 }
 
 
 /* Function for finding an APOP Timestamp and simple check
    it for its validity. If returning NS_OK m_ApopTimestamp
    contains the validated substring of m_commandResponse. */
 nsresult nsPop3Protocol::GetApopTimestamp()
 {
   PRInt32 startMark = m_commandResponse.Length(), endMark = -1;
 
-  while (PR_TRUE)
+  while (true)
   {
     // search for previous <
     if ((startMark = MsgRFindChar(m_commandResponse, '<', startMark - 1)) < 0)
       return NS_ERROR_FAILURE;
 
     // search for next >
     if ((endMark = m_commandResponse.FindChar('>', startMark)) < 0)
       continue;
--- a/mailnews/local/src/nsPop3Protocol.h
+++ b/mailnews/local/src/nsPop3Protocol.h
@@ -65,17 +65,17 @@ server.  Based on our experience, it loo
 do this (it has performance tradeoffs, etc.).  To turn it on, three
 things need to happen: #define POP_ALWAYS_USE_UIDL_FOR_DUPLICATES, verify that
 the uidl's are correctly getting added when the delete response is received,
 and change the POP3_QUIT_RESPONSE state to flush the newly committed deletes. */
 
 /*
  * Cannot have the following line uncommented. It is defined.
  * #ifdef POP_ALWAYS_USE_UIDL_FOR_DUPLICATES will always be evaluated
- * as PR_TRUE.
+ * as true.
  *
 #define POP_ALWAYS_USE_UIDL_FOR_DUPLICATES 0
  *
  */
 
 #define MK_OUT_OF_MEMORY -207
 #define MK_POP3_OUT_OF_DISK_SPACE -321
 #define MK_POP3_PASSWORD_UNDEFINED -313
--- a/mailnews/local/src/nsPop3Service.cpp
+++ b/mailnews/local/src/nsPop3Service.cpp
@@ -86,26 +86,26 @@ NS_IMPL_ISUPPORTS3(nsPop3Service,
                          nsIMsgProtocolInfo)
 
 NS_IMETHODIMP nsPop3Service::CheckForNewMail(nsIMsgWindow* aMsgWindow,
                                              nsIUrlListener * aUrlListener,
                                              nsIMsgFolder *aInbox,
                                              nsIPop3IncomingServer *aPopServer,
                                              nsIURI ** aURL)
 {
-  return GetMail(PR_FALSE /* don't download, just check */, aMsgWindow, aUrlListener, aInbox, aPopServer, aURL);
+  return GetMail(false /* don't download, just check */, aMsgWindow, aUrlListener, aInbox, aPopServer, aURL);
 }
 
 
 nsresult nsPop3Service::GetNewMail(nsIMsgWindow *aMsgWindow, nsIUrlListener * aUrlListener,
                                    nsIMsgFolder *aInbox,
                                    nsIPop3IncomingServer *aPopServer,
                                    nsIURI ** aURL)
 {
-  return GetMail(PR_TRUE /* download */, aMsgWindow, aUrlListener, aInbox, aPopServer, aURL);
+  return GetMail(true /* download */, aMsgWindow, aUrlListener, aInbox, aPopServer, aURL);
 }
 
 nsresult nsPop3Service::GetMail(bool downloadNewMail,
                                 nsIMsgWindow* aMsgWindow,
                                 nsIUrlListener * aUrlListener,
                                 nsIMsgFolder *aInbox,
                                 nsIPop3IncomingServer *aPopServer,
                                 nsIURI ** aURL)
@@ -283,17 +283,17 @@ nsresult nsPop3Service::RunPopUrl(nsIMsg
       if (protocol)
       {
         NS_ADDREF(protocol);
         // the protocol stores the unescaped username, so there is no need to escape it.
         protocol->SetUsername(userName.get());
         rv = protocol->LoadUrl(aUrlToRun);
         NS_RELEASE(protocol);
         if (NS_FAILED(rv))
-          aServer->SetServerBusy(PR_FALSE);
+          aServer->SetServerBusy(false);
       }
     }
     else
     {
       nsCOMPtr <nsIMsgMailNewsUrl> url = do_QueryInterface(aUrlToRun);
       if (url)
         AlertServerBusy(url);
       rv = NS_ERROR_FAILURE;
@@ -314,25 +314,25 @@ NS_IMETHODIMP nsPop3Service::GetDefaultP
 {
     NS_ENSURE_ARG_POINTER(aDefaultPort);
     *aDefaultPort = nsIPop3URL::DEFAULT_POP3_PORT;
     return NS_OK;
 }
 
 NS_IMETHODIMP nsPop3Service::AllowPort(PRInt32 port, const char *scheme, bool *_retval)
 {
-    *_retval = PR_TRUE; // allow pop on any port
+    *_retval = true; // allow pop on any port
     return NS_OK;
 }
 
 NS_IMETHODIMP nsPop3Service::GetDefaultDoBiff(bool *aDoBiff)
 {
     NS_ENSURE_ARG_POINTER(aDoBiff);
     // by default, do biff for POP3 servers
-    *aDoBiff = PR_TRUE;
+    *aDoBiff = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP nsPop3Service::GetProtocolFlags(PRUint32 *result)
 {
     NS_ENSURE_ARG_POINTER(result);
     *result = URI_NORELATIVE | URI_DANGEROUS_TO_LOAD | ALLOWS_PROXY |
               URI_FORBIDS_COOKIE_ACCESS;
@@ -443,17 +443,17 @@ NS_IMETHODIMP nsPop3Service::NewURI(cons
             messageUri.Replace(offset, 8, "#");
           offset = messageUri.FindChar('&');
           if (offset != -1)
             messageUri.SetLength(offset);
           popurl->SetMessageUri(messageUri.get());
           nsCOMPtr<nsIPop3Sink> pop3Sink;
           rv = popurl->GetPop3Sink(getter_AddRefs(pop3Sink));
           if (NS_SUCCEEDED(rv))
-            pop3Sink->SetBuildMessageUri(PR_TRUE);
+            pop3Sink->SetBuildMessageUri(true);
         }
     }
     return rv;
 }
 
 void nsPop3Service::AlertServerBusy(nsIMsgMailNewsUrl *url)
 {
   nsresult rv;
@@ -571,73 +571,73 @@ nsPop3Service::GetServerIID(nsIID* *aSer
     *aServerIID = new nsIID(NS_GET_IID(nsIPop3IncomingServer));
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPop3Service::GetRequiresUsername(bool *aRequiresUsername)
 {
         NS_ENSURE_ARG_POINTER(aRequiresUsername);
-        *aRequiresUsername = PR_TRUE;
+        *aRequiresUsername = true;
         return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPop3Service::GetPreflightPrettyNameWithEmailAddress(bool *aPreflightPrettyNameWithEmailAddress)
 {
         NS_ENSURE_ARG_POINTER(aPreflightPrettyNameWithEmailAddress);
-        *aPreflightPrettyNameWithEmailAddress = PR_TRUE;
+        *aPreflightPrettyNameWithEmailAddress = true;
         return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPop3Service::GetCanLoginAtStartUp(bool *aCanLoginAtStartUp)
 {
         NS_ENSURE_ARG_POINTER(aCanLoginAtStartUp);
-        *aCanLoginAtStartUp = PR_TRUE;
+        *aCanLoginAtStartUp = true;
         return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPop3Service::GetCanDelete(bool *aCanDelete)
 {
         NS_ENSURE_ARG_POINTER(aCanDelete);
-        *aCanDelete = PR_TRUE;
+        *aCanDelete = true;
         return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPop3Service::GetCanDuplicate(bool *aCanDuplicate)
 {
         NS_ENSURE_ARG_POINTER(aCanDuplicate);
-        *aCanDuplicate = PR_TRUE;
+        *aCanDuplicate = true;
         return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPop3Service::GetCanGetMessages(bool *aCanGetMessages)
 {
     NS_ENSURE_ARG_POINTER(aCanGetMessages);
-    *aCanGetMessages = PR_TRUE;
+    *aCanGetMessages = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPop3Service::GetCanGetIncomingMessages(bool *aCanGetIncomingMessages)
 {
     NS_ENSURE_ARG_POINTER(aCanGetIncomingMessages);
-    *aCanGetIncomingMessages = PR_TRUE;
+    *aCanGetIncomingMessages = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPop3Service::GetShowComposeMsgLink(bool *showComposeMsgLink)
 {
     NS_ENSURE_ARG_POINTER(showComposeMsgLink);
-    *showComposeMsgLink = PR_TRUE;
+    *showComposeMsgLink = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPop3Service::GetDefaultServerPort(bool isSecure, PRInt32 *aPort)
 {
     NS_ENSURE_ARG_POINTER(aPort);
     nsresult rv = NS_OK;
--- a/mailnews/local/src/nsPop3Sink.cpp
+++ b/mailnews/local/src/nsPop3Sink.cpp
@@ -77,30 +77,30 @@
 #include "nsMsgLocalCID.h"
 
 extern PRLogModuleInfo *POP3LOGMODULE;
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsPop3Sink, nsIPop3Sink)
 
 nsPop3Sink::nsPop3Sink()
 {
-    m_authed = PR_FALSE;
-    m_downloadingToTempFile = PR_FALSE;
+    m_authed = false;
+    m_downloadingToTempFile = false;
     m_accountUrl = nsnull;
     m_biffState = 0;
     m_numNewMessages = 0;
     m_numNewMessagesInFolder = 0;
     m_numMsgsDownloaded = 0;
-    m_senderAuthed = PR_FALSE;
+    m_senderAuthed = false;
     m_outputBuffer = nsnull;
     m_outputBufferSize = 0;
     m_popServer = nsnull;
     m_outFileStream = nsnull;
-    m_uidlDownload = PR_FALSE;
-    m_buildMessageUri = PR_FALSE;
+    m_uidlDownload = false;
+    m_buildMessageUri = false;
     if (!POP3LOGMODULE)
       POP3LOGMODULE = PR_NewLogModule("POP3");
 
 }
 
 nsPop3Sink::~nsPop3Sink()
 {
     PR_Free(m_accountUrl);
@@ -193,17 +193,17 @@ nsPop3Sink::FindPartialMessages()
     msgDBHdr->GetFlags(&flags);
     if (flags & nsMsgMessageFlags::Partial)
     {
       // Open the various streams we need to seek and read from the mailbox
       if (!isOpen)
       {
         rv = localFolder->GetFolderScanState(&folderScanState);
         if (NS_SUCCEEDED(rv))
-          isOpen = PR_TRUE;
+          isOpen = true;
         else
           break;
       }
       rv = localFolder->GetUidlFromFolder(&folderScanState, msgDBHdr);
       if (!NS_SUCCEEDED(rv))
         break;
 
       // If we got the uidl, see if this partial message belongs to this
@@ -240,18 +240,18 @@ nsPop3Sink::CheckPartialMessages(nsIPop3
   for (PRUint32 i = 0; i < count; i++)
   {
     partialRecord *partialMsg;
     bool found = true;
     partialMsg = m_partialMsgsArray.ElementAt(i);
     protocol->CheckMessage(partialMsg->m_uidl.get(), &found);
     if (!found && partialMsg->m_msgDBHdr)
     {
-      m_newMailParser->m_mailDB->DeleteHeader(partialMsg->m_msgDBHdr, nsnull, PR_FALSE, PR_TRUE);
-      deleted = PR_TRUE;
+      m_newMailParser->m_mailDB->DeleteHeader(partialMsg->m_msgDBHdr, nsnull, false, true);
+      deleted = true;
     }
     delete partialMsg;
   }
   m_partialMsgsArray.Clear();
   if (deleted)
   {
     nsCOMPtr<nsIMsgLocalMailFolder> localFolder = do_QueryInterface(m_folder);
     if (localFolder)
@@ -296,17 +296,17 @@ nsPop3Sink::BeginMailDelivery(bool uidlD
 
 #ifdef DEBUG
   printf("Begin mail message delivery.\n");
 #endif
   nsCOMPtr<nsIPop3Service> pop3Service(do_GetService(NS_POP3SERVICE_CONTRACTID1, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
   pop3Service->NotifyDownloadStarted(m_folder);
   if (aBool)
-    *aBool = PR_TRUE;
+    *aBool = true;
   return NS_OK;
 }
 
 nsresult
 nsPop3Sink::EndMailDelivery(nsIPop3Protocol *protocol)
 {
   CheckPartialMessages(protocol);
 
@@ -324,45 +324,45 @@ nsPop3Sink::EndMailDelivery(nsIPop3Proto
   }
   if (m_inboxOutputStream)
   {
     m_inboxOutputStream->Close();
     m_inboxOutputStream = nsnull;
   }
 
   if (m_downloadingToTempFile)
-    m_tmpDownloadFile->Remove(PR_FALSE);
+    m_tmpDownloadFile->Remove(false);
 
   // tell the parser to mark the db valid *after* closing the mailbox.
   if (m_newMailParser)
     m_newMailParser->UpdateDBFolderInfo();
 
   PR_LOG(POP3LOGMODULE, PR_LOG_MAX, ("Calling ReleaseFolderLock from EndMailDelivery"));
   nsresult rv = ReleaseFolderLock();
   NS_ASSERTION(NS_SUCCEEDED(rv),"folder lock not released successfully");
 
   bool filtersRun;
   m_folder->CallFilterPlugins(nsnull, &filtersRun); // ??? do we need msgWindow?
   PRInt32 numNewMessagesInFolder;
   // if filters have marked msgs read or deleted, the num new messages count
   // will go negative by the number of messages marked read or deleted,
   // so if we add that number to the number of msgs downloaded, that will give
   // us the number of actual new messages.
-  m_folder->GetNumNewMessages(PR_FALSE, &numNewMessagesInFolder);
+  m_folder->GetNumNewMessages(false, &numNewMessagesInFolder);
   m_numNewMessages -= (m_numNewMessagesInFolder  - numNewMessagesInFolder);
   m_folder->SetNumNewMessages(m_numNewMessages); // we'll adjust this for spam later
   if (!filtersRun && m_numNewMessages > 0)
   {
     nsCOMPtr <nsIMsgIncomingServer> server;
     m_folder->GetServer(getter_AddRefs(server));
     if (server)
     {
-      server->SetPerformingBiff(PR_TRUE);
+      server->SetPerformingBiff(true);
       m_folder->SetBiffState(m_biffState);
-      server->SetPerformingBiff(PR_FALSE);
+      server->SetPerformingBiff(false);
     }
   }
   // note that size on disk has possibly changed.
   nsCOMPtr<nsIMsgLocalMailFolder> localFolder = do_QueryInterface(m_folder);
   if (localFolder)
     (void) localFolder->RefreshSizeOnDisk();
   nsCOMPtr<nsIMsgIncomingServer> server = do_QueryInterface(m_popServer);
   if (server)
@@ -373,17 +373,17 @@ nsPop3Sink::EndMailDelivery(nsIPop3Proto
 
     if (filterList)
       (void) filterList->FlushLogIfNecessary();
   }
 
   // fix for bug #161999
   // we should update the summary totals for the folder (inbox)
   // in case it's not the open folder
-  m_folder->UpdateSummaryTotals(PR_TRUE);
+  m_folder->UpdateSummaryTotals(true);
 
   // check if the folder open in this window is not the current folder, and if it has new
   // message, in which case we need to try to run the filter plugin.
   if (m_newMailParser)
   {
     nsCOMPtr <nsIMsgWindow> msgWindow;
     m_newMailParser->GetMsgWindow(getter_AddRefs(msgWindow));
     // this breaks down if it's biff downloading new mail because
@@ -455,17 +455,17 @@ nsPop3Sink::AbortMailDelivery(nsIPop3Pro
   }
   if (m_inboxOutputStream)
   {
     m_inboxOutputStream->Close();
     m_inboxOutputStream = nsnull;
   }
 
   if (m_downloadingToTempFile && m_tmpDownloadFile)
-    m_tmpDownloadFile->Remove(PR_FALSE);
+    m_tmpDownloadFile->Remove(false);
 
   /* tell the parser to mark the db valid *after* closing the mailbox.
   we have truncated the inbox, so berkeley mailbox and msf file are in sync*/
   if (m_newMailParser)
     m_newMailParser->UpdateDBFolderInfo();
   PR_LOG(POP3LOGMODULE, PR_LOG_MAX, ("Calling ReleaseFolderLock from AbortMailDelivery"));
 
   nsresult rv = ReleaseFolderLock();
@@ -558,17 +558,17 @@ nsPop3Sink::IncorporateBegin(const char*
   nsCOMPtr<nsISeekableStream> seekableOutStream = do_QueryInterface(m_outFileStream);
 
   // create a new mail parser
   m_newMailParser = new nsParseNewMailState;
   NS_ENSURE_TRUE(m_newMailParser, NS_ERROR_OUT_OF_MEMORY);
   if (m_uidlDownload)
     m_newMailParser->DisableFilters();
 
-  m_folder->GetNumNewMessages(PR_FALSE, &m_numNewMessagesInFolder);
+  m_folder->GetNumNewMessages(false, &m_numNewMessagesInFolder);
   nsCOMPtr <nsIMsgFolder> serverFolder;
   rv = GetServerFolder(getter_AddRefs(serverFolder));
   if (NS_FAILED(rv)) return rv;
 
   rv = m_newMailParser->Init(serverFolder, m_folder,
                              m_window, newHdr, m_outFileStream);
   // If we failed to initialize the parser, then just don't use it!!!
   // We can still continue without one.
--- a/mailnews/local/src/nsRssIncomingServer.cpp
+++ b/mailnews/local/src/nsRssIncomingServer.cpp
@@ -55,17 +55,17 @@ nsrefcnt nsRssIncomingServer::gInstanceC
 NS_IMPL_ISUPPORTS_INHERITED3(nsRssIncomingServer,
                              nsMsgIncomingServer,
                              nsIRssIncomingServer,
                              nsIMsgFolderListener,
                              nsILocalMailIncomingServer)
 
 nsRssIncomingServer::nsRssIncomingServer()
 {
-  m_canHaveFilters = PR_TRUE;
+  m_canHaveFilters = true;
 
   if (gInstanceCount == 0)
   {
     nsresult rv;
     nsCOMPtr<nsIMsgFolderNotificationService> notifyService =
       do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID, &rv);
     if (NS_SUCCEEDED(rv))
       notifyService->AddListener(this,
@@ -213,31 +213,31 @@ NS_IMETHODIMP nsRssIncomingServer::GetOf
   NS_ENSURE_ARG_POINTER(aSupportLevel);
   *aSupportLevel = OFFLINE_SUPPORT_LEVEL_NONE;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsRssIncomingServer::GetSupportsDiskSpace(bool *aSupportsDiskSpace)
 {
   NS_ENSURE_ARG_POINTER(aSupportsDiskSpace);
-  *aSupportsDiskSpace = PR_TRUE;
+  *aSupportsDiskSpace = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsRssIncomingServer::GetServerRequiresPasswordForBiff(bool *aServerRequiresPasswordForBiff)
 {
   NS_ENSURE_ARG_POINTER(aServerRequiresPasswordForBiff);
-  *aServerRequiresPasswordForBiff = PR_FALSE;  // for rss folders, we don't require a password
+  *aServerRequiresPasswordForBiff = false;  // for rss folders, we don't require a password
   return NS_OK;
 }
 
 NS_IMETHODIMP nsRssIncomingServer::GetCanSearchMessages(bool *canSearchMessages)
 {
   NS_ENSURE_ARG_POINTER(canSearchMessages);
-  *canSearchMessages = PR_TRUE;
+  *canSearchMessages = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsRssIncomingServer::MsgAdded(nsIMsgDBHdr *aMsg)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
@@ -263,32 +263,32 @@ NS_IMETHODIMP nsRssIncomingServer::MsgsM
 NS_IMETHODIMP nsRssIncomingServer::MsgKeyChanged(nsMsgKey aOldKey,
                                                  nsIMsgDBHdr *aNewHdr)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsRssIncomingServer::FolderAdded(nsIMsgFolder *aFolder)
 {
-  return FolderChanged(aFolder, PR_FALSE);
+  return FolderChanged(aFolder, false);
 }
 
 NS_IMETHODIMP nsRssIncomingServer::FolderDeleted(nsIMsgFolder *aFolder)
 {
-  return FolderChanged(aFolder, PR_TRUE);
+  return FolderChanged(aFolder, true);
 }
 
 NS_IMETHODIMP nsRssIncomingServer::FolderMoveCopyCompleted(bool aMove, nsIMsgFolder *aSrcFolder, nsIMsgFolder *aDestFolder)
 {
-  return FolderChanged(aSrcFolder, PR_FALSE);
+  return FolderChanged(aSrcFolder, false);
 }
 
 NS_IMETHODIMP nsRssIncomingServer::FolderRenamed(nsIMsgFolder *aOrigFolder, nsIMsgFolder *aNewFolder)
 {
-  return FolderChanged(aNewFolder, PR_FALSE);
+  return FolderChanged(aNewFolder, false);
 }
 
 NS_IMETHODIMP nsRssIncomingServer::ItemEvent(nsISupports *aItem, const nsACString &aEvent, nsISupports *aData)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 nsresult nsRssIncomingServer::FolderChanged(nsIMsgFolder *aFolder, bool aUnsubscribe)
--- a/mailnews/local/src/nsRssService.cpp
+++ b/mailnews/local/src/nsRssService.cpp
@@ -94,60 +94,60 @@ NS_IMETHODIMP nsRssService::GetRequiresU
 NS_IMETHODIMP nsRssService::GetPreflightPrettyNameWithEmailAddress(bool *aPreflightPrettyNameWithEmailAddress)
 {
     return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsRssService::GetCanDelete(bool *aCanDelete)
 {
     NS_ENSURE_ARG_POINTER(aCanDelete);
-    *aCanDelete = PR_TRUE;
+    *aCanDelete = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP nsRssService::GetCanLoginAtStartUp(bool *aCanLoginAtStartUp)
 {
     NS_ENSURE_ARG_POINTER(aCanLoginAtStartUp);
-    *aCanLoginAtStartUp = PR_TRUE;
+    *aCanLoginAtStartUp = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP nsRssService::GetCanDuplicate(bool *aCanDuplicate)
 {
     NS_ENSURE_ARG_POINTER(aCanDuplicate);
-    *aCanDuplicate = PR_TRUE;
+    *aCanDuplicate = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP nsRssService::GetDefaultServerPort(bool isSecure, PRInt32 *_retval)
 {
     *_retval = -1;
     return NS_OK;
 }
 
 NS_IMETHODIMP nsRssService::GetCanGetMessages(bool *aCanGetMessages)
 {
     NS_ENSURE_ARG_POINTER(aCanGetMessages);
-    *aCanGetMessages = PR_TRUE;
+    *aCanGetMessages = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP nsRssService::GetCanGetIncomingMessages(bool *aCanGetIncomingMessages)
 {
     NS_ENSURE_ARG_POINTER(aCanGetIncomingMessages);
-    *aCanGetIncomingMessages = PR_TRUE;
+    *aCanGetIncomingMessages = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP nsRssService::GetDefaultDoBiff(bool *aDefaultDoBiff)
 {
     NS_ENSURE_ARG_POINTER(aDefaultDoBiff);
     // by default, do biff for RSS feeds
-    *aDefaultDoBiff = PR_TRUE;    
+    *aDefaultDoBiff = true;    
     return NS_OK;
 }
 
 NS_IMETHODIMP nsRssService::GetShowComposeMsgLink(bool *aShowComposeMsgLink)
 {
     NS_ENSURE_ARG_POINTER(aShowComposeMsgLink);
-    *aShowComposeMsgLink = PR_FALSE;    
+    *aShowComposeMsgLink = false;    
     return NS_OK;
 }
--- a/mailnews/mapi/mapihook/src/msgMapiHook.cpp
+++ b/mailnews/mapi/mapihook/src/msgMapiHook.cpp
@@ -102,17 +102,17 @@ public:
     /* void OnStatus (in string aMsgID, in wstring aMsg); */
     NS_IMETHOD OnStatus(const char *aMsgID, const PRUnichar *aMsg) { return NS_OK;}
 
     /* void OnStopSending (in string aMsgID, in nsresult aStatus, in wstring aMsg, in nsIFile returnFile); */
     NS_IMETHOD OnStopSending(const char *aMsgID, nsresult aStatus, const PRUnichar *aMsg,
                            nsIFile *returnFile) {
         PR_CEnterMonitor(this);
         PR_CNotifyAll(this);
-        m_done = PR_TRUE;
+        m_done = true;
         PR_CExitMonitor(this);
         return NS_OK ;
     }
 
 	/* void OnSendNotPerformed */
 	NS_IMETHOD OnSendNotPerformed(const char *aMsgID, nsresult aStatus)
 	{
 		return OnStopSending(aMsgID, aStatus, nsnull, nsnull) ;
@@ -122,17 +122,17 @@ public:
     NS_IMETHOD OnGetDraftFolderURI(const char *aFolderURI) {return NS_OK;}
 
     static nsresult CreateMAPISendListener( nsIMsgSendListener **ppListener);
 
     bool IsDone() { return m_done ; }
 
 protected :
     nsMAPISendListener() {
-        m_done = PR_FALSE;
+        m_done = false;
     }
 
     bool            m_done;
 };
 
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsMAPISendListener, nsIMsgSendListener)
 
@@ -161,87 +161,87 @@ bool nsMapiHook::DisplayLoginDialog(bool
 {
   nsresult rv;
   bool btnResult = false;
 
   nsCOMPtr<nsIPromptService> dlgService(do_GetService(NS_PROMPTSERVICE_CONTRACTID, &rv));
   if (NS_SUCCEEDED(rv) && dlgService)
   {
     nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv));
-    if (NS_FAILED(rv) || !bundleService) return PR_FALSE;
+    if (NS_FAILED(rv) || !bundleService) return false;
 
     nsCOMPtr<nsIStringBundle> bundle;
     rv = bundleService->CreateBundle(MAPI_PROPERTIES_CHROME, getter_AddRefs(bundle));
-    if (NS_FAILED(rv) || !bundle) return PR_FALSE;
+    if (NS_FAILED(rv) || !bundle) return false;
 
     nsCOMPtr<nsIStringBundle> brandBundle;
     rv = bundleService->CreateBundle(
                     "chrome://branding/locale/brand.properties",
                     getter_AddRefs(brandBundle));
-    if (NS_FAILED(rv)) return PR_FALSE;
+    if (NS_FAILED(rv)) return false;
 
     nsString brandName;
     rv = brandBundle->GetStringFromName(
                        NS_LITERAL_STRING("brandFullName").get(),
                        getter_Copies(brandName));
-    if (NS_FAILED(rv)) return PR_FALSE;
+    if (NS_FAILED(rv)) return false;
 
     nsString loginTitle;
     const PRUnichar *brandStrings[] = { brandName.get() };
     NS_NAMED_LITERAL_STRING(loginTitlePropertyTag, "loginTitle");
     const PRUnichar *dTitlePropertyTag = loginTitlePropertyTag.get();
     rv = bundle->FormatStringFromName(dTitlePropertyTag, brandStrings, 1,
                                       getter_Copies(loginTitle));
-    if (NS_FAILED(rv)) return PR_FALSE;
+    if (NS_FAILED(rv)) return false;
 
     if (aLogin)
     {
       nsString loginText;
       rv = bundle->GetStringFromName(NS_LITERAL_STRING("loginTextwithName").get(),
                                      getter_Copies(loginText));
-      if (NS_FAILED(rv) || loginText.IsEmpty()) return PR_FALSE;
+      if (NS_FAILED(rv) || loginText.IsEmpty()) return false;
 
       bool dummyValue = false;
       rv = dlgService->PromptUsernameAndPassword(nsnull, loginTitle.get(),
                                                  loginText.get(), aUsername, aPassword,
                                                  nsnull, &dummyValue, &btnResult);
     }
     else
     {
       //nsString loginString;
       nsString loginText;
       const PRUnichar *userNameStrings[] = { *aUsername };
 
       NS_NAMED_LITERAL_STRING(loginTextPropertyTag, "loginText");
       const PRUnichar *dpropertyTag = loginTextPropertyTag.get();
       rv = bundle->FormatStringFromName(dpropertyTag, userNameStrings, 1,
                                         getter_Copies(loginText));
-      if (NS_FAILED(rv)) return PR_FALSE;
+      if (NS_FAILED(rv)) return false;
 
       bool dummyValue = false;
       rv = dlgService->PromptPassword(nsnull, loginTitle.get(), loginText.get(),
                                       aPassword, nsnull, &dummyValue, &btnResult);
     }
   }
 
   return btnResult;
 }
 
 bool nsMapiHook::VerifyUserName(const nsString& aUsername, nsCString& aIdKey)
 {
   nsresult rv;
 
   if (aUsername.IsEmpty())
-    return PR_FALSE;
+    return false;
 
   nsCOMPtr<nsIMsgAccountManager> accountManager(do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv));
-  if (NS_FAILED(rv)) return PR_FALSE;
+  if (NS_FAILED(rv)) return false;
   nsCOMPtr<nsISupportsArray> identities;
   rv = accountManager->GetAllIdentities(getter_AddRefs(identities));
-  if (NS_FAILED(rv)) return PR_FALSE;
+  if (NS_FAILED(rv)) return false;
   PRUint32 numIndentities;
   identities->Count(&numIndentities);
 
   for (PRUint32 i = 0; i < numIndentities; i++)
   {
     // convert supports->Identity
     nsCOMPtr<nsISupports> thisSupports;
     rv = identities->GetElementAt(i, getter_AddRefs(thisSupports));
@@ -258,62 +258,62 @@ bool nsMapiHook::VerifyUserName(const ns
       if (index != -1)
         email.SetLength(index);
 
       if (aUsername.Equals(NS_ConvertASCIItoUTF16(email)))
         return NS_SUCCEEDED(thisIdentity->GetKey(aIdKey));
     }
   }
 
-  return PR_FALSE;
+  return false;
 }
 
 bool
 nsMapiHook::IsBlindSendAllowed()
 {
   bool enabled = false;
   bool warn = true;
   nsCOMPtr<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID);
   if (prefBranch) {
       prefBranch->GetBoolPref(PREF_MAPI_WARN_PRIOR_TO_BLIND_SEND, &warn);
       prefBranch->GetBoolPref(PREF_MAPI_BLIND_SEND_ENABLED, &enabled);
   }
   if (!enabled)
-      return PR_FALSE;
+      return false;
 
   if (!warn)
-      return PR_TRUE; // Everything is okay.
+      return true; // Everything is okay.
 
   nsresult rv;
   nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv));
-  if (NS_FAILED(rv) || !bundleService) return PR_FALSE;
+  if (NS_FAILED(rv) || !bundleService) return false;
 
   nsCOMPtr<nsIStringBundle> bundle;
   rv = bundleService->CreateBundle(MAPI_PROPERTIES_CHROME, getter_AddRefs(bundle));
-  if (NS_FAILED(rv) || !bundle) return PR_FALSE;
+  if (NS_FAILED(rv) || !bundle) return false;
 
   nsString warningMsg;
   rv = bundle->GetStringFromName(NS_LITERAL_STRING("mapiBlindSendWarning").get(),
                                       getter_Copies(warningMsg));
-  if (NS_FAILED(rv)) return PR_FALSE;
+  if (NS_FAILED(rv)) return false;
 
   nsString dontShowAgainMessage;
   rv = bundle->GetStringFromName(NS_LITERAL_STRING("mapiBlindSendDontShowAgain").get(),
                                       getter_Copies(dontShowAgainMessage));
-  if (NS_FAILED(rv)) return PR_FALSE;
+  if (NS_FAILED(rv)) return false;
 
   nsCOMPtr<nsIPromptService> dlgService(do_GetService(NS_PROMPTSERVICE_CONTRACTID, &rv));
-  if (NS_FAILED(rv) || !dlgService) return PR_FALSE;
+  if (NS_FAILED(rv) || !dlgService) return false;
 
   bool continueToWarn = true;
   bool okayToContinue = false;
   dlgService->ConfirmCheck(nsnull, nsnull, warningMsg.get(), dontShowAgainMessage.get(), &continueToWarn, &okayToContinue);
 
   if (!continueToWarn && okayToContinue && prefBranch)
-    prefBranch->SetBoolPref(PREF_MAPI_WARN_PRIOR_TO_BLIND_SEND, PR_FALSE);
+    prefBranch->SetBoolPref(PREF_MAPI_WARN_PRIOR_TO_BLIND_SEND, false);
 
   return okayToContinue;
 }
 
 // this is used for Send without UI
 nsresult nsMapiHook::BlindSendMail (unsigned long aSession, nsIMsgCompFields * aCompFields)
 {
   nsresult rv = NS_OK ;
@@ -453,29 +453,29 @@ nsresult nsMapiHook::PopulateCompFields(
   aCompFields->SetCc (Cc) ;
   aCompFields->SetBcc (Bcc) ;
 
   // set subject
   if (aMessage->lpszSubject)
     aCompFields->SetSubject(NS_ConvertASCIItoUTF16(aMessage->lpszSubject));
 
   // handle attachments as File URL
-  rv = HandleAttachments (aCompFields, aMessage->nFileCount, aMessage->lpFiles, PR_TRUE) ;
+  rv = HandleAttachments (aCompFields, aMessage->nFileCount, aMessage->lpFiles, true) ;
   if (NS_FAILED(rv)) return rv ;
 
   // set body
   if (aMessage->lpszNoteText)
   {
       nsString Body;
       CopyASCIItoUTF16(aMessage->lpszNoteText, Body);
       if (Body.Last() != '\n')
         Body.AppendLiteral(CRLF);
 
       if (Body.Find("<html>") == kNotFound)
-        aCompFields->SetForcePlainText(PR_TRUE);
+        aCompFields->SetForcePlainText(true);
 
       rv = aCompFields->SetBody(Body) ;
   }
   return rv ;
 }
 
 nsresult nsMapiHook::HandleAttachments (nsIMsgCompFields * aCompFields, PRInt32 aFileCount,
                                         lpnsMapiFileDesc aFiles, BOOL aIsUnicode)
@@ -553,27 +553,27 @@ nsresult nsMapiHook::HandleAttachments (
               return rv;
 
             pTempFile->Append(leafName);
             pTempFile->Exists(&bExist);
             if (bExist)
             {
               rv = pTempFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0777);
               NS_ENSURE_SUCCESS(rv, rv);
-              pTempFile->Remove(PR_FALSE); // remove so we can copy over it.
+              pTempFile->Remove(false); // remove so we can copy over it.
               pTempFile->GetLeafName(leafName);
             }
             // copy the file to its new location and file name
             pFile->CopyTo(pTempDir, leafName);
             // point pFile to the new location of the attachment
             pFile->InitWithFile(pTempDir);
             pFile->Append(leafName);
 
             // create MsgCompose attachment object
-            attachment->SetTemporary(PR_TRUE); // this one is a temp file so set the flag for MsgCompose
+            attachment->SetTemporary(true); // this one is a temp file so set the flag for MsgCompose
 
             // now set the attachment object
             nsCAutoString pURL ;
             NS_GetURLSpecFromFile(pFile, pURL);
             attachment->SetUrl(pURL);
 
             // set the file size
             PRInt64 fileSize;
@@ -657,32 +657,32 @@ nsresult nsMapiHook::PopulateCompFieldsW
     if (platformCharSet.IsEmpty())
       platformCharSet.Assign(nsMsgI18NFileSystemCharset());
     rv = ConvertToUnicode(platformCharSet.get(), (char *) aMessage->lpszSubject, Subject);
     if (NS_FAILED(rv)) return rv;
     aCompFields->SetSubject(Subject);
   }
 
   // handle attachments as File URL
-  rv = HandleAttachments (aCompFields, aMessage->nFileCount, aMessage->lpFiles, PR_FALSE) ;
+  rv = HandleAttachments (aCompFields, aMessage->nFileCount, aMessage->lpFiles, false) ;
   if (NS_FAILED(rv)) return rv ;
 
   // set body
   if (aMessage->lpszNoteText)
   {
     nsAutoString Body ;
     if (platformCharSet.IsEmpty())
       platformCharSet.Assign(nsMsgI18NFileSystemCharset());
     rv = ConvertToUnicode(platformCharSet.get(), (char *) aMessage->lpszNoteText, Body);
     if (NS_FAILED(rv)) return rv ;
     if (Body.Last() != '\n')
       Body.AppendLiteral(CRLF);
 
     if (Body.Find("<html>") == kNotFound)
-      aCompFields->SetForcePlainText(PR_TRUE);
+      aCompFields->SetForcePlainText(true);
 
     rv = aCompFields->SetBody(Body) ;
   }
 
 #ifdef RAJIV_DEBUG
   // testing what all was set in CompFields
   printf ("To : %S \n", To.get()) ;
   printf ("CC : %S \n", Cc.get() ) ;
@@ -803,17 +803,17 @@ nsresult nsMapiHook::PopulateCompFieldsF
       nsDependentString fileNameNative(leafName.get());
       rv = pFile->CopyTo(pTempDir, fileNameNative);
       if (NS_FAILED(rv)) return rv;
 
       // now turn pTempDir into a full file path to the temp file
       pTempDir->Append(fileNameNative);
 
       // this one is a temp file so set the flag for MsgCompose
-      attachment->SetTemporary(PR_TRUE);
+      attachment->SetTemporary(true);
 
       // now set the attachment object
       nsCAutoString pURL;
       NS_GetURLSpecFromFile(pTempDir, pURL);
       attachment->SetUrl(pURL);
 
       // set the file size
       PRInt64 fileSize;
--- a/mailnews/mapi/mapihook/src/msgMapiImp.cpp
+++ b/mailnews/mapi/mapihook/src/msgMapiImp.cpp
@@ -164,26 +164,26 @@ STDMETHODIMP CMapiImp::Login(unsigned lo
                 unsigned long aFlags, unsigned long *aSessionId)
 {
     HRESULT hr = E_FAIL;
      bool bNewSession = false;
     nsCString id_key;
 
     PR_LOG(MAPI, PR_LOG_DEBUG, ("CMapiImp::Login using flags %d\n", aFlags));
     if (aFlags & MAPI_NEW_SESSION)
-        bNewSession = PR_TRUE;
+        bNewSession = true;
 
     // Check For Profile Name
     if (aLogin != nsnull && aLogin[0] != '\0')
     {
         if (!nsMapiHook::VerifyUserName(nsString(aLogin), id_key))
         {
             *aSessionId = MAPI_E_LOGIN_FAILURE;
             PR_LOG(MAPI, PR_LOG_DEBUG, ("CMapiImp::Login failed for username %s\n", aLogin));
-            NS_ASSERTION(PR_FALSE, "failed verifying user name");
+            NS_ASSERTION(false, "failed verifying user name");
             return hr;
         }
     }
     else
     {
       // get default account
       nsresult rv;
       nsCOMPtr <nsIMsgAccountManager> accountManager = 
@@ -375,30 +375,30 @@ LONG CMapiImp::InitContext(unsigned long
   *listContext = (MsgMapiListContext *) pMapiConfig->GetMapiListContext(session);
   // This is the first message
   if (!*listContext)
   {
     nsCOMPtr <nsIMsgFolder> inboxFolder;
     nsresult rv = GetDefaultInbox(getter_AddRefs(inboxFolder));
     if (NS_FAILED(rv))
     {
-      NS_ASSERTION(PR_FALSE, "in init context, no inbox");
+      NS_ASSERTION(false, "in init context, no inbox");
       return(MAPI_E_NO_MESSAGES);
     }
 
     *listContext = new MsgMapiListContext;
     if (!*listContext)
       return MAPI_E_INSUFFICIENT_MEMORY;
 
     rv = (*listContext)->OpenDatabase(inboxFolder);
     if (NS_FAILED(rv))
     {
       pMapiConfig->SetMapiListContext(session, NULL);
       delete *listContext;
-      NS_ASSERTION(PR_FALSE, "in init context, unable to open db");
+      NS_ASSERTION(false, "in init context, unable to open db");
       return MAPI_E_NO_MESSAGES;
     }
     else
       pMapiConfig->SetMapiListContext(session, *listContext);
   }
   return SUCCESS_SUCCESS;
 }
 
@@ -411,30 +411,30 @@ STDMETHODIMP CMapiImp::FindNext(unsigned
   // If this is true, then this is the first call to this FindNext function
   // and we should start the enumeration operation.
   //
 
   *lpszMessageID = '\0';
   nsMAPIConfiguration * pMapiConfig = nsMAPIConfiguration::GetMAPIConfiguration() ;
   if (!pMapiConfig) 
   {
-    NS_ASSERTION(PR_FALSE, "failed to get config in findnext");
+    NS_ASSERTION(false, "failed to get config in findnext");
     return NS_ERROR_FAILURE ;  // get the singelton obj
   }
   MsgMapiListContext *listContext;
   LONG ret = InitContext(aSession, &listContext);
   if (ret != SUCCESS_SUCCESS)
   {
-    NS_ASSERTION(PR_FALSE, "init context failed");
+    NS_ASSERTION(false, "init context failed");
     return ret;
   }
   NS_ASSERTION(listContext, "initContext returned null context");
   if (listContext)
   {
-//    NS_ASSERTION(PR_FALSE, "find next init context succeeded");
+//    NS_ASSERTION(false, "find next init context succeeded");
     nsMsgKey nextKey = listContext->GetNext();
     if (nextKey == nsMsgKey_None)
     {
       pMapiConfig->SetMapiListContext(aSession, NULL);
       delete listContext;
       return(MAPI_E_NO_MESSAGES);
     }
 
@@ -451,24 +451,24 @@ STDMETHODIMP CMapiImp::ReadMail(unsigned
                               unsigned long flFlags, unsigned long ulReserved, lpnsMapiMessage *lppMessage)
 {
   PRInt32 irv;
   nsCAutoString keyString((char *) lpszMessageID);
   PR_LOG(MAPI, PR_LOG_DEBUG, ("CMapiImp::ReadMail asking for key %s\n", (char *) lpszMessageID));
   nsMsgKey msgKey = keyString.ToInteger(&irv);
   if (irv)
   {
-    NS_ASSERTION(PR_FALSE, "invalid lpszMessageID");
+    NS_ASSERTION(false, "invalid lpszMessageID");
     return MAPI_E_INVALID_MESSAGE;
   }
   MsgMapiListContext *listContext;
   LONG ret = InitContext(aSession, &listContext);
   if (ret != SUCCESS_SUCCESS)
   {
-    NS_ASSERTION(PR_FALSE, "init context failed in ReadMail");
+    NS_ASSERTION(false, "init context failed in ReadMail");
     return ret;
   }
   *lppMessage = listContext->GetMessage (msgKey, flFlags);
   NS_ASSERTION(*lppMessage, "get message failed");
 
   return (*lppMessage) ? SUCCESS_SUCCESS : E_FAIL;
 }
 
@@ -517,17 +517,17 @@ STDMETHODIMP CMapiImp::CleanUp()
 
 
 #define           MAX_NAME_LEN    256
 
 
 MsgMapiListContext::~MsgMapiListContext ()
 {
   if (m_db)
-    m_db->Close(PR_FALSE);
+    m_db->Close(false);
 }
 
 
 nsresult MsgMapiListContext::OpenDatabase (nsIMsgFolder *folder)
 {
   nsresult dbErr = NS_ERROR_FAILURE;
   if (folder)
   {
@@ -664,17 +664,17 @@ lpnsMapiMessage MsgMapiListContext::GetM
         flFlags, (char *) message->lpszSubject,(char *) message->lpszDateReceived, author.get()) );
 
       // Convert any body text that we have locally
       if (!(flFlags & MAPI_ENVELOPE_ONLY))
         message->lpszNoteText = (char *) ConvertBodyToMapiFormat (msgHdr);
       
     }
     if (! (flFlags & (MAPI_PEEK | MAPI_ENVELOPE_ONLY)))
-      m_db->MarkRead(key, PR_TRUE, nsnull);
+      m_db->MarkRead(key, true, nsnull);
   }
   return message;
 }
 
 
 char *MsgMapiListContext::ConvertDateToMapiFormat (time_t ourTime)
 {
   char *date = (char*) CoTaskMemAlloc(32);
@@ -753,17 +753,17 @@ char *MsgMapiListContext::ConvertBodyToM
   nsCOMPtr <nsIInputStream> inputStream;
   nsCOMPtr <nsILocalFile> localFile;
   folder->GetFilePath(getter_AddRefs(localFile));
 
   nsresult rv;
   nsCOMPtr<nsIFileInputStream> fileStream = do_CreateInstance(NS_LOCALFILEINPUTSTREAM_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, nsnull);
 
-  rv = fileStream->Init(localFile,  PR_RDONLY, 0664, PR_FALSE);  //just have to read the messages
+  rv = fileStream->Init(localFile,  PR_RDONLY, 0664, false);  //just have to read the messages
   inputStream = do_QueryInterface(fileStream);
 
   if (inputStream)
   {
     nsCOMPtr <nsILineInputStream> fileLineStream = do_QueryInterface(inputStream);
     if (!fileLineStream)
       return nsnull;
     // ### really want to skip past headers...
--- a/mailnews/mapi/mapihook/src/msgMapiMain.cpp
+++ b/mailnews/mapi/mapihook/src/msgMapiMain.cpp
@@ -155,29 +155,29 @@ bool nsMAPIConfiguration::UnRegisterSess
     if (pTemp != nsnull)
     {
       if (pTemp->DecrementSession() == 0)
       {
         if (pTemp->m_pProfileName.get() != nsnull)
           m_ProfileMap.Remove(pTemp->m_pProfileName);
         m_SessionMap.Remove(aSessionID);
         sessionCount--;
-        bResult = PR_TRUE;
+        bResult = true;
       }
     }
   }
 
   PR_Unlock(m_Lock);
   return bResult;
 }
 
 bool nsMAPIConfiguration::IsSessionValid(PRUint32 aSessionID)
 {
   if (aSessionID == 0)
-    return PR_FALSE;
+    return false;
   bool retValue = false;
   PR_Lock(m_Lock);
   retValue = m_SessionMap.Get(aSessionID, NULL);
   PR_Unlock(m_Lock);
   return retValue;
 }
 
 PRUnichar *nsMAPIConfiguration::GetPassword(PRUint32 aSessionID)
--- a/mailnews/mapi/mapihook/src/msgMapiSupport.cpp
+++ b/mailnews/mapi/mapihook/src/msgMapiSupport.cpp
@@ -64,20 +64,20 @@ nsMapiSupport::Observe(nsISupports *aSub
         return InitializeMAPISupport();
 
     if (!strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID))
         return ShutdownMAPISupport();
 
     nsCOMPtr<nsIObserverService> observerService(do_GetService("@mozilla.org/observer-service;1", &rv));
     if (NS_FAILED(rv)) return rv;
  
-    rv = observerService->AddObserver(this,"profile-after-change", PR_FALSE);
+    rv = observerService->AddObserver(this,"profile-after-change", false);
     if (NS_FAILED(rv)) return rv;
 
-    rv = observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_FALSE);
+    rv = observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false);
     if (NS_FAILED(rv))  return rv;
 
     return rv;
 }
 
 
 nsMapiSupport::nsMapiSupport()
 : m_dwRegister(0),
--- a/mailnews/mime/cthandlers/smimestub/nsSMIMEStub.cpp
+++ b/mailnews/mime/cthandlers/smimestub/nsSMIMEStub.cpp
@@ -79,17 +79,17 @@ MIME_SMimeCreateContentTypeHandlerClass(
   MimeObjectClass *clazz = (MimeObjectClass *)&mimeInlineTextSMIMEStubClass;
   /*
    * Must set the superclass by hand.
    */
   if (!COM_GetmimeInlineTextClass())
     return NULL;
 
   clazz->superclass = (MimeObjectClass *)COM_GetmimeInlineTextClass();
-  initStruct->force_inline_display = PR_TRUE;
+  initStruct->force_inline_display = true;
   return clazz;
 }
 
 static int
 MimeInlineTextSMIMEStubClassInitialize(MimeInlineTextSMIMEStubClass *clazz)
 {
   MimeObjectClass *oclass = (MimeObjectClass *) clazz;
   NS_ASSERTION(!oclass->class_initialized, "1.1 <rhp@netscape.com> 28 Nov 1999 19:36");
@@ -141,17 +141,17 @@ MimeInlineTextSMIMEStub_parse_line(const
  /*
   * This routine gets fed each line of data, one at a time. We just buffer
   * it all up, to be dealt with all at once at the end.
   */
   if (!obj->output_p || !obj->options || !obj->options->output_fn)
     return 0;
 
   if (!obj->options->write_html_p)
-    return COM_MimeObject_write(obj, line, length, PR_TRUE);
+    return COM_MimeObject_write(obj, line, length, true);
 
   return 0;
 }
 
 static int
 MimeInlineTextSMIMEStub_parse_eof (MimeObject *obj, bool abort_p)
 {
   if (obj->closed_p)
@@ -168,15 +168,15 @@ MimeInlineTextSMIMEStub_parse_eof (MimeO
      )
     return 0;
 
   char* html = NULL;
   status = GenerateMessage(&html);
   if (status < 0)
     return status;
 
-  status = COM_MimeObject_write(obj, html, PL_strlen(html), PR_TRUE);
+  status = COM_MimeObject_write(obj, html, PL_strlen(html), true);
   PR_FREEIF(html);
   if (status < 0)
     return status;
 
   return 0;
 }
--- a/mailnews/mime/cthandlers/vcard/mimevcrd.cpp
+++ b/mailnews/mime/cthandlers/vcard/mimevcrd.cpp
@@ -82,17 +82,17 @@ MIME_VCardCreateContentTypeHandlerClass(
   MimeObjectClass *clazz = (MimeObjectClass *)&mimeInlineTextVCardClass;
   /*
    * Must set the superclass by hand.
    */
   if (!COM_GetmimeInlineTextClass())
     return NULL;
 
   clazz->superclass = (MimeObjectClass *)COM_GetmimeInlineTextClass();
-  initStruct->force_inline_display = PR_TRUE;
+  initStruct->force_inline_display = true;
   return clazz;
 }
 
 /*
  * Implementation of VCard clazz
  */
 static int
 MimeInlineTextVCardClassInitialize(MimeInlineTextVCardClass *clazz)
@@ -117,17 +117,17 @@ MimeInlineTextVCard_parse_begin (MimeObj
 
   /* This is a fine place to write out any HTML before the real meat begins.
   In this sample code, we tell it to start a table. */
 
   clazz = ((MimeInlineTextVCardClass *) obj->clazz);
   /* initialize vcard string to empty; */
   NS_MsgSACopy(&(clazz->vCardString), "");
 
-  obj->options->state->separator_suppressed_p = PR_TRUE;
+  obj->options->state->separator_suppressed_p = true;
   return 0;
 }
 
 char *strcpySafe (char *dest, const char *src, size_t destLength)
 {
   char *result = strncpy (dest, src, --destLength);
   dest[destLength] = '\0';
   return result;
@@ -139,17 +139,17 @@ MimeInlineTextVCard_parse_line (const ch
   // This routine gets fed each line of data, one at a time.
   char* linestring;
   MimeInlineTextVCardClass *clazz = ((MimeInlineTextVCardClass *) obj->clazz);
 
   if (!obj->output_p) return 0;
   if (!obj->options || !obj->options->output_fn) return 0;
   if (!obj->options->write_html_p)
   {
-    return COM_MimeObject_write(obj, line, length, PR_TRUE);
+    return COM_MimeObject_write(obj, line, length, true);
   }
 
   linestring = (char *) PR_MALLOC (length + 1);
   memset(linestring, 0, (length + 1));
 
   if (linestring)
   {
     strcpySafe((char *)linestring, line, length + 1);
@@ -224,33 +224,33 @@ MimeInlineTextVCard_parse_eof (MimeObjec
 
 static int EndVCard (MimeObject *obj)
 {
   int status = 0;
 
   /* Scribble HTML-ending stuff into the stream */
   char htmlFooters[32];
   PR_snprintf (htmlFooters, sizeof(htmlFooters), "</BODY>%s</HTML>%s", MSG_LINEBREAK, MSG_LINEBREAK);
-  status = COM_MimeObject_write(obj, htmlFooters, strlen(htmlFooters), PR_FALSE);
+  status = COM_MimeObject_write(obj, htmlFooters, strlen(htmlFooters), false);
 
   if (status < 0) return status;
 
   return 0;
 }
 
 static int BeginVCard (MimeObject *obj)
 {
   int status = 0;
 
   /* Scribble HTML-starting stuff into the stream */
   char htmlHeaders[32];
 
   s_unique++;
   PR_snprintf (htmlHeaders, sizeof(htmlHeaders), "<HTML>%s<BODY>%s", MSG_LINEBREAK, MSG_LINEBREAK);
-    status = COM_MimeObject_write(obj, htmlHeaders, strlen(htmlHeaders), PR_TRUE);
+    status = COM_MimeObject_write(obj, htmlHeaders, strlen(htmlHeaders), true);
 
   if (status < 0) return status;
 
   return 0;
 }
 
 
 static int WriteOutVCard (MimeObject * aMimeObj, VObject* aVcard)
@@ -274,17 +274,17 @@ static int GenerateVCardData(MimeObject 
   nsCOMPtr<nsIMsgVCardService> vCardService = do_GetService(MSGVCARDSERVICE_CONTRACT_ID);
   if (!vCardService)
       return -1;
 
   nsCAutoString vCard;
   nsCAutoString vEscCard;
   int len = 0;
 
-  vCard.Adopt(vCardService->WriteMemoryVObjects(0, &len, aVcard, PR_FALSE));
+  vCard.Adopt(vCardService->WriteMemoryVObjects(0, &len, aVcard, false));
   MsgEscapeString(vCard, nsINetUtil::ESCAPE_XALPHAS, vEscCard);
 
   // first cell in the outer table row is a clickable image which brings up the rich address book UI for the vcard
   vCardOutput += "<td valign=\"top\"> <a class=\"moz-vcard-badge\" href=\"addbook:add?action=add?vcard=";
   vCardOutput += vEscCard; // the href is the vCard
   vCardOutput += "\"></a></td>";
 
   // the 2nd cell in the outer table row is a nested table containing the actual vCard properties
@@ -295,17 +295,17 @@ static int GenerateVCardData(MimeObject 
   // close the properties table
   vCardOutput += "</table> </td> ";
 
   // 2nd  cell in the outer table is our vCard image
 
   vCardOutput += "</tr> </table>";
 
   // now write out the vCard
-  return COM_MimeObject_write(aMimeObj, (char *) vCardOutput.get(), vCardOutput.Length(), PR_TRUE);
+  return COM_MimeObject_write(aMimeObj, (char *) vCardOutput.get(), vCardOutput.Length(), true);
 }
 
 
 static int OutputBasicVcard(MimeObject *aMimeObj, VObject *aVcard, nsACString& vCardOutput)
 {
   int status = 0;
 
   VObject *prop = NULL;
--- a/mailnews/mime/emitters/src/nsEmitterUtils.cpp
+++ b/mailnews/mime/emitters/src/nsEmitterUtils.cpp
@@ -45,31 +45,31 @@
 #include "nsIURI.h"
 #include "prprf.h"
 
 
 extern "C" bool
 EmitThisHeaderForPrefSetting(PRInt32 dispType, const char *header)
 {
   if (nsMimeHeaderDisplayTypes::AllHeaders == dispType)
-    return PR_TRUE;
+    return true;
 
   if ((!header) || (!*header))
-    return PR_FALSE;
+    return false;
 
   if (nsMimeHeaderDisplayTypes::MicroHeaders == dispType)
   {
     if (
           (!strcmp(header, HEADER_SUBJECT)) ||
           (!strcmp(header, HEADER_FROM)) ||
           (!strcmp(header, HEADER_DATE))
        )
-      return PR_TRUE;
+      return true;
     else
-      return PR_FALSE;
+      return false;
   }
 
   if (nsMimeHeaderDisplayTypes::NormalHeaders == dispType)
   {
     if (
         (!strcmp(header, HEADER_DATE)) ||
         (!strcmp(header, HEADER_TO)) ||
         (!strcmp(header, HEADER_SUBJECT)) ||
@@ -84,16 +84,16 @@ EmitThisHeaderForPrefSetting(PRInt32 dis
         (!strcmp(header, HEADER_MESSAGE_ID)) ||
         (!strcmp(header, HEADER_FROM)) ||
         (!strcmp(header, HEADER_FOLLOWUP_TO)) ||
         (!strcmp(header, HEADER_CC)) ||
         (!strcmp(header, HEADER_ORGANIZATION)) ||
         (!strcmp(header, HEADER_REPLY_TO)) ||
         (!strcmp(header, HEADER_BCC))
        )
-       return PR_TRUE;
+       return true;
     else
-      return PR_FALSE;
+      return false;
   }
 
-  return PR_TRUE;
+  return true;
 }
 
--- a/mailnews/mime/emitters/src/nsMimeBaseEmitter.cpp
+++ b/mailnews/mime/emitters/src/nsMimeBaseEmitter.cpp
@@ -79,27 +79,27 @@ NS_INTERFACE_MAP_BEGIN(nsMimeBaseEmitter
    NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIMimeEmitter)
    NS_INTERFACE_MAP_ENTRY(nsIMimeEmitter)
    NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor)
 NS_INTERFACE_MAP_END
 
 nsMimeBaseEmitter::nsMimeBaseEmitter()
 {
   // Initialize data output vars...
-  mFirstHeaders = PR_TRUE;
+  mFirstHeaders = true;
 
   mBufferMgr = nsnull;
   mTotalWritten = 0;
   mTotalRead = 0;
   mInputStream = nsnull;
   mOutStream = nsnull;
   mOutListener = nsnull;
 
   // Display output control vars...
-  mDocHeader = PR_FALSE;
+  mDocHeader = false;
   m_stringBundle = nsnull;
   mURL = nsnull;
   mHeaderDisplayType = nsMimeHeaderDisplayTypes::NormalHeaders;
 
   // Setup array for attachments
   mAttachCount = 0;
   mAttachArray = new nsVoidArray();
   mCurrentAttachment = nsnull;
@@ -110,17 +110,17 @@ nsMimeBaseEmitter::nsMimeBaseEmitter()
   // Embedded Header Cache...
   mEmbeddedHeaderArray = nsnull;
 
   // HTML Header Data...
 //  mHTMLHeaders = "";
 //  mCharset = "";
 
   // Init the body...
-  mBodyStarted = PR_FALSE;
+  mBodyStarted = false;
 //  mBody = "";
 
   // This is needed for conversion of I18N Strings...
   mUnicodeConverter = do_GetService(NS_MIME_CONVERTER_CONTRACTID);
 
   if (!gMimeEmitterLogModule)
     gMimeEmitterLogModule = PR_NewLogModule("MIME");
 
@@ -721,20 +721,20 @@ nsMimeBaseEmitter::GenerateDateString(co
   nsCOMPtr<nsIPrefBranch> dateFormatPrefs;
   rv = prefs->GetBranch("mailnews.display.", getter_AddRefs(dateFormatPrefs));
   NS_ENSURE_SUCCESS(rv, rv);
 
   dateFormatPrefs->GetBoolPref("date_senders_timezone", &displaySenderTimezone);
   dateFormatPrefs->GetBoolPref("original_date", &displayOriginalDate);
   // migrate old pref to date_senders_timezone
   if (displayOriginalDate && !displaySenderTimezone)
-    dateFormatPrefs->SetBoolPref("date_senders_timezone", PR_TRUE);
+    dateFormatPrefs->SetBoolPref("date_senders_timezone", true);
 
   PRExplodedTime explodedMsgTime;
-  rv = PR_ParseTimeStringToExplodedTime(dateString, PR_FALSE, &explodedMsgTime);
+  rv = PR_ParseTimeStringToExplodedTime(dateString, false, &explodedMsgTime);
   /**
    * To determine the date format to use, comparison of current and message
    * time has to be made. If displaying in local time, both timestamps have
    * to be in local time. If displaying in senders time zone, leave the compare
    * time in that time zone.
    * Otherwise in TZ+0100 on 2009-03-12 a message from 2009-03-11T20:49-0700
    * would be displayed as "20:49 -0700" though it in fact is not from the
    * same day.
@@ -845,17 +845,17 @@ nsMimeBaseEmitter::WriteHeaderFieldHTML(
     i18nValue = strdup(value);
 
   if ( (mUnicodeConverter) && (mFormat != nsMimeOutput::nsMimeMessageSaveAs) )
   {
     nsCString tValue;
 
     // we're going to need a converter to convert
     nsresult rv = mUnicodeConverter->DecodeMimeHeaderToCharPtr(
-      i18nValue, nsnull, PR_FALSE, PR_TRUE, getter_Copies(tValue));
+      i18nValue, nsnull, false, true, getter_Copies(tValue));
     if (NS_SUCCEEDED(rv) && !tValue.IsEmpty())
       newValue = MsgEscapeHTML(tValue.get());
     else
       newValue = MsgEscapeHTML(i18nValue);
   }
   else
   {
     newValue = MsgEscapeHTML(i18nValue);
@@ -922,17 +922,17 @@ nsMimeBaseEmitter::WriteHeaderFieldHTMLP
     if (!name.IsEmpty()) {
       mHTMLHeaders.Append("<legend class=\"mimeAttachmentHeaderName\">");
       mHTMLHeaders.Append(name);
       mHTMLHeaders.Append("</legend>");
     }
     mHTMLHeaders.Append("</fieldset>");
   }
 
-  mFirstHeaders = PR_FALSE;
+  mFirstHeaders = false;
   return NS_OK;
 }
 
 nsresult
 nsMimeBaseEmitter::WriteHeaderFieldHTMLPostfix()
 {
   mHTMLHeaders.Append("<br>");
   return NS_OK;
--- a/mailnews/mime/emitters/src/nsMimeHtmlEmitter.cpp
+++ b/mailnews/mime/emitters/src/nsMimeHtmlEmitter.cpp
@@ -104,18 +104,18 @@ nsMimeStringEnumerator::GetNext(nsACStri
   return NS_OK;
 }
 
 /*
  * nsMimeHtmlEmitter definitions....
  */
 nsMimeHtmlDisplayEmitter::nsMimeHtmlDisplayEmitter() : nsMimeBaseEmitter()
 {
-  mFirst = PR_TRUE;
-  mSkipAttachment = PR_FALSE;
+  mFirst = true;
+  mSkipAttachment = false;
 }
 
 nsMimeHtmlDisplayEmitter::~nsMimeHtmlDisplayEmitter(void)
 {
 }
 
 nsresult nsMimeHtmlDisplayEmitter::Init()
 {
@@ -123,19 +123,19 @@ nsresult nsMimeHtmlDisplayEmitter::Init(
 }
 
 bool nsMimeHtmlDisplayEmitter::BroadCastHeadersAndAttachments()
 {
   // try to get a header sink if there is one....
   nsCOMPtr<nsIMsgHeaderSink> headerSink;
   nsresult rv = GetHeaderSink(getter_AddRefs(headerSink));
   if (NS_SUCCEEDED(rv) && headerSink && mDocHeader)
-    return PR_TRUE;
+    return true;
   else
-    return PR_FALSE;
+    return false;
 }
 
 nsresult
 nsMimeHtmlDisplayEmitter::WriteHeaderFieldHTMLPrefix(const nsACString &name)
 {
   if (!BroadCastHeadersAndAttachments() || (mFormat == nsMimeOutput::nsMimeMessagePrintOutput))
     return nsMimeBaseEmitter::WriteHeaderFieldHTMLPrefix(name);
   else
@@ -275,28 +275,28 @@ NS_IMETHODIMP nsMimeHtmlDisplayEmitter::
     // This needs to be here to correct the output format if we are
     // not going to broadcast headers to the XUL document.
     if (mFormat == nsMimeOutput::nsMimeMessageBodyDisplay)
       mFormat = nsMimeOutput::nsMimeMessagePrintOutput;
 
     return nsMimeBaseEmitter::WriteHTMLHeaders(name);
   }
   else
-    mFirstHeaders = PR_FALSE;
+    mFirstHeaders = false;
 
   bool bFromNewsgroups = false;
   for (PRInt32 j=0; j < mHeaderArray->Count(); j++)
   {
     headerInfoType *headerInfo = (headerInfoType *)mHeaderArray->ElementAt(j);
     if (!(headerInfo && headerInfo->name && *headerInfo->name))
       continue;
 
     if (!PL_strcasecmp("Newsgroups", headerInfo->name))
     {
-      bFromNewsgroups = PR_TRUE;
+      bFromNewsgroups = true;
       break;
     }
   }
 
   // try to get a header sink if there is one....
   nsCOMPtr<nsIMsgHeaderSink> headerSink;
   nsresult rv = GetHeaderSink(getter_AddRefs(headerSink));
 
@@ -382,55 +382,55 @@ nsMimeHtmlDisplayEmitter::StartAttachmen
     // to nsIMimeHeaderParam.decodeParameter.)
     nsString unicodeHeaderValue;
     CopyUTF8toUTF16(name, unicodeHeaderValue);
 
     headerSink->HandleAttachment(contentType, url /* was escapedUrl */,
                                  unicodeHeaderValue.get(), uriString.get(),
                                  aIsExternalAttachment);
 
-    mSkipAttachment = PR_FALSE;
+    mSkipAttachment = false;
   }
   else if (mFormat == nsMimeOutput::nsMimeMessagePrintOutput)
   {
     // then we need to deal with the attachments in the body by inserting
     // them into a table..
     rv = StartAttachmentInBody(name, contentType, url);
   }
   else
   {
     // If we don't need or cannot broadcast attachment info, just ignore it
-    mSkipAttachment = PR_TRUE;
+    mSkipAttachment = true;
     rv = NS_OK;
   }
 
   return rv;
 }
 
 // Attachment handling routines
 // Ok, we are changing the way we handle these now...It used to be that we output
 // HTML to make a clickable link, etc... but now, this should just be informational
 // and only show up during printing
 // XXX should they also show up during quoting?
 nsresult
 nsMimeHtmlDisplayEmitter::StartAttachmentInBody(const nsACString &name,
                                                 const char *contentType,
                                                 const char *url)
 {
-  mSkipAttachment = PR_FALSE;
+  mSkipAttachment = false;
 
   if ( (contentType) &&
        ((!strcmp(contentType, APPLICATION_XPKCS7_MIME)) ||
         (!strcmp(contentType, APPLICATION_PKCS7_MIME)) ||
         (!strcmp(contentType, APPLICATION_XPKCS7_SIGNATURE)) ||
         (!strcmp(contentType, APPLICATION_PKCS7_SIGNATURE)) ||
         (!strcmp(contentType, TEXT_VCARD)))
      )
   {
-     mSkipAttachment = PR_TRUE;
+     mSkipAttachment = true;
      return NS_OK;
   }
 
   if (mFirst)
   {
     UtilityWrite("<br><fieldset class=\"mimeAttachmentHeader\">");
     if (!name.IsEmpty())
     {
@@ -459,17 +459,17 @@ nsMimeHtmlDisplayEmitter::StartAttachmen
   }
 
   UtilityWrite("<tr>");
 
   UtilityWrite("<td class=\"mimeAttachmentFile\">");
   UtilityWrite(name);
   UtilityWrite("</td>");
 
-  mFirst = PR_FALSE;
+  mFirst = false;
   return NS_OK;
 }
 
 nsresult
 nsMimeHtmlDisplayEmitter::AddAttachmentField(const char *field, const char *value)
 {
   if (mSkipAttachment)
     return NS_OK;
@@ -491,32 +491,32 @@ nsMimeHtmlDisplayEmitter::AddAttachmentF
   else
   {
     // Currently, we only care about the part size.
     if (strcmp(field, HEADER_X_MOZILLA_PART_SIZE))
       return NS_OK;
 
     PRUint64 size = atoi(value);
     nsAutoString sizeString;
-    rv = FormatFileSize(size, PR_FALSE, sizeString);
+    rv = FormatFileSize(size, false, sizeString);
     UtilityWrite("<td class=\"mimeAttachmentSize\">");
     UtilityWrite(NS_ConvertUTF16toUTF8(sizeString).get());
     UtilityWrite("</td>");
   }
 
   return NS_OK;
 }
 
 nsresult
 nsMimeHtmlDisplayEmitter::EndAttachment()
 {
   if (mSkipAttachment)
     return NS_OK;
 
-  mSkipAttachment = PR_FALSE; // reset it for next attachment round
+  mSkipAttachment = false; // reset it for next attachment round
 
   if (BroadCastHeadersAndAttachments())
     return NS_OK;
 
   if (mFormat == nsMimeOutput::nsMimeMessagePrintOutput)
     UtilityWrite("</tr>");
 
   return NS_OK;
--- a/mailnews/mime/emitters/src/nsMimeXmlEmitter.cpp
+++ b/mailnews/mime/emitters/src/nsMimeXmlEmitter.cpp
@@ -93,17 +93,17 @@ nsMimeXmlEmitter::WriteXMLHeader(const c
   UtilityWrite("<?xml version=\"1.0\"?>");
 
   UtilityWriteCRLF("<?xml-stylesheet href=\"chrome://messagebody/skin/messageBody.css\" type=\"text/css\"?>");
 
   UtilityWrite("<message id=\"");
   UtilityWrite(newValue);
   UtilityWrite("\">");
 
-  mXMLHeaderStarted = PR_TRUE;
+  mXMLHeaderStarted = true;
   PR_FREEIF(newValue);
   return NS_OK;
 }
 
 nsresult
 nsMimeXmlEmitter::WriteXMLTag(const char *tagName, const char *value)
 {
   if ( (!value) || (!*value) )
--- a/mailnews/mime/src/comi18n.cpp
+++ b/mailnews/mime/src/comi18n.cpp
@@ -159,18 +159,18 @@ intlmime_encode_b(const unsigned char* i
 }
 
 
 /*      some utility function used by this file */
 static bool intlmime_only_ascii_str(const char *s)
 {
   for(; *s; s++)
     if(*s & 0x80)
-      return PR_FALSE;
-  return PR_TRUE;
+      return false;
+  return true;
 }
 
 
 #define IS_UTF8_HEADER(s, h) ((*(s) & (~(~(h) >> 1))) == (h))
 #define IS_UTF8_SUBBYTE(s) ((*(s) & 0xC0) == 0x80)
 static unsigned char * utf8_nextchar(unsigned char *str)
 {
   if (*str < 0x80)
@@ -496,33 +496,33 @@ RFC822AddressList * construct_addresslis
           *(s+1) = tmp;
         }
         continue;
       }
     }
     else if (*s == '<' || *s == '>') {
       if (!quoted && !comment) {
         if (*s == '<') {
-          angle_addr = PR_TRUE;
+          angle_addr = true;
           addrspec = s;
           if (displayname) {
             char *e = s - 1, tmp;
             while (*e == '\t' || *e == ' ')
               --e;
             tmp = *++e;
             *e = '\0';
             PR_FREEIF(list->displayname);
             list->displayname = displayname ? strdup(displayname) : nsnull;
             list->asciionly = intlmime_only_ascii_str(displayname);
             *e = tmp;
           }
         }
         else {
           char tmp;
-          angle_addr = PR_FALSE;
+          angle_addr = false;
           tmp = *(s+1);
           *(s+1) = '\0';
           PR_FREEIF(list->addrspec);
           list->addrspec = addrspec ? strdup(addrspec) : nsnull;
           *(s+1) = tmp;
         }
         continue;
       }
--- a/mailnews/mime/src/comi18n.h
+++ b/mailnews/mime/src/comi18n.h
@@ -50,18 +50,18 @@ extern "C" {
 
 /**
  * Decode MIME header to UTF-8.
  * Uses MIME_ConvertCharset if the decoded string needs a conversion.
  *
  *
  * @param header      [IN] A header to decode.
  * @param default_charset     [IN] Default charset to apply to ulabeled non-UTF-8 8bit data
- * @param override_charset    [IN] If PR_TRUE, default_charset used instead of any charset labeling other than UTF-8
- * @param eatContinuations    [IN] If PR_TRUE, unfold headers
+ * @param override_charset    [IN] If true, default_charset used instead of any charset labeling other than UTF-8
+ * @param eatContinuations    [IN] If true, unfold headers
  * @return            Decoded buffer (in C string) or return NULL if the header needs no conversion
  */
 extern "C" char *MIME_DecodeMimeHeader(const char *header, 
                                        const char *default_charset,
                                        bool override_charset,
                                        bool eatContinuations);
 
 /**
--- a/mailnews/mime/src/mimecms.cpp
+++ b/mailnews/mime/src/mimecms.cpp
@@ -101,23 +101,23 @@ typedef struct MimeCMSdata
   MimeObject *self;
   bool parent_is_encrypted_p;
   bool parent_holds_stamp_p;
   nsCOMPtr<nsIMsgSMIMEHeaderSink> smimeHeaderSink;
   
   MimeCMSdata()
   :output_fn(nsnull),
   output_closure(nsnull),
-  ci_is_encrypted(PR_FALSE),
+  ci_is_encrypted(false),
   sender_addr(nsnull),
-  decoding_failed(PR_FALSE),
+  decoding_failed(false),
   decoded_bytes(0),
   self(nsnull),
-  parent_is_encrypted_p(PR_FALSE),
-  parent_holds_stamp_p(PR_FALSE)
+  parent_is_encrypted_p(false),
+  parent_holds_stamp_p(false)
   {
   }
   
   ~MimeCMSdata()
   {
     if(sender_addr)
       PR_Free(sender_addr);
 
@@ -151,26 +151,26 @@ static void MimeCMS_content_callback (vo
 
   data->decoded_bytes += length;
 }
 
 bool MimeEncryptedCMS_encrypted_p (MimeObject *obj)
 {
   bool encrypted;
 
-  if (!obj) return PR_FALSE;
+  if (!obj) return false;
   if (mime_typep(obj, (MimeObjectClass *) &mimeEncryptedCMSClass))
   {
     MimeEncrypted *enc = (MimeEncrypted *) obj;
     MimeCMSdata *data = (MimeCMSdata *) enc->crypto_closure;
-    if (!data || !data->content_info) return PR_FALSE;
+    if (!data || !data->content_info) return false;
                 data->content_info->ContentIsEncrypted(&encrypted);
           return encrypted;
   }
-  return PR_FALSE;
+  return false;
 }
 
 // extern MimeMessageClass mimeMessageClass;      /* gag */
 
 static void ParseRFC822Addresses (const char *line, nsCString &names, nsCString &addresses)
 {
   PRUint32 numAddresses;
   nsresult res;
@@ -211,44 +211,44 @@ bool MimeCMSHeadersAndCertsMatch(nsICMSM
   /* Now compare them --
    consider it a match if the address in the cert matches either the
    address in the From or Sender field
    */
 
   /* If there is no addr in the cert at all, it can not match and we fail. */
   if (cert_addr.IsEmpty())
   {
-    match = PR_FALSE;
+    match = false;
   }
   else
   {
     if (signerCert)
     {
       if (from_addr && *from_addr)
       {
         NS_ConvertASCIItoUTF16 ucs2From(from_addr);
         if (NS_FAILED(signerCert->ContainsEmailAddress(ucs2From, &foundFrom)))
         {
-          foundFrom = PR_FALSE;
+          foundFrom = false;
         }
       }
 
       if (sender_addr && *sender_addr)
       {
         NS_ConvertASCIItoUTF16 ucs2Sender(sender_addr);
         if (NS_FAILED(signerCert->ContainsEmailAddress(ucs2Sender, &foundSender)))
         {
-          foundSender = PR_FALSE;
+          foundSender = false;
         }
       }
     }
 
     if (!foundSender && !foundFrom)
     {
-      match = PR_FALSE;
+      match = false;
     }
   }
 
   return match;
 }
 
 class nsSMimeVerificationListener : public nsISMimeVerificationListener
 {
@@ -406,46 +406,46 @@ int MIMEGetRelativeCryptoNestLevel(MimeO
     for (MimeObject *walker = obj; walker; walker = walker->parent) {
       if (aAlreadyFoundTop) {
         if (!mime_typep(walker, (MimeObjectClass *) &mimeEncryptedClass)
             && !mime_typep(walker, (MimeObjectClass *) &mimeMultipartSignedClass)) {
           ++aTopMessageNestLevel;
         }
       }
       if (!aAlreadyFoundTop && !strcmp(mime_part_address(walker), walker->options->part_to_load)) {
-        aAlreadyFoundTop = PR_TRUE;
+        aAlreadyFoundTop = true;
         aTopShownObject = walker;
       }
       if (!aAlreadyFoundTop && !walker->parent) {
         // The mime part part_to_load is not a parent of the
         // the crypto mime part passed in to this function as parameter obj.
         // That means the crypto part belongs to another branch of the mime tree.
         return -1;
       }
     }
   }
 
   bool CryptoObjectIsChildOfTopShownObject = false;
   if (!aTopShownObject) {
     // no sub part specified, top message is displayed, and
     // our crypto object is definitively a child of it
-    CryptoObjectIsChildOfTopShownObject = PR_TRUE;
+    CryptoObjectIsChildOfTopShownObject = true;
   }
 
   // if we are the child of the topmost message, aCryptoPartNestLevel == 1
   int aCryptoPartNestLevel = 0;
   if (obj) {
     for (MimeObject *walker = obj; walker; walker = walker->parent) {
       // Crypto mime objects are transparent wrt nesting.
       if (!mime_typep(walker, (MimeObjectClass *) &mimeEncryptedClass)
           && !mime_typep(walker, (MimeObjectClass *) &mimeMultipartSignedClass)) {
         ++aCryptoPartNestLevel;
       }
       if (aTopShownObject && walker->parent == aTopShownObject) {
-        CryptoObjectIsChildOfTopShownObject = PR_TRUE;
+        CryptoObjectIsChildOfTopShownObject = true;
       }
     }
   }
 
   if (!CryptoObjectIsChildOfTopShownObject) {
     return -1;
   }
 
@@ -592,25 +592,25 @@ void MimeCMSGetFromSender(MimeObject *ob
   if (!msg_headers)
     return;
 
   /* Find the names and addresses in the From and/or Sender fields.
    */
   char *s;
 
   /* Extract the name and address of the "From:" field. */
-  s = MimeHeaders_get(msg_headers, HEADER_FROM, PR_FALSE, PR_FALSE);
+  s = MimeHeaders_get(msg_headers, HEADER_FROM, false, false);
   if (s)
     {
     ParseRFC822Addresses(s, from_name, from_addr);
     PR_FREEIF(s);
     }
 
   /* Extract the name and address of the "Sender:" field. */
-  s = MimeHeaders_get(msg_headers, HEADER_SENDER, PR_FALSE, PR_FALSE);
+  s = MimeHeaders_get(msg_headers, HEADER_SENDER, false, false);
   if (s)
     {
     ParseRFC822Addresses(s, sender_name, sender_addr);
     PR_FREEIF(s);
     }
 }
 
 void MimeCMSRequestAsyncSignatureVerification(nsICMSMessage *aCMSMsg,
@@ -693,17 +693,17 @@ MimeCMS_eof (void *crypto_closure, bool 
       // the final summary, probably we got truncated data.
       status = nsICMSMessageErrors::ENCRYPT_INCOMPLETE;
     }
 
     // Although a CMS message could be either encrypted or opaquely signed,
     // what we see is most likely encrypted, because if it were
     // signed only, we probably would have been able to decode it.
 
-    data->ci_is_encrypted = PR_TRUE;
+    data->ci_is_encrypted = true;
   }
   else
   {
     rv = data->content_info->ContentIsEncrypted(&data->ci_is_encrypted);
 
     if (NS_SUCCEEDED(rv) && data->ci_is_encrypted) {
       data->content_info->GetEncryptionCert(getter_AddRefs(certOfInterest));
     }
--- a/mailnews/mime/src/mimecont.cpp
+++ b/mailnews/mime/src/mimecont.cpp
@@ -90,19 +90,19 @@ static void
 MimeContainer_finalize (MimeObject *object)
 {
   MimeContainer *cont = (MimeContainer *) object;
 
   /* Do this first so that children have their parse_eof methods called
    in forward order (0-N) but are destroyed in backward order (N-0)
    */
   if (!object->closed_p)
-  object->clazz->parse_eof (object, PR_FALSE);
+  object->clazz->parse_eof (object, false);
   if (!object->parsed_p)
-  object->clazz->parse_end (object, PR_FALSE);
+  object->clazz->parse_end (object, false);
 
   if (cont->children)
   {
     int i;
     for (i = cont->nchildren-1; i >= 0; i--)
     {
       MimeObject *kid = cont->children[i];
       if (kid)
@@ -201,17 +201,17 @@ MimeContainer_add_child (MimeObject *par
   child->options = parent->options;
 
   return 0;
 }
 
 static bool
 MimeContainer_displayable_inline_p (MimeObjectClass *clazz, MimeHeaders *hdrs)
 {
-  return PR_TRUE;
+  return true;
 }
 
 
 #if defined(DEBUG) && defined(XP_UNIX)
 static int
 MimeContainer_debug_print (MimeObject *obj, PRFileDesc *stream, PRInt32 depth)
 {
   MimeContainer *cont = (MimeContainer *) obj;
--- a/mailnews/mime/src/mimecryp.cpp
+++ b/mailnews/mime/src/mimecryp.cpp
@@ -202,17 +202,17 @@ MimeEncrypted_parse_eof (MimeObject *obj
   NS_ASSERTION(!obj->parsed_p, "1.2 <mscott@netscape.com> 01 Nov 2001 17:59");
 
   /* (Duplicated from MimeLeaf, see comments in mimecryp.h.)
      Close off the decoder, to cause it to give up any buffered data that
    it is still holding.
    */
   if (enc->decoder_data)
   {
-    int status = MimeDecoderDestroy(enc->decoder_data, PR_FALSE);
+    int status = MimeDecoderDestroy(enc->decoder_data, false);
     enc->decoder_data = 0;
     if (status < 0) return status;
   }
 
 
   /* If there is still data in the ibuffer, that means that the last
    *decrypted* line of this part didn't end in a newline; so push it out
    anyway (this means that the parse_line method will be called with a
@@ -220,17 +220,17 @@ MimeEncrypted_parse_eof (MimeObject *obj
   if (!abort_p &&
     obj->ibuffer_fp > 0)
   {
     int status = MimeHandleDecryptedOutputLine (obj->ibuffer,
                           obj->ibuffer_fp, obj);
     obj->ibuffer_fp = 0;
     if (status < 0)
     {
-      obj->closed_p = PR_TRUE;
+      obj->closed_p = true;
       return status;
     }
   }
 
 
   /* Now run the superclass's parse_eof, which (because we've already taken
    care of ibuffer in a way appropriate for this class, immediately above)
    will ony set closed_p to true.
@@ -289,32 +289,32 @@ MimeEncrypted_cleanup (MimeObject *obj, 
     ((MimeEncryptedClass *) obj->clazz)->crypto_free (enc->crypto_closure);
     enc->crypto_closure = 0;
   }
 
   /* (Duplicated from MimeLeaf, see comments in mimecryp.h.)
    Free the decoder data, if it's still around. */
   if (enc->decoder_data)
   {
-    MimeDecoderDestroy(enc->decoder_data, PR_TRUE);
+    MimeDecoderDestroy(enc->decoder_data, true);
     enc->decoder_data = 0;
   }
 
   if (enc->hdrs)
   {
     MimeHeaders_free(enc->hdrs);
     enc->hdrs = 0;
   }
 }
 
 
 static void
 MimeEncrypted_finalize (MimeObject *obj)
 {
-  MimeEncrypted_cleanup (obj, PR_TRUE);
+  MimeEncrypted_cleanup (obj, true);
   ((MimeObjectClass*)&MIME_SUPERCLASS)->finalize (obj);
 }
 
 
 static int
 MimeHandleDecryptedOutput (const char *buf, PRInt32 buf_size,
                void *output_closure)
 {
@@ -331,17 +331,17 @@ MimeHandleDecryptedOutput (const char *b
    blank line, as usual) and will then handle the included data as
    appropriate.
    */
   MimeObject *obj = (MimeObject *) output_closure;
 
   /* Is it truly safe to use ibuffer here?  I think so... */
   return mime_LineBuffer (buf, buf_size,
              &obj->ibuffer, &obj->ibuffer_size, &obj->ibuffer_fp,
-             PR_TRUE,
+             true,
              ((int (*) (char *, PRInt32, void *))
               /* This cast is to turn void into MimeObject */
               MimeHandleDecryptedOutputLine),
              obj);
 }
 
 static int
 MimeHandleDecryptedOutputLine (char *line, PRInt32 length, MimeObject *obj)
@@ -355,17 +355,17 @@ MimeHandleDecryptedOutputLine (char *lin
   if (!line || !*line) return -1;
 
   /* If we're supposed to write this object, but aren't supposed to convert
    it to HTML, simply pass it through unaltered. */
   if (obj->output_p &&
     obj->options &&
     !obj->options->write_html_p &&
     obj->options->output_fn)
-  return MimeObject_write(obj, line, length, PR_TRUE);
+  return MimeObject_write(obj, line, length, true);
 
   /* If we already have a child object in the buffer, then we're done parsing
    headers, and all subsequent lines get passed to the inferior object
    without further processing by us.  (Our parent will stop feeding us
    lines when this MimeMessage part is out of data.)
    */
   if (enc->part_buffer)
   return MimePartBufferWrite (enc->part_buffer, line, length);
@@ -444,25 +444,25 @@ MimeEncrypted_emit_buffered_child(MimeOb
    object, we only emit the HTML once (since the normal way of encrypting
    and signing is to nest the signature inside the crypto envelope.)
    */
   if (enc->crypto_closure &&
     obj->options &&
     obj->options->headers != MimeHeadersCitation &&
     obj->options->write_html_p &&
     obj->options->output_fn)
-    // && !mime_crypto_object_p(enc->hdrs, PR_TRUE)) // XXX fix later XXX //
+    // && !mime_crypto_object_p(enc->hdrs, true)) // XXX fix later XXX //
   {
     char *html;
 #if 0 // XXX Fix this later XXX //
     char *html = (((MimeEncryptedClass *) obj->clazz)->crypto_generate_html
           (enc->crypto_closure));
     if (!html) return -1; /* MK_OUT_OF_MEMORY? */
 
-    status = MimeObject_write(obj, html, strlen(html), PR_FALSE);
+    status = MimeObject_write(obj, html, strlen(html), false);
     PR_FREEIF(html);
     if (status < 0) return status;
 #endif
 
     /* Now that we have written out the crypto stamp, the outermost header
      block is well and truly closed.  If this is in fact the outermost
      message, then run the post_header_html_fn now.
      */
@@ -474,20 +474,20 @@ MimeEncrypted_emit_buffered_child(MimeOb
       MimeHeaders *outer_headers = nsnull;
       MimeObject *p;
       for (p = obj; p->parent; p = p->parent)
         outer_headers = p->headers;
       NS_ASSERTION(obj->options->state->first_data_written_p, "1.2 <mscott@netscape.com> 01 Nov 2001 17:59");
       html = obj->options->generate_post_header_html_fn(NULL,
                           obj->options->html_closure,
                               outer_headers);
-      obj->options->state->post_header_html_run_p = PR_TRUE;
+      obj->options->state->post_header_html_run_p = true;
       if (html)
       {
-        status = MimeObject_write(obj, html, strlen(html), PR_FALSE);
+        status = MimeObject_write(obj, html, strlen(html), false);
         PR_FREEIF(html);
         if (status < 0) return status;
       }
     }
   }
   else if (enc->crypto_closure &&
        obj->options &&
      obj->options->decrypt_p)
@@ -499,23 +499,23 @@ MimeEncrypted_emit_buffered_child(MimeOb
      whether it was encrypted or not is tied up with generating HTML,
      but oh well. */
     char *html = (((MimeEncryptedClass *) obj->clazz)->crypto_generate_html
           (enc->crypto_closure));
     PR_FREEIF(html);
   }
 
   if (enc->hdrs)
-  ct = MimeHeaders_get (enc->hdrs, HEADER_CONTENT_TYPE, PR_TRUE, PR_FALSE);
+  ct = MimeHeaders_get (enc->hdrs, HEADER_CONTENT_TYPE, true, false);
   body = mime_create((ct ? ct : TEXT_PLAIN), enc->hdrs, obj->options);
 
 #ifdef MIME_DRAFTS
   if (obj->options->decompose_file_p) {
   if (mime_typep (body, (MimeObjectClass*) &mimeMultipartClass) )
-    obj->options->is_multipart_msg = PR_TRUE;
+    obj->options->is_multipart_msg = true;
   else if (obj->options->decompose_file_init_fn)
     obj->options->decompose_file_init_fn(obj->options->stream_closure,
                        enc->hdrs);
   }
 #endif /* MIME_DRAFTS */
 
   PR_FREEIF(ct);
 
@@ -534,26 +534,26 @@ MimeEncrypted_emit_buffered_child(MimeOb
 
   /* If this object (or the parent) is being output, then by definition
    the child is as well.  (This is only necessary because this is such
    a funny sort of container...)
    */
   if (!body->output_p &&
     (obj->output_p ||
      (obj->parent && obj->parent->output_p)))
-  body->output_p = PR_TRUE;
+  body->output_p = true;
 
   /* If the body is being written raw (not as HTML) then make sure to
    write its headers as well. */
   if (body->output_p && obj->output_p && !obj->options->write_html_p)
   {
-    status = MimeObject_write(body, "", 0, PR_FALSE);  /* initialize */
+    status = MimeObject_write(body, "", 0, false);  /* initialize */
     if (status < 0) return status;
     status = MimeHeaders_write_raw_headers(body->headers, obj->options,
-                       PR_FALSE);
+                       false);
     if (status < 0) return status;
   }
 
   if (enc->part_buffer)  /* part_buffer is 0 for 0-length encrypted data. */
 
 #ifdef MIME_DRAFTS
     if (obj->options->decompose_file_p && !obj->options->is_multipart_msg)
     status = MimePartBufferRead(enc->part_buffer,
@@ -570,27 +570,27 @@ MimeEncrypted_emit_buffered_child(MimeOb
                    argument into `MimeObject'. */
                  ((nsresult (*) (const char *, PRInt32, void *))
                  body->clazz->parse_buffer),
                 body);
   if (status < 0) return status;
 
   /* The child has been fully processed.  Close it off.
    */
-  status = body->clazz->parse_eof(body, PR_FALSE);
+  status = body->clazz->parse_eof(body, false);
   if (status < 0) return status;
 
-  status = body->clazz->parse_end(body, PR_FALSE);
+  status = body->clazz->parse_end(body, false);
   if (status < 0) return status;
 
 #ifdef MIME_DRAFTS
   if (obj->options->decompose_file_p && !obj->options->is_multipart_msg)
     obj->options->decompose_file_close_fn(obj->options->stream_closure);
 #endif /* MIME_DRAFTS */
 
   /* Put out a separator after every encrypted object. */
   status = MimeObject_write_separator(obj);
   if (status < 0) return status;
 
-  MimeEncrypted_cleanup (obj, PR_FALSE);
+  MimeEncrypted_cleanup (obj, false);
 
   return 0;
 }
--- a/mailnews/mime/src/mimedrft.cpp
+++ b/mailnews/mime/src/mimedrft.cpp
@@ -100,18 +100,18 @@ nsresult            mime_decompose_file_
 extern int          MimeHeaders_build_heads_list(MimeHeaders *hdrs);
 
 // CID's
 static NS_DEFINE_CID(kCMsgComposeServiceCID,  NS_MSGCOMPOSESERVICE_CID);
 
 mime_draft_data::mime_draft_data() : url_name(nsnull), format_out(0),
   stream(nsnull), obj(nsnull), options(nsnull), headers(nsnull),
   messageBody(nsnull), curAttachment(nsnull),
-  decoder_data(nsnull), mailcharset(nsnull), forwardInline(PR_FALSE),
-  forwardInlineFilter(PR_FALSE), overrideComposeFormat(PR_FALSE),
+  decoder_data(nsnull), mailcharset(nsnull), forwardInline(false),
+  forwardInlineFilter(false), overrideComposeFormat(false),
   originalMsgURI(nsnull)
 {
 }
 ////////////////////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////////////////////
 // THIS SHOULD ALL MOVE TO ANOTHER FILE AFTER LANDING!
 ////////////////////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////////////////////
@@ -218,17 +218,17 @@ nsresult CreateComposeParams(nsCOMPtr<ns
         if (NS_SUCCEEDED(rv) && attachment)
         {
           nsAutoString nameStr;
           rv = ConvertToUnicode("UTF-8", curAttachment->m_realName.get(), nameStr);
           if (NS_FAILED(rv))
             CopyASCIItoUTF16(curAttachment->m_realName, nameStr);
           attachment->SetName(nameStr);
           attachment->SetUrl(spec);
-          attachment->SetTemporary(PR_TRUE);
+          attachment->SetTemporary(true);
           attachment->SetContentType(curAttachment->m_realType.get());
           attachment->SetMacType(curAttachment->m_xMacType.get());
           attachment->SetMacCreator(curAttachment->m_xMacCreator.get());
           attachment->SetSize(curAttachment->m_size);
           compFields->AddAttachment(attachment);
         }
       }
       curAttachment++;
@@ -364,17 +364,17 @@ CreateCompositionFields(const char      
   nsAutoString outString;
 
   if (from) {
     ConvertRawBytesToUTF16(from, charset, outString);
     cFields->SetFrom(outString);
   }
 
   if (subject) {
-    val = MIME_DecodeMimeHeader(subject, charset, PR_FALSE, PR_TRUE);
+    val = MIME_DecodeMimeHeader(subject, charset, false, true);
     cFields->SetSubject(NS_ConvertUTF8toUTF16(val ? val : subject));
     PR_FREEIF(val);
   }
 
   if (reply_to) {
     ConvertRawBytesToUTF16(reply_to, charset, outString);
     cFields->SetReplyTo(outString);
   }
@@ -390,65 +390,65 @@ CreateCompositionFields(const char      
   }
 
   if (bcc) {
     ConvertRawBytesToUTF16(bcc, charset, outString);
     cFields->SetBcc(outString);
   }
 
   if (fcc) {
-    val = MIME_DecodeMimeHeader(fcc, charset, PR_FALSE, PR_TRUE);
+    val = MIME_DecodeMimeHeader(fcc, charset, false, true);
     cFields->SetFcc(NS_ConvertUTF8toUTF16(val ? val : fcc));
     PR_FREEIF(val);
   }
 
   if (newsgroups) {
     // fixme: the newsgroups header had better be decoded using the server-side
     // character encoding,but this |charset| might be different from it.
-    val = MIME_DecodeMimeHeader(newsgroups, charset, PR_FALSE, PR_TRUE);
+    val = MIME_DecodeMimeHeader(newsgroups, charset, false, true);
     cFields->SetNewsgroups(NS_ConvertUTF8toUTF16(val ? val : newsgroups));
     PR_FREEIF(val);
   }
 
   if (followup_to) {
-    val = MIME_DecodeMimeHeader(followup_to, charset, PR_FALSE, PR_TRUE);
+    val = MIME_DecodeMimeHeader(followup_to, charset, false, true);
     cFields->SetFollowupTo(NS_ConvertUTF8toUTF16(val ? val : followup_to));
     PR_FREEIF(val);
   }
 
   if (organization) {
-    val = MIME_DecodeMimeHeader(organization, charset, PR_FALSE, PR_TRUE);
+    val = MIME_DecodeMimeHeader(organization, charset, false, true);
     cFields->SetOrganization(NS_ConvertUTF8toUTF16(val ? val : organization));
     PR_FREEIF(val);
   }
 
   if (references) {
-    val = MIME_DecodeMimeHeader(references, charset, PR_FALSE, PR_TRUE);
+    val = MIME_DecodeMimeHeader(references, charset, false, true);
     cFields->SetReferences(val ? val : references);
     PR_FREEIF(val);
   }
 
   if (other_random_headers) {
-    val = MIME_DecodeMimeHeader(other_random_headers, charset, PR_FALSE, PR_TRUE);
+    val = MIME_DecodeMimeHeader(other_random_headers, charset, false, true);
     cFields->SetOtherRandomHeaders(NS_ConvertUTF8toUTF16(val ? val : other_random_headers));
     PR_FREEIF(val);
   }
 
   if (priority) {
-    val = MIME_DecodeMimeHeader(priority, charset, PR_FALSE, PR_TRUE);
+    val = MIME_DecodeMimeHeader(priority, charset, false, true);
     nsMsgPriorityValue priorityValue;
     NS_MsgGetPriorityFromString(val ? val : priority, priorityValue);
     PR_FREEIF(val);
     nsCAutoString priorityName;
     NS_MsgGetUntranslatedPriorityName(priorityValue, priorityName);
     cFields->SetPriority(priorityName.get());
   }
 
   if (newspost_url) {
-    val = MIME_DecodeMimeHeader(newspost_url, charset, PR_FALSE, PR_TRUE);
+    val = MIME_DecodeMimeHeader(newspost_url, charset, false, true);
     cFields->SetNewspostUrl(val ? val : newspost_url);
     PR_FREEIF(val);
   }
 
   *_retval = cFields;
   NS_IF_ADDREF(*_retval);
 
   return rv;
@@ -483,17 +483,17 @@ mime_free_attachments(nsTArray<nsMsgAtta
 {
   if (attachments.Length() <= 0)
     return;
 
   for (int i = 0; i < attachments.Length(); i++)
   {
     if (attachments[i]->m_tmpFile)
     {
-      attachments[i]->m_tmpFile->Remove(PR_FALSE);
+      attachments[i]->m_tmpFile->Remove(false);
       attachments[i]->m_tmpFile = nsnull;
     }
     delete attachments[i];
   }
 }
 
 static nsMsgAttachmentData *
 mime_draft_process_attachments(mime_draft_data *mdd)
@@ -505,17 +505,17 @@ mime_draft_process_attachments(mime_draf
   nsMsgAttachedFile           *tmpFile = NULL;
 
   //It's possible we must treat the message body as attachment!
   bool bodyAsAttachment = false;
   if (  mdd->messageBody &&
         mdd->messageBody->m_type.Find("text/html", CaseInsensitiveCompare) == -1 &&
         mdd->messageBody->m_type.Find("text/plain", CaseInsensitiveCompare) == -1 &&
         mdd->messageBody->m_type.Find("text", CaseInsensitiveCompare) == -1)
-     bodyAsAttachment = PR_TRUE;
+     bodyAsAttachment = true;
 
   if (!mdd->attachments.Length() && !bodyAsAttachment)
     return nsnull;
 
   PRInt32 totalCount = mdd->attachments.Length();
   if (bodyAsAttachment)
     totalCount++;
   attachData = new nsMsgAttachmentData[totalCount + 1];
@@ -625,18 +625,18 @@ mime_intl_insert_message_header_1(char  
   if (htmlEdit)
   {
     NS_MsgSACat(body, HEADER_MIDDLE_JUNK);
   }
   else
     NS_MsgSACat(body, ": ");
 
     // MIME decode header
-    char* utf8 = MIME_DecodeMimeHeader(*hdr_value, mailcharset, PR_FALSE,
-                                       PR_TRUE);
+    char* utf8 = MIME_DecodeMimeHeader(*hdr_value, mailcharset, false,
+                                       true);
     if (NULL != utf8) {
         NS_MsgSACat(body, utf8);
         PR_Free(utf8);
     } else {
         NS_MsgSACat(body, *hdr_value); // raw MIME encoded string
     }
 
   if (htmlEdit)
@@ -661,17 +661,17 @@ MimeGetNamedString(PRInt32 id)
 /* given an address string passed though parameter "address", this one will be converted
    and returned through the same parameter. The original string will be destroyed
 */
 static void UnquoteMimeAddress(nsIMsgHeaderParser* parser, char** address)
 {
   if (parser && address && *address && **address)
   {
     char *result;
-    if (NS_SUCCEEDED(parser->UnquotePhraseOrAddr(*address, PR_FALSE, &result)))
+    if (NS_SUCCEEDED(parser->UnquotePhraseOrAddr(*address, false, &result)))
     {
       if (result && *result)
       {
         PR_Free(*address);
         *address = result;
         return;
       }
       PR_FREEIF(result);
@@ -694,17 +694,17 @@ mime_insert_all_headers(char            
   char *html_tag = nsnull;
   if (*body)
     html_tag = PL_strcasestr(*body, "<HTML>");
   int i;
 
   if (!headers->done_p)
   {
     MimeHeaders_build_heads_list(headers);
-    headers->done_p = PR_TRUE;
+    headers->done_p = true;
   }
 
   if (htmlEdit)
   {
     NS_MsgSACopy(&(newBody), "<HTML><BODY><BR><BR>");
 
     NS_MsgSACat(&newBody, MimeGetNamedString(MIME_FORWARDED_MESSAGE_HTML_USER_WROTE));
     NS_MsgSACat(&newBody, MIME_HEADER_TABLE);
@@ -816,41 +816,41 @@ mime_insert_all_headers(char            
 
 static void
 mime_insert_normal_headers(char             **body,
                            MimeHeaders      *headers,
                            MSG_ComposeFormat  composeFormat,
                            char             *mailcharset)
 {
   char *newBody = nsnull;
-  char *subject = MimeHeaders_get(headers, HEADER_SUBJECT, PR_FALSE, PR_FALSE);
-  char *resent_comments = MimeHeaders_get(headers, HEADER_RESENT_COMMENTS, PR_FALSE, PR_FALSE);
-  char *resent_date = MimeHeaders_get(headers, HEADER_RESENT_DATE, PR_FALSE, PR_TRUE);
-  char *resent_from = MimeHeaders_get(headers, HEADER_RESENT_FROM, PR_FALSE, PR_TRUE);
-  char *resent_to = MimeHeaders_get(headers, HEADER_RESENT_TO, PR_FALSE, PR_TRUE);
-  char *resent_cc = MimeHeaders_get(headers, HEADER_RESENT_CC, PR_FALSE, PR_TRUE);
-  char *date = MimeHeaders_get(headers, HEADER_DATE, PR_FALSE, PR_TRUE);
-  char *from = MimeHeaders_get(headers, HEADER_FROM, PR_FALSE, PR_TRUE);
-  char *reply_to = MimeHeaders_get(headers, HEADER_REPLY_TO, PR_FALSE, PR_TRUE);
-  char *organization = MimeHeaders_get(headers, HEADER_ORGANIZATION, PR_FALSE, PR_FALSE);
-  char *to = MimeHeaders_get(headers, HEADER_TO, PR_FALSE, PR_TRUE);
-  char *cc = MimeHeaders_get(headers, HEADER_CC, PR_FALSE, PR_TRUE);
-  char *newsgroups = MimeHeaders_get(headers, HEADER_NEWSGROUPS, PR_FALSE, PR_TRUE);
-  char *followup_to = MimeHeaders_get(headers, HEADER_FOLLOWUP_TO, PR_FALSE, PR_TRUE);
-  char *references = MimeHeaders_get(headers, HEADER_REFERENCES, PR_FALSE, PR_TRUE);
+  char *subject = MimeHeaders_get(headers, HEADER_SUBJECT, false, false);
+  char *resent_comments = MimeHeaders_get(headers, HEADER_RESENT_COMMENTS, false, false);
+  char *resent_date = MimeHeaders_get(headers, HEADER_RESENT_DATE, false, true);
+  char *resent_from = MimeHeaders_get(headers, HEADER_RESENT_FROM, false, true);
+  char *resent_to = MimeHeaders_get(headers, HEADER_RESENT_TO, false, true);
+  char *resent_cc = MimeHeaders_get(headers, HEADER_RESENT_CC, false, true);
+  char *date = MimeHeaders_get(headers, HEADER_DATE, false, true);
+  char *from = MimeHeaders_get(headers, HEADER_FROM, false, true);
+  char *reply_to = MimeHeaders_get(headers, HEADER_REPLY_TO, false, true);
+  char *organization = MimeHeaders_get(headers, HEADER_ORGANIZATION, false, false);
+  char *to = MimeHeaders_get(headers, HEADER_TO, false, true);
+  char *cc = MimeHeaders_get(headers, HEADER_CC, false, true);
+  char *newsgroups = MimeHeaders_get(headers, HEADER_NEWSGROUPS, false, true);
+  char *followup_to = MimeHeaders_get(headers, HEADER_FOLLOWUP_TO, false, true);
+  char *references = MimeHeaders_get(headers, HEADER_REFERENCES, false, true);
   const char *html_tag = nsnull;
   if (*body)
     html_tag = PL_strcasestr(*body, "<HTML>");
   bool htmlEdit = composeFormat == nsIMsgCompFormat::HTML;
 
   if (!from)
-    from = MimeHeaders_get(headers, HEADER_SENDER, PR_FALSE, PR_TRUE);
+    from = MimeHeaders_get(headers, HEADER_SENDER, false, true);
   if (!resent_from)
-    resent_from = MimeHeaders_get(headers, HEADER_RESENT_SENDER, PR_FALSE,
-                    PR_TRUE);
+    resent_from = MimeHeaders_get(headers, HEADER_RESENT_SENDER, false,
+                    true);
 
   nsCOMPtr<nsIMsgHeaderParser> parser = do_GetService(NS_MAILNEWS_MIME_HEADER_PARSER_CONTRACTID);
   UnquoteMimeAddress(parser, &resent_from);
   UnquoteMimeAddress(parser, &resent_to);
   UnquoteMimeAddress(parser, &resent_cc);
   UnquoteMimeAddress(parser, &reply_to);
   UnquoteMimeAddress(parser, &from);
   UnquoteMimeAddress(parser, &to);
@@ -1007,37 +1007,37 @@ mime_insert_normal_headers(char         
 
 static void
 mime_insert_micro_headers(char            **body,
                           MimeHeaders     *headers,
                           MSG_ComposeFormat composeFormat,
                           char            *mailcharset)
 {
   char *newBody = NULL;
-  char *subject = MimeHeaders_get(headers, HEADER_SUBJECT, PR_FALSE, PR_FALSE);
-  char *from = MimeHeaders_get(headers, HEADER_FROM, PR_FALSE, PR_TRUE);
-  char *resent_from = MimeHeaders_get(headers, HEADER_RESENT_FROM, PR_FALSE,
-                    PR_TRUE);
-  char *date = MimeHeaders_get(headers, HEADER_DATE, PR_FALSE, PR_TRUE);
-  char *to = MimeHeaders_get(headers, HEADER_TO, PR_FALSE, PR_TRUE);
-  char *cc = MimeHeaders_get(headers, HEADER_CC, PR_FALSE, PR_TRUE);
-  char *newsgroups = MimeHeaders_get(headers, HEADER_NEWSGROUPS, PR_FALSE,
-                     PR_TRUE);
+  char *subject = MimeHeaders_get(headers, HEADER_SUBJECT, false, false);
+  char *from = MimeHeaders_get(headers, HEADER_FROM, false, true);
+  char *resent_from = MimeHeaders_get(headers, HEADER_RESENT_FROM, false,
+                    true);
+  char *date = MimeHeaders_get(headers, HEADER_DATE, false, true);
+  char *to = MimeHeaders_get(headers, HEADER_TO, false, true);
+  char *cc = MimeHeaders_get(headers, HEADER_CC, false, true);
+  char *newsgroups = MimeHeaders_get(headers, HEADER_NEWSGROUPS, false,
+                     true);
   const char *html_tag = nsnull;
   if (*body)
     html_tag = PL_strcasestr(*body, "<HTML>");
   bool htmlEdit = composeFormat == nsIMsgCompFormat::HTML;
 
   if (!from)
-    from = MimeHeaders_get(headers, HEADER_SENDER, PR_FALSE, PR_TRUE);
+    from = MimeHeaders_get(headers, HEADER_SENDER, false, true);
   if (!resent_from)
-    resent_from = MimeHeaders_get(headers, HEADER_RESENT_SENDER, PR_FALSE,
-                    PR_TRUE);
+    resent_from = MimeHeaders_get(headers, HEADER_RESENT_SENDER, false,
+                    true);
   if (!date)
-    date = MimeHeaders_get(headers, HEADER_RESENT_DATE, PR_FALSE, PR_TRUE);
+    date = MimeHeaders_get(headers, HEADER_RESENT_DATE, false, true);
 
   nsCOMPtr<nsIMsgHeaderParser> parser = do_GetService(NS_MAILNEWS_MIME_HEADER_PARSER_CONTRACTID);
   UnquoteMimeAddress(parser, &resent_from);
   UnquoteMimeAddress(parser, &from);
   UnquoteMimeAddress(parser, &to);
   UnquoteMimeAddress(parser, &cc);
 
   if (htmlEdit)
@@ -1198,18 +1198,18 @@ mime_parse_stream_complete (nsMIMESessio
   NS_ASSERTION (mdd, "null mime draft data");
 
   if (!mdd) return;
 
   if (mdd->obj)
   {
     int status;
 
-    status = mdd->obj->clazz->parse_eof ( mdd->obj, PR_FALSE );
-    mdd->obj->clazz->parse_end( mdd->obj, status < 0 ? PR_TRUE : PR_FALSE );
+    status = mdd->obj->clazz->parse_eof ( mdd->obj, false );
+    mdd->obj->clazz->parse_end( mdd->obj, status < 0 ? true : false );
 
     // RICHIE
     // We need to figure out how to pass the forwarded flag along with this
     // operation.
 
     //forward_inline = (mdd->format_out != FO_CMDLINE_ATTACHMENTS);
     forward_inline = mdd->forwardInline;
 
@@ -1244,17 +1244,17 @@ mime_parse_stream_complete (nsMIMESessio
   //
   nsMsgAttachmentData *newAttachData = mime_draft_process_attachments(mdd);
 
   //
   // time to bring up the compose windows with all the info gathered
   //
   if ( mdd->headers )
   {
-    subj = MimeHeaders_get(mdd->headers, HEADER_SUBJECT,  PR_FALSE, PR_FALSE);
+    subj = MimeHeaders_get(mdd->headers, HEADER_SUBJECT,  false, false);
     if (forward_inline)
     {
       if (subj)
       {
         nsresult rv;
         nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
         if (NS_SUCCEEDED(rv))
         {
@@ -1268,32 +1268,32 @@ mime_parse_stream_complete (nsMIMESessio
             PR_Free(subj);
             subj = newSubj;
           }
         }
       }
     }
     else
     {
-      repl = MimeHeaders_get(mdd->headers, HEADER_REPLY_TO, PR_FALSE, PR_FALSE);
-      to   = MimeHeaders_get(mdd->headers, HEADER_TO,       PR_FALSE, PR_TRUE);
-      cc   = MimeHeaders_get(mdd->headers, HEADER_CC,       PR_FALSE, PR_TRUE);
-      bcc   = MimeHeaders_get(mdd->headers, HEADER_BCC,       PR_FALSE, PR_TRUE);
+      repl = MimeHeaders_get(mdd->headers, HEADER_REPLY_TO, false, false);
+      to   = MimeHeaders_get(mdd->headers, HEADER_TO,       false, true);
+      cc   = MimeHeaders_get(mdd->headers, HEADER_CC,       false, true);
+      bcc   = MimeHeaders_get(mdd->headers, HEADER_BCC,       false, true);
 
       /* These headers should not be RFC-1522-decoded. */
-      grps = MimeHeaders_get(mdd->headers, HEADER_NEWSGROUPS,  PR_FALSE, PR_TRUE);
-      foll = MimeHeaders_get(mdd->headers, HEADER_FOLLOWUP_TO, PR_FALSE, PR_TRUE);
+      grps = MimeHeaders_get(mdd->headers, HEADER_NEWSGROUPS,  false, true);
+      foll = MimeHeaders_get(mdd->headers, HEADER_FOLLOWUP_TO, false, true);
 
-      host = MimeHeaders_get(mdd->headers, HEADER_X_MOZILLA_NEWSHOST, PR_FALSE, PR_FALSE);
+      host = MimeHeaders_get(mdd->headers, HEADER_X_MOZILLA_NEWSHOST, false, false);
       if (!host)
-        host = MimeHeaders_get(mdd->headers, HEADER_NNTP_POSTING_HOST, PR_FALSE, PR_FALSE);
+        host = MimeHeaders_get(mdd->headers, HEADER_NNTP_POSTING_HOST, false, false);
 
-      id   = MimeHeaders_get(mdd->headers, HEADER_MESSAGE_ID,  PR_FALSE, PR_FALSE);
-      refs = MimeHeaders_get(mdd->headers, HEADER_REFERENCES,  PR_FALSE, PR_TRUE);
-      priority = MimeHeaders_get(mdd->headers, HEADER_X_PRIORITY, PR_FALSE, PR_FALSE);
+      id   = MimeHeaders_get(mdd->headers, HEADER_MESSAGE_ID,  false, false);
+      refs = MimeHeaders_get(mdd->headers, HEADER_REFERENCES,  false, true);
+      priority = MimeHeaders_get(mdd->headers, HEADER_X_PRIORITY, false, false);
 
 
       if (host)
       {
         char *secure = NULL;
 
         secure = PL_strcasestr(host, "secure");
         if (secure)
@@ -1309,32 +1309,32 @@ mime_parse_stream_complete (nsMIMESessio
     }
 
 
     CreateCompositionFields( from, repl, to, cc, bcc, fcc, grps, foll,
       org, subj, refs, 0, priority, news_host,
       mdd->mailcharset,
       getter_AddRefs(fields));
 
-    draftInfo = MimeHeaders_get(mdd->headers, HEADER_X_MOZILLA_DRAFT_INFO, PR_FALSE, PR_FALSE);
+    draftInfo = MimeHeaders_get(mdd->headers, HEADER_X_MOZILLA_DRAFT_INFO, false, false);
     if (draftInfo && fields && !forward_inline)
     {
       char *parm = 0;
       parm = MimeHeaders_get_parameter(draftInfo, "vcard", NULL, NULL);
       fields->SetAttachVCard(parm && !strcmp(parm, "1"));
 
       fields->SetMessageId(id); // keep same message id for editing template.
       PR_FREEIF(parm);
       parm = MimeHeaders_get_parameter(draftInfo, "receipt", NULL, NULL);
       if (parm && !strcmp(parm, "0"))
-        fields->SetReturnReceipt(PR_FALSE);
+        fields->SetReturnReceipt(false);
       else
       {
         int receiptType = 0;
-        fields->SetReturnReceipt(PR_TRUE);
+        fields->SetReturnReceipt(true);
         sscanf(parm, "%d", &receiptType);
         // slight change compared to 4.x; we used to use receipt= to tell
         // whether the draft/template has request for either MDN or DNS or both
         // return receipt; since the DNS is out of the picture we now use the
         // header type - 1 to tell whether user has requested the return receipt
         fields->SetReceiptHeaderType(((PRInt32)receiptType) - 1);
       }
       PR_FREEIF(parm);
@@ -1348,17 +1348,17 @@ mime_parse_stream_complete (nsMIMESessio
       parm = MimeHeaders_get_parameter(draftInfo, "linewidth", NULL, NULL);
       if (parm)
         sscanf(parm, "%d", &lineWidth);
       PR_FREEIF(parm);
 
     }
 
   // identity to prefer when opening the message in the compose window?
-    identityKey = MimeHeaders_get(mdd->headers, HEADER_X_MOZILLA_IDENTITY_KEY, PR_FALSE, PR_FALSE);
+    identityKey = MimeHeaders_get(mdd->headers, HEADER_X_MOZILLA_IDENTITY_KEY, false, false);
     if ( identityKey && *identityKey )
     {
         nsresult rv = NS_OK;
         nsCOMPtr< nsIMsgAccountManager > accountManager =
                 do_GetService( NS_MSGACCOUNTMANAGER_CONTRACTID, &rv );
         if ( NS_SUCCEEDED(rv) && accountManager )
         {
             nsCOMPtr< nsIMsgIdentity > overrulingIdentity;
@@ -1376,17 +1376,17 @@ mime_parse_stream_complete (nsMIMESessio
       {
         if(mdd->messageBody->m_type.Find("text/html", CaseInsensitiveCompare) != -1)
           composeFormat = nsIMsgCompFormat::HTML;
         else if (mdd->messageBody->m_type.Find("text/plain", CaseInsensitiveCompare) != -1 ||
                  mdd->messageBody->m_type.LowerCaseEqualsLiteral("text"))
           composeFormat = nsIMsgCompFormat::PlainText;
         else
           //We cannot use this kind of data for the message body! Therefore, move it as attachment
-          bodyAsAttachment = PR_TRUE;
+          bodyAsAttachment = true;
       }
       else
         composeFormat = nsIMsgCompFormat::PlainText;
 
       char *body = nsnull;
       PRUint32 bodyLen = 0;
 
       if (!bodyAsAttachment)
@@ -1486,17 +1486,17 @@ mime_parse_stream_complete (nsMIMESessio
           {
             // In the end, we're going to compose in plain text mode...
 
             if (composeFormat == nsIMsgCompFormat::HTML)
             {
               // ... but the message body is currently HTML.
               // We'll do the conversion later on when headers have been
               // inserted, body has been set and converted to unicode.
-              convertToPlainText = PR_TRUE;
+              convertToPlainText = true;
             }
           }
         }
 
         mime_insert_forwarded_message_headers(&body, mdd->headers, composeFormat,
           mdd->mailcharset);
 
       }
@@ -1603,17 +1603,17 @@ mime_parse_stream_complete (nsMIMESessio
   //
   // Free the original attachment structure...
   // Make sure we only cleanup the local copy of the memory and not kill
   // files we need on disk
   //
   if (bodyAsAttachment)
     mdd->messageBody->m_tmpFile = nsnull;
   else if (mdd->messageBody->m_tmpFile)
-    mdd->messageBody->m_tmpFile->Remove(PR_FALSE);
+    mdd->messageBody->m_tmpFile->Remove(false);
 
   delete mdd->messageBody;
 
   for (int i = 0; i < mdd->attachments.Length(); i++)
     mdd->attachments[i]->m_tmpFile = nsnull;
 
   PR_FREEIF(mdd->mailcharset);
 
@@ -1652,19 +1652,19 @@ mime_parse_stream_abort (nsMIMESession *
   if (!mdd)
     return;
 
   if (mdd->obj)
   {
     int status=0;
 
     if ( !mdd->obj->closed_p )
-      status = mdd->obj->clazz->parse_eof ( mdd->obj, PR_TRUE );
+      status = mdd->obj->clazz->parse_eof ( mdd->obj, true );
     if ( !mdd->obj->parsed_p )
-      mdd->obj->clazz->parse_end( mdd->obj, PR_TRUE );
+      mdd->obj->clazz->parse_end( mdd->obj, true );
 
     NS_ASSERTION ( mdd->options == mdd->obj->options, "draft display options not same as mime obj" );
     mime_free (mdd->obj);
     mdd->obj = 0;
     if (mdd->options)
     {
       delete mdd->options;
       mdd->options = 0;
@@ -1697,17 +1697,17 @@ make_mime_headers_copy ( void *closure, 
   NS_ASSERTION ( mdd && headers, "null mime draft data and/or headers" );
 
   if ( !mdd || ! headers )
     return 0;
 
   NS_ASSERTION ( mdd->headers == NULL , "non null mime draft data headers");
 
   mdd->headers = MimeHeaders_copy ( headers );
-  mdd->options->done_parsing_outer_headers = PR_TRUE;
+  mdd->options->done_parsing_outer_headers = true;
 
   return 0;
 }
 
 nsresult
 mime_decompose_file_init_fn ( void *stream_closure, MimeHeaders *headers )
 {
   mime_draft_data *mdd = (mime_draft_data *) stream_closure;
@@ -1725,80 +1725,80 @@ mime_decompose_file_init_fn ( void *stre
 
   if (mdd->options->decompose_init_count)
   {
     mdd->options->decompose_init_count++;
     NS_ASSERTION(mdd->curAttachment, "missing attachment in mime_decompose_file_init_fn");
     if (mdd->curAttachment)
       mdd->curAttachment->m_type.Adopt(MimeHeaders_get(headers,
                                                        HEADER_CONTENT_TYPE,
-                                                       PR_TRUE, PR_FALSE));
+                                                       true, false));
     return 0;
   }
   else
     mdd->options->decompose_init_count++;
 
   nAttachments = mdd->attachments.Length();
 
   if (!nAttachments && !mdd->messageBody)
   {
     // if we've been told to use an override charset then do so....otherwise use the charset
     // inside the message header...
     if (mdd->options && mdd->options->override_charset)
         mdd->mailcharset = strdup(mdd->options->default_charset);
     else
     {
       char *contentType;
-      contentType = MimeHeaders_get(headers, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
+      contentType = MimeHeaders_get(headers, HEADER_CONTENT_TYPE, false, false);
       if (contentType)
       {
         mdd->mailcharset = MimeHeaders_get_parameter(contentType, "charset", NULL, NULL);
         PR_FREEIF(contentType);
       }
     }
 
     mdd->messageBody = new nsMsgAttachedFile;
     if (!mdd->messageBody)
       return MIME_OUT_OF_MEMORY;
     newAttachment = mdd->messageBody;
-    creatingMsgBody = PR_TRUE;
-    bodyPart = PR_TRUE;
+    creatingMsgBody = true;
+    bodyPart = true;
   }
   else
   {
     /* always allocate one more extra; don't ask me why */
-    needURL = PR_TRUE;
+    needURL = true;
     newAttachment = new nsMsgAttachedFile;
     if (!newAttachment)
       return MIME_OUT_OF_MEMORY;
     mdd->attachments.AppendElement(newAttachment);
   }
 
   char *workURLSpec = nsnull;
   char *contLoc = nsnull;
 
   newAttachment->m_realName.Adopt(MimeHeaders_get_name(headers, mdd->options));
-  contLoc = MimeHeaders_get( headers, HEADER_CONTENT_LOCATION, PR_FALSE, PR_FALSE );
+  contLoc = MimeHeaders_get( headers, HEADER_CONTENT_LOCATION, false, false );
   if (!contLoc)
-      contLoc = MimeHeaders_get( headers, HEADER_CONTENT_BASE, PR_FALSE, PR_FALSE );
+      contLoc = MimeHeaders_get( headers, HEADER_CONTENT_BASE, false, false );
 
   if (!contLoc && !newAttachment->m_realName.IsEmpty())
     workURLSpec = ToNewCString(newAttachment->m_realName);
   if ( (contLoc) && (!workURLSpec) )
     workURLSpec = strdup(contLoc);
 
   PR_FREEIF(contLoc);
 
   mdd->curAttachment = newAttachment;
-  newAttachment->m_type.Adopt(MimeHeaders_get ( headers, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE ));
+  newAttachment->m_type.Adopt(MimeHeaders_get ( headers, HEADER_CONTENT_TYPE, false, false ));
 
   //
   // This is to handle the degenerated Apple Double attachment.
   //
-  parm_value = MimeHeaders_get( headers, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE );
+  parm_value = MimeHeaders_get( headers, HEADER_CONTENT_TYPE, false, false );
   if (parm_value)
   {
     char *boundary = NULL;
     char *tmp_value = NULL;
     boundary = MimeHeaders_get_parameter(parm_value, "boundary", NULL, NULL);
     if (boundary)
       tmp_value = PR_smprintf("; boundary=\"%s\"", boundary);
     if (tmp_value)
@@ -1808,19 +1808,19 @@ mime_decompose_file_init_fn ( void *stre
     newAttachment->m_xMacCreator.Adopt(
       MimeHeaders_get_parameter(parm_value, "x-mac-creator", NULL, NULL));
     PR_FREEIF(parm_value);
     PR_FREEIF(boundary);
     PR_FREEIF(tmp_value);
   }
   newAttachment->m_size = 0;
   newAttachment->m_encoding.Adopt(MimeHeaders_get (headers, HEADER_CONTENT_TRANSFER_ENCODING,
-                                                   PR_FALSE, PR_FALSE ));
+                                                   false, false ));
   newAttachment->m_description.Adopt(MimeHeaders_get(headers, HEADER_CONTENT_DESCRIPTION,
-                                                     PR_FALSE, PR_FALSE ));
+                                                     false, false ));
   //
   // If we came up empty for description or the orig URL, we should do something about it.
   //
   if (newAttachment->m_description.IsEmpty() && workURLSpec)
     newAttachment->m_description = workURLSpec;
 
   nsCOMPtr <nsIFile> tmpFile = nsnull;
   {
@@ -1840,17 +1840,17 @@ mime_decompose_file_init_fn ( void *stre
     {
       nsCAutoString fileExtension;
       rv = mimeFinder->GetPrimaryExtension(contentType, EmptyCString(), fileExtension);
 
       if (NS_SUCCEEDED(rv) && !fileExtension.IsEmpty())
       {
         newAttachName.Append(".");
         newAttachName.Append(fileExtension);
-        extensionAdded = PR_TRUE;
+        extensionAdded = true;
       }
     }
 
     if (!extensionAdded)
     {
       newAttachName.Append(".tmp");
     }
 
@@ -1962,17 +1962,17 @@ mime_decompose_file_close_fn ( void *str
 
   if ( !mdd || !mdd->tmpFileStream )
     return -1;
 
   if ( --mdd->options->decompose_init_count > 0 )
       return 0;
 
   if (mdd->decoder_data) {
-    MimeDecoderDestroy(mdd->decoder_data, PR_FALSE);
+    MimeDecoderDestroy(mdd->decoder_data, false);
     mdd->decoder_data = 0;
   }
 
   mdd->tmpFileStream->Close();
 
   mdd->tmpFileStream = nsnull;
 
   mdd->tmpFile = nsnull;
@@ -2037,17 +2037,17 @@ mime_bridge_create_draft_stream(
   newPluginObj2->GetOrigMsgHdr(getter_AddRefs(mdd->origMsgHdr));
   mdd->format_out = format_out;
   mdd->options = new  MimeDisplayOptions ;
   if (!mdd->options)
     goto FAIL;
 
   mdd->options->url = strdup(mdd->url_name);
   mdd->options->format_out = format_out;     // output format
-  mdd->options->decompose_file_p = PR_TRUE; /* new field in MimeDisplayOptions */
+  mdd->options->decompose_file_p = true; /* new field in MimeDisplayOptions */
   mdd->options->stream_closure = mdd;
   mdd->options->html_closure = mdd;
   mdd->options->decompose_headers_info_fn = make_mime_headers_copy;
   mdd->options->decompose_file_init_fn = mime_decompose_file_init_fn;
   mdd->options->decompose_file_output_fn = mime_decompose_file_output_fn;
   mdd->options->decompose_file_close_fn = mime_decompose_file_close_fn;
 
   mdd->options->m_prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
@@ -2055,17 +2055,17 @@ mime_bridge_create_draft_stream(
     goto FAIL;
 
 #ifdef ENABLE_SMIME
   /* If we're attaching a message (for forwarding) then we must eradicate all
    traces of xlateion from it, since forwarding someone else a message
    that wasn't xlated for them doesn't work.  We have to dexlate it
    before sending it.
    */
-  mdd->options->decrypt_p = PR_TRUE;
+  mdd->options->decrypt_p = true;
 #endif /* ENABLE_SMIME */
 
   obj = mime_new ( (MimeObjectClass *) &mimeMessageClass, (MimeHeaders *) NULL, MESSAGE_RFC822 );
   if ( !obj )
     goto FAIL;
 
   obj->options = mdd->options;
   mdd->obj = obj;
--- a/mailnews/mime/src/mimeebod.cpp
+++ b/mailnews/mime/src/mimeebod.cpp
@@ -124,17 +124,17 @@ MimeExternalBody_parse_line (const char 
 
   if (!obj->output_p) return 0;
 
   /* If we're supposed to write this object, but aren't supposed to convert
    it to HTML, simply pass it through unaltered. */
   if (obj->options &&
     !obj->options->write_html_p &&
     obj->options->output_fn)
-  return MimeObject_write(obj, line, length, PR_TRUE);
+  return MimeObject_write(obj, line, length, true);
 
 
   /* If we already have a `body' then we're done parsing headers, and all
    subsequent lines get tacked onto the body. */
   if (bod->body)
   {
     int L = strlen(bod->body);
     char *new_str = (char *)PR_Realloc(bod->body, L + length + 1);
@@ -295,17 +295,17 @@ MimeExternalBody_parse_eof (MimeObject *
       obj->output_p &&
       obj->options &&
       obj->options->write_html_p)
   {
     bool all_headers_p = obj->options->headers == MimeHeadersAll;
     MimeDisplayOptions *newopt = obj->options;  /* copy it */
 
     char *ct = MimeHeaders_get(obj->headers, HEADER_CONTENT_TYPE,
-                               PR_FALSE, PR_FALSE);
+                               false, false);
     char *at, *lexp, *size, *perm;
     char *url, *dir, *mode, *name, *site, *svr, *subj;
     char *h = 0, *lname = 0, *lurl = 0, *body = 0;
     MimeHeaders *hdrs = 0;
 
     if (!ct) return MIME_OUT_OF_MEMORY;
 
     at   = MimeHeaders_get_parameter(ct, "access-type", NULL, NULL);
@@ -318,17 +318,17 @@ MimeExternalBody_parse_eof (MimeObject *
     site = MimeHeaders_get_parameter(ct, "site", NULL, NULL);
     svr  = MimeHeaders_get_parameter(ct, "server", NULL, NULL);
     subj = MimeHeaders_get_parameter(ct, "subject", NULL, NULL);
     url  = MimeHeaders_get_parameter(ct, "url", NULL, NULL);
     PR_FREEIF(ct);
 
     /* the *internal* content-type */
     ct = MimeHeaders_get(bod->hdrs, HEADER_CONTENT_TYPE,
-                         PR_TRUE, PR_FALSE);
+                         true, false);
 						 
     PRUint32 hlen = ((at ? strlen(at) : 0) +
                     (lexp ? strlen(lexp) : 0) +
                     (size ? strlen(size) : 0) +
                     (perm ? strlen(perm) : 0) +
                     (dir ? strlen(dir) : 0) +
                     (mode ? strlen(mode) : 0) +
                     (name ? strlen(name) : 0) +
@@ -397,20 +397,20 @@ MimeExternalBody_parse_eof (MimeObject *
                                      name, url, site, svr, subj, bod->body);
     if (lurl)
     {
       lname = MimeGetStringByID(MIME_MSG_LINK_TO_DOCUMENT);
     }
     else
     {
       lname = MimeGetStringByID(MIME_MSG_DOCUMENT_INFO);
-      all_headers_p = PR_TRUE;
+      all_headers_p = true;
     }
 
-    all_headers_p = PR_TRUE;  /* #### just do this all the time? */
+    all_headers_p = true;  /* #### just do this all the time? */
 
     if (bod->body && all_headers_p)
     {
       char *s = bod->body;
       while (IS_SPACE(*s)) s++;
       if (*s)
       {
         char *s2;
@@ -429,17 +429,17 @@ MimeExternalBody_parse_eof (MimeObject *
           goto FAIL;
         }
         PL_strcpy(body, pre);
         PL_strcat(body, s2);
         PL_strcat(body, suf);
       }
     }
 
-    newopt->fancy_headers_p = PR_TRUE;
+    newopt->fancy_headers_p = true;
     newopt->headers = (all_headers_p ? MimeHeadersAll : MimeHeadersSome);
 
 FAIL:
       if (hdrs)
         MimeHeaders_free(hdrs);
     PR_FREEIF(h);
     PR_FREEIF(lname);
     PR_FREEIF(lurl);
@@ -471,19 +471,19 @@ static int
 MimeExternalBody_debug_print (MimeObject *obj, PRFileDesc *stream, PRInt32 depth)
 {
   MimeExternalBody *bod = (MimeExternalBody *) obj;
   int i;
   char *ct, *ct2;
   char *addr = mime_part_address(obj);
 
   if (obj->headers)
-  ct = MimeHeaders_get (obj->headers, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
+  ct = MimeHeaders_get (obj->headers, HEADER_CONTENT_TYPE, false, false);
   if (bod->hdrs)
-  ct2 = MimeHeaders_get (bod->hdrs, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
+  ct2 = MimeHeaders_get (bod->hdrs, HEADER_CONTENT_TYPE, false, false);
 
   for (i=0; i < depth; i++)
   PR_Write(stream, "  ", 2);
 /***
   fprintf(stream,
       "<%s %s\n"
       "\tcontent-type: %s\n"
       "\tcontent-type: %s\n"
@@ -502,41 +502,41 @@ MimeExternalBody_debug_print (MimeObject
 }
 #endif
 #endif /* 0 */
 
 static bool
 MimeExternalBody_displayable_inline_p (MimeObjectClass *clazz,
                      MimeHeaders *hdrs)
 {
-  char *ct = MimeHeaders_get (hdrs, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
+  char *ct = MimeHeaders_get (hdrs, HEADER_CONTENT_TYPE, false, false);
   char *at = MimeHeaders_get_parameter(ct, "access-type", NULL, NULL);
   bool inline_p = false;
 
   if (!at)
   ;
   else if (!PL_strcasecmp(at, "ftp") ||
        !PL_strcasecmp(at, "anon-ftp") ||
        !PL_strcasecmp(at, "local-file") ||
        !PL_strcasecmp(at, "mail-server") ||
        !PL_strcasecmp(at, "url"))
-  inline_p = PR_TRUE;
+  inline_p = true;
 #ifdef XP_UNIX
   else if (!PL_strcasecmp(at, "afs"))   /* only if there is a /afs/ directory */
   {
     nsCOMPtr <nsILocalFile> fs = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID);
     bool exists = false;
     if (fs)
     {
       fs->InitWithNativePath(NS_LITERAL_CSTRING("/afs/."));
       fs->Exists(&exists);
     }
     if  (!exists)
       return 0;
 
-    inline_p = PR_TRUE;
+    inline_p = true;
   }
 #endif /* XP_UNIX */
 
   PR_FREEIF(ct);
   PR_FREEIF(at);
   return inline_p;
 }
--- a/mailnews/mime/src/mimeenc.cpp
+++ b/mailnews/mime/src/mimeenc.cpp
@@ -311,17 +311,17 @@ mime_decode_base64_buffer (MimeDecoderDa
       if (n < 0) /* abort */
       return n;
 
       /* increment buffer so that we don't write the 1 or 2 unused
        characters now at the front. */
       buffer = in;
       out = (char *) buffer;
 
-      leftover = PR_FALSE;
+      leftover = false;
     }
     else
     {
       int n = mime_decode_base64_token (token, out);
       /* Advance "out" by the number of bytes just written to it. */
       out += n;
     }
   }
@@ -1032,29 +1032,29 @@ mime_encode_qp_buffer (MimeEncoderData *
         *out++ = '=';
         *out++ = hexdigits[whitespace_char >> 4];
         *out++ = hexdigits[whitespace_char & 0xF];
       }
 
       /* Now write out the newline. */
       *out++ = '\r';
       *out++ = '\n';
-      white = PR_FALSE;
+      white = false;
 
       status = data->write_buffer (out_buffer, (out - out_buffer),
         data->closure);
       if (status < 0) return status;
       out = out_buffer;
 
       /* If it's CRLF, swallow two chars instead of one. */
       if (in + 1 < end && in[0] == '\r' && in[1] == '\n')
         in++;
 
       out = out_buffer;
-      white = PR_FALSE;
+      white = false;
       data->current_column = 0;
     }
     else if (data->current_column == 0 && *in == '.')
     {
       /* Just to be SMTP-safe, if "." appears in column 0, encode it.
                   (mmencode does this too.)
       */
       goto HEX;
@@ -1076,30 +1076,30 @@ mime_encode_qp_buffer (MimeEncoderData *
                   It's a little inconsistent, but it errs on the safe side.)
       */
       goto HEX;
     }
     else if ((*in >= 33 && *in <= 60) ||    /* safe printing chars */
          (*in >= 62 && *in <= 126) ||
                            (mb_p && (*in == 61 || *in == 127 || *in == 0x1B)))
     {
-      white = PR_FALSE;
+      white = false;
       *out++ = *in;
       data->current_column++;
     }
     else if (*in == ' ' || *in == '\t')    /* whitespace */
     {
-      white = PR_TRUE;
+      white = true;
       *out++ = *in;
       data->current_column++;
     }
     else                    /* print as =FF */
     {
 HEX:
-      white = PR_FALSE;
+      white = false;
                   *out++ = '=';
                   *out++ = hexdigits[*in >> 4];
                   *out++ = hexdigits[*in & 0xF];
                   data->current_column += 3;
     }
 
     NS_ASSERTION (data->current_column <= 76, "1.1 <rhp@netscape.com> 19 Mar 1999 12:00"); /* Hard limit required by spec */
 
@@ -1108,17 +1108,17 @@ HEX:
       *out++ = '=';
       *out++ = '\r';
       *out++ = '\n';
 
       status = data->write_buffer (out_buffer, (out - out_buffer),
         data->closure);
       if (status < 0) return status;
       out = out_buffer;
-      white = PR_FALSE;
+      white = false;
       data->current_column = 0;
     }
   }
 
   /* Write out the unwritten portion of the last line buffer. */
   if (out > out_buffer)
   {
     status = data->write_buffer (out_buffer, (out - out_buffer),
--- a/mailnews/mime/src/mimeeobj.cpp
+++ b/mailnews/mime/src/mimeeobj.cpp
@@ -139,17 +139,17 @@ MimeExternalObject_parse_begin (MimeObje
       if (!id_imap.IsEmpty() && id)
       {
         // if this is an IMAP part.
         id_url = mime_set_url_imap_part(url, id_imap.get(), id);
       }
       else
       {
         // This is just a normal MIME part as usual.
-        id_url = mime_set_url_part(url, id, PR_TRUE);
+        id_url = mime_set_url_part(url, id, true);
       }
       if (!id_url)
       {
         PR_Free(id);
         return MIME_OUT_OF_MEMORY;
       }
     }
     if (!strcmp (id, "0"))
@@ -178,19 +178,19 @@ MimeExternalObject_parse_begin (MimeObje
     }
 
     if (all_headers_p &&
     // Don't bother showing all headers on this part if it's the only
     // part in the message: in that case, we've already shown these
     // headers.
     obj->options->state &&
     obj->options->state->root == obj->parent)
-    all_headers_p = PR_FALSE;
+    all_headers_p = false;
 
-    newopt.fancy_headers_p = PR_TRUE;
+    newopt.fancy_headers_p = true;
     newopt.headers = (all_headers_p ? MimeHeadersAll : MimeHeadersSome);
 
 /******
 RICHIE SHERRY
 GOTTA STILL DO THIS FOR QUOTING!
      status = MimeHeaders_write_attachment_box (obj->headers, &newopt,
                                                  obj->content_type,
                                                  obj->encoding,
@@ -244,25 +244,25 @@ MimeExternalObject_parse_decoded_buffer 
    * contents of binary attachments will just get dumped into messages when
    * reading them) and the JS emitter (which doesn't care about attachment data
    * at all). 0 means ok, the caller just checks for negative return value.
    */
   if (obj->options && (obj->options->metadata_only ||
                        obj->options->write_html_p))
     return 0;
   else
-    return MimeObject_write(obj, buf, size, PR_TRUE);
+    return MimeObject_write(obj, buf, size, true);
 }
 
 
 static int
 MimeExternalObject_parse_line (const char *line, PRInt32 length, MimeObject *obj)
 {
   NS_ERROR("This method should never be called (externals do no line buffering).");
   return -1;
 }
 
 static bool
 MimeExternalObject_displayable_inline_p (MimeObjectClass *clazz,
                      MimeHeaders *hdrs)
 {
-  return PR_FALSE;
+  return false;
 }
--- a/mailnews/mime/src/mimefilt.cpp
+++ b/mailnews/mime/src/mimefilt.cpp
@@ -223,36 +223,36 @@ test(FILE *in, FILE *out,
    bool dexlate_p,
    bool variable_width_plaintext_p)
 {
   int status = 0;
   MimeObject *obj = 0;
   MimeDisplayOptions *opt = new MimeDisplayOptions;
 //  memset(opt, 0, sizeof(*opt));
 
-  if (dexlate_p) html_p = PR_FALSE;
+  if (dexlate_p) html_p = false;
 
   opt->fancy_headers_p = fancy_headers_p;
   opt->headers = MimeHeadersSome;
-  opt->rot13_p = PR_FALSE;
+  opt->rot13_p = false;
 
   status = mime_parse_url_options(url, opt);
   if (status < 0)
   {
     PR_Free(opt);
     return MIME_OUT_OF_MEMORY;
   }
 
   opt->url          = url;
   opt->write_html_p      = html_p;
   opt->dexlate_p      = dexlate_p;
   opt->output_init_fn    = test_output_init_fn;
   opt->output_fn      = test_output_fn;
   opt->charset_conversion_fn= 0;
-  opt->rfc1522_conversion_p = PR_FALSE;
+  opt->rfc1522_conversion_p = false;
   opt->file_type_fn      = test_file_type;
   opt->stream_closure    = out;
 
   opt->image_begin      = test_image_begin;
   opt->image_end      = test_image_end;
   opt->make_image_html    = test_image_make_image_html;
   opt->image_write_buffer  = test_image_write_buffer;
 
@@ -287,19 +287,19 @@ test(FILE *in, FILE *out,
     if (status < 0)
     {
       mime_free(obj);
       PR_Free(opt);
       return status;
     }
   }
 
-  status = obj->class->parse_eof(obj, PR_FALSE);
+  status = obj->class->parse_eof(obj, false);
   if (status >= 0)
-  status = obj->class->parse_end(obj, PR_FALSE);
+  status = obj->class->parse_end(obj, false);
   if (status < 0)
   {
     mime_free(obj);
     PR_Free(opt);
     return status;
   }
 
   if (outline_p)
@@ -353,23 +353,23 @@ main (int argc, char **argv)
   char filename[1000];
   CERTCertDBHandle *cdb_handle;
   SECKEYKeyDBHandle *kdb_handle;
 
   PR_Init("mimefilt", 24, 1, 0);
 
   cdb_handle = (CERTCertDBHandle *)  calloc(1, sizeof(*cdb_handle));
 
-  if (SECSuccess != CERT_OpenCertDB(cdb_handle, PR_FALSE, test_cdb_name_cb, NULL))
+  if (SECSuccess != CERT_OpenCertDB(cdb_handle, false, test_cdb_name_cb, NULL))
   CERT_OpenVolatileCertDB(cdb_handle);
   CERT_SetDefaultCertDB(cdb_handle);
 
   RNG_RNGInit();
 
-  kdb_handle = SECKEY_OpenKeyDB(PR_FALSE, test_kdb_name_cb, NULL);
+  kdb_handle = SECKEY_OpenKeyDB(false, test_kdb_name_cb, NULL);
   SECKEY_SetDefaultKeyDB(kdb_handle);
 
   PK11_SetPasswordFunc(test_passwd_prompt);
 
   sprintf(filename, "%s/.netscape/secmodule.db", getenv("HOME"));
   SECMOD_init(filename);
 
   SEC_Init();
@@ -381,47 +381,47 @@ main (int argc, char **argv)
     url = strdup("");
     else
     url = argv[i++];
   }
 
   if (url &&
     (PL_strstr(url, "?part=") ||
      PL_strstr(url, "&part=")))
-  html_p = PR_FALSE;
+  html_p = false;
 
   while (i < argc)
   {
     if (!strcmp(argv[i], "-fancy"))
-    fancy_p = PR_TRUE;
+    fancy_p = true;
     else if (!strcmp(argv[i], "-no-fancy"))
-    fancy_p = PR_FALSE;
+    fancy_p = false;
     else if (!strcmp(argv[i], "-html"))
-    html_p = PR_TRUE;
+    html_p = true;
     else if (!strcmp(argv[i], "-raw"))
-    html_p = PR_FALSE;
+    html_p = false;
     else if (!strcmp(argv[i], "-outline"))
-    outline_p = PR_TRUE;
+    outline_p = true;
     else if (!strcmp(argv[i], "-dexlate"))
-    dexlate_p = PR_TRUE;
+    dexlate_p = true;
     else
     {
       fprintf(stderr,
       "usage: %s [ URL [ -fancy | -no-fancy | -html | -raw | -outline | -dexlate ]]\n"
           "     < message/rfc822 > output\n",
           (PL_strrchr(argv[0], '/') ?
            PL_strrchr(argv[0], '/') + 1 :
            argv[0]));
       i = 1;
       goto FAIL;
     }
     i++;
   }
 
-  i = test(stdin, stdout, url, fancy_p, html_p, outline_p, dexlate_p, PR_TRUE);
+  i = test(stdin, stdout, url, fancy_p, html_p, outline_p, dexlate_p, true);
   fprintf(stdout, "\n");
   fflush(stdout);
 
  FAIL:
 
   CERT_ClosePermCertDB(cdb_handle);
   SECKEY_CloseKeyDB(kdb_handle);
 
--- a/mailnews/mime/src/mimehdrs.cpp
+++ b/mailnews/mime/src/mimehdrs.cpp
@@ -76,17 +76,17 @@ MimeHeaders_convert_header_value(MimeDis
     ConvertRawBytesToUTF8(value, opt->default_charset, output);
     value.Assign(output);
     return;
   }
 
   if (opt && opt->rfc1522_conversion_p)
   {
     converted = MIME_DecodeMimeHeader(value.get(), opt->default_charset,
-                                      opt->override_charset, PR_TRUE);
+                                      opt->override_charset, true);
 
     if (converted)
     {
       value.Adopt(converted);
     }
   }
   else
   {
@@ -100,17 +100,17 @@ MimeHeaders_convert_header_value(MimeDis
 
 MimeHeaders *
 MimeHeaders_new (void)
 {
   MimeHeaders *hdrs = (MimeHeaders *) PR_MALLOC(sizeof(MimeHeaders));
   if (!hdrs) return 0;
 
   memset(hdrs, 0, sizeof(*hdrs));
-  hdrs->done_p = PR_FALSE;
+  hdrs->done_p = false;
 
   return hdrs;
 }
 
 void
 MimeHeaders_free (MimeHeaders *hdrs)
 {
   if (!hdrs) return;
@@ -145,17 +145,17 @@ MimeHeaders_parse_line (const char *buff
   /* Don't try and feed me more data after having fed me a blank line... */
   NS_ASSERTION(!hdrs->done_p, "1.22 <rhp@netscape.com> 22 Aug 1999 08:48");
   if (hdrs->done_p) return -1;
 
   if (!buffer || size == 0 || *buffer == '\r' || *buffer == '\n')
   {
     /* If this is a blank line, we're done.
      */
-    hdrs->done_p = PR_TRUE;
+    hdrs->done_p = true;
     return MimeHeaders_build_heads_list(hdrs);
   }
 
   /* Tack this data on to the end of our copy.
    */
   desired_size = hdrs->all_headers_fp + size + 1;
   if (desired_size >= hdrs->all_headers_size)
   {
@@ -347,17 +347,17 @@ MimeHeaders_get (MimeHeaders *hdrs, cons
    prematurely, and has no body at all (as opposed to a null body,
    which is more normal.)   So, if we try to read from the headers,
    let's assume that the headers are now finished.  If they aren't
    in fact finished, then a later attempt to write to them will assert.
    */
   if (!hdrs->done_p)
   {
     int status;
-    hdrs->done_p = PR_TRUE;
+    hdrs->done_p = true;
     status = MimeHeaders_build_heads_list(hdrs);
     if (status < 0) return 0;
   }
 
   if (!hdrs->heads)    /* Must not have been any headers. */
   {
     NS_ASSERTION(hdrs->all_headers_fp == 0, "1.1 <rhp@netscape.com> 19 Mar 1999 12:00");
     return 0;
@@ -524,17 +524,17 @@ MimeHeaders_get_parameter (const char *h
 
   nsCString result;
   rv = mimehdrpar->GetParameterInternal(header_value, parm_name, charset,
                                         language, getter_Copies(result));
   return NS_SUCCEEDED(rv) ? PL_strdup(result.get()) : nsnull;
 }
 
 #define MimeHeaders_write(OPT,NAME,DATA,LENGTH) \
-    MimeOptions_write((OPT), (NAME), (DATA), (LENGTH), PR_TRUE);
+    MimeOptions_write((OPT), (NAME), (DATA), (LENGTH), true);
 
 
 #define MimeHeaders_grow_obuffer(hdrs, desired_size) \
   ((((long) (desired_size)) >= ((long) (hdrs)->obuffer_size)) ? \
    mime_GrowBuffer ((desired_size), sizeof(char), 255, \
            &(hdrs)->obuffer, &(hdrs)->obuffer_size) \
    : 0)
 
@@ -553,29 +553,29 @@ MimeHeaders_write_all_headers (MimeHeade
      parsing them yet... but this can happen if the message ended
      prematurely, and has no body at all (as opposed to a null body,
      which is more normal.)   So, if we try to read from the headers,
      let's assume that the headers are now finished.  If they aren't
      in fact finished, then a later attempt to write to them will assert.
    */
   if (!hdrs->done_p)
   {
-    hdrs->done_p = PR_TRUE;
+    hdrs->done_p = true;
     status = MimeHeaders_build_heads_list(hdrs);
     if (status < 0) return 0;
   }
 
   char *charset = nsnull;
   if (opt->format_out == nsMimeOutput::nsMimeMessageSaveAs)
   {
     if (opt->override_charset)
       charset = PL_strdup(opt->default_charset);
     else
     {
-      char *contentType = MimeHeaders_get(hdrs, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
+      char *contentType = MimeHeaders_get(hdrs, HEADER_CONTENT_TYPE, false, false);
       if (contentType)
         charset = MimeHeaders_get_parameter(contentType, HEADER_PARM_CHARSET, nsnull, nsnull);
       PR_FREEIF(contentType);
     }
   }
 
   for (i = 0; i < hdrs->heads_size; i++)
   {
@@ -699,57 +699,57 @@ mime_decode_filename(const char *name, c
   nsCOMPtr <nsIMIMEHeaderParam> mimehdrpar =
     do_GetService(NS_MIMEHEADERPARAM_CONTRACTID, &rv);
 
   if (NS_FAILED(rv))
     return nsnull;
   nsCAutoString result;
   rv = mimehdrpar->DecodeParameter(nsDependentCString(name), charset,
                                    opt ? opt->default_charset : nsnull,
-                                   opt ? opt->override_charset : PR_FALSE,
+                                   opt ? opt->override_charset : false,
                                    result);
   return NS_SUCCEEDED(rv) ? PL_strdup(result.get()) : nsnull;
 }
 
 /* Pull the name out of some header or another.  Order is:
    Content-Disposition: XXX; filename=NAME (RFC 1521/1806)
    Content-Type: XXX; name=NAME (RFC 1341)
    Content-Name: NAME (no RFC, but seen to occur)
    X-Sun-Data-Name: NAME (no RFC, but used by MailTool)
  */
 char *
 MimeHeaders_get_name(MimeHeaders *hdrs, MimeDisplayOptions *opt)
 {
   char *s = 0, *name = 0, *cvt = 0;
   char *charset = nsnull; // for RFC2231 support
 
-  s = MimeHeaders_get(hdrs, HEADER_CONTENT_DISPOSITION, PR_FALSE, PR_FALSE);
+  s = MimeHeaders_get(hdrs, HEADER_CONTENT_DISPOSITION, false, false);
   if (s)
   {
     name = MimeHeaders_get_parameter(s, HEADER_PARM_FILENAME, &charset, NULL);
     PR_Free(s);
   }
 
   if (! name)
   {
-    s = MimeHeaders_get(hdrs, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
+    s = MimeHeaders_get(hdrs, HEADER_CONTENT_TYPE, false, false);
     if (s)
     {
       nsMemory::Free(charset);
 
       name = MimeHeaders_get_parameter(s, HEADER_PARM_NAME, &charset, NULL);
       PR_Free(s);
     }
   }
 
   if (! name)
-    name = MimeHeaders_get (hdrs, HEADER_CONTENT_NAME, PR_FALSE, PR_FALSE);
+    name = MimeHeaders_get (hdrs, HEADER_CONTENT_NAME, false, false);
 
   if (! name)
-    name = MimeHeaders_get (hdrs, HEADER_X_SUN_DATA_NAME, PR_FALSE, PR_FALSE);
+    name = MimeHeaders_get (hdrs, HEADER_X_SUN_DATA_NAME, false, false);
 
   if (name)
   {
     /* First remove continuation delimiters (CR+LF+space), then
        remove escape ('\\') characters, then attempt to decode
        mime-2 encoded-words. The latter two are done in
        mime_decode_filename.
     */
@@ -831,17 +831,17 @@ MimeHeaders_compact (MimeHeaders *hdrs)
 int
 MimeHeaders_write_raw_headers (MimeHeaders *hdrs, MimeDisplayOptions *opt,
                  bool dont_write_content_type)
 {
   int status;
 
   if (hdrs && !hdrs->done_p)
   {
-    hdrs->done_p = PR_TRUE;
+    hdrs->done_p = true;
     status = MimeHeaders_build_heads_list(hdrs);
     if (status < 0) return 0;
   }
 
   nsCString name;
   name.Adopt(MimeHeaders_get_name(hdrs, opt));
   MimeHeaders_convert_header_value(opt, name, false);
 
--- a/mailnews/mime/src/mimei.cpp
+++ b/mailnews/mime/src/mimei.cpp
@@ -132,42 +132,42 @@ bool                force_display = fals
 
 bool
 EnumFunction(void* aElement, void *aData)
 {
   cthandler_struct    *ptr = (cthandler_struct *) aElement;
   char                *ctPtr = (char *)aData;
 
   if ( (!aElement) || (!aData) )
-    return PR_TRUE;
+    return true;
 
   if (PL_strcasecmp(ctPtr, ptr->content_type) == 0)
   {
-    foundIt = PR_TRUE;
+    foundIt = true;
     force_display = ptr->force_inline_display;
-    return PR_FALSE;
+    return false;
   }
 
-  return PR_TRUE;
+  return true;
 }
 
 /*
  * This will return TRUE if the content_type is found in the
  * list, FALSE if it is not found.
  */
 bool
 find_content_type_attribs(const char *content_type,
                           bool       *force_inline_display)
 {
-  *force_inline_display = PR_FALSE;
+  *force_inline_display = false;
   if (!ctHandlerList)
-    return PR_FALSE;
+    return false;
 
-  foundIt = PR_FALSE;
-  force_display = PR_FALSE;
+  foundIt = false;
+  force_display = false;
   ctHandlerList->EnumerateForwards(EnumFunction, (void *)content_type);
   if (foundIt)
     *force_inline_display = force_display;
 
   return (foundIt);
 }
 
 void
@@ -290,17 +290,17 @@ mime_new (MimeObjectClass *clazz, MimeHe
   }
 
   object = (MimeObject *) PR_MALLOC(size);
   if (!object) return 0;
 
   memset(object, 0, size);
   object->clazz = clazz;
   object->headers = hdrs;
-  object->dontShowAsAttachment = PR_FALSE;
+  object->dontShowAsAttachment = false;
 
   if (override_content_type && *override_content_type)
     object->content_type = strdup(override_content_type);
 
   status = clazz->initialize(object);
   if (status < 0)
   {
     clazz->finalize(object);
@@ -329,17 +329,17 @@ mime_free (MimeObject *object)
   PR_Free(object);
 }
 
 
 bool mime_is_allowed_class(const MimeObjectClass *clazz,
                              PRInt32 types_of_classes_to_disallow)
 {
   if (types_of_classes_to_disallow == 0)
-    return PR_TRUE;
+    return true;
   bool avoid_html = (types_of_classes_to_disallow >= 1);
   bool avoid_images = (types_of_classes_to_disallow >= 2);
   bool avoid_strange_content = (types_of_classes_to_disallow >= 3);
   bool allow_only_vanilla_classes = (types_of_classes_to_disallow == 100);
 
   if (allow_only_vanilla_classes)
     /* A "safe" class is one that is unlikely to have security bugs or to
        allow security exploits or one that is essential for the usefulness
@@ -510,17 +510,17 @@ mime_find_class (const char *content_typ
   if ((tempClass = mime_locate_external_content_handler(content_type, &ctHandlerInfo)) != NULL)
   {
 #ifdef MOZ_THUNDERBIRD
       // This is a case where we only want to add this property if we are a thunderbird build AND
       // we have found an external mime content handler for text/calendar
       // This will enable iMIP support in Lightning
       if ( hdrs && (!PL_strncasecmp(content_type, "text/calendar", 13)))
       {
-          char *full_content_type = MimeHeaders_get(hdrs, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
+          char *full_content_type = MimeHeaders_get(hdrs, HEADER_CONTENT_TYPE, false, false);
           if (full_content_type)
           {
               char *imip_method = MimeHeaders_get_parameter(full_content_type, "method", NULL, NULL);
               nsCOMPtr<nsIMsgDBHdr> msgHdr;
               getMsgHdrForCurrentURL(opts, getter_AddRefs(msgHdr));
               if (msgHdr)
                 msgHdr->SetStringProperty("imip_method", (imip_method) ? imip_method : "nomethod");
               // PR_Free checks for null
@@ -606,17 +606,17 @@ mime_find_class (const char *content_typ
           {
             // Check for format=flowed, damn, it is already stripped away from
             // the contenttype!
             // Look in headers instead even though it's expensive and clumsy
             // First find Content-Type:
             char *content_type_row =
               (hdrs
                ? MimeHeaders_get(hdrs, HEADER_CONTENT_TYPE,
-                                 PR_FALSE, PR_FALSE)
+                                 false, false)
                : 0);
             // Then the format parameter if there is one.
             // I would rather use a PARAM_FORMAT but I can't find the right
             // place to put the define. The others seems to be in net.h
             // but is that really really the right place? There is also
             // a nsMimeTypes.h but that one isn't included. Bug?
             char *content_type_format =
               (content_type_row
@@ -676,17 +676,17 @@ mime_find_class (const char *content_typ
         clazz = (MimeObjectClass *)&mimeMultipartMixedClass;
 #ifdef ENABLE_SMIME
       else if (!PL_strcasecmp(content_type+10,  "signed"))
       {
       /* Check that the "protocol" and "micalg" parameters are ones we
         know about. */
         char *ct = (hdrs
           ? MimeHeaders_get(hdrs, HEADER_CONTENT_TYPE,
-                            PR_FALSE, PR_FALSE)
+                            false, false)
                     : 0);
         char *proto = (ct
           ? MimeHeaders_get_parameter(ct, PARAM_PROTOCOL, NULL, NULL)
           : 0);
         char *micalg = (ct
           ? MimeHeaders_get_parameter(ct, PARAM_MICALG, NULL, NULL)
           : 0);
 
@@ -761,17 +761,17 @@ mime_find_class (const char *content_typ
         else
           clazz = (MimeObjectClass *)&mimeExternalObjectClass;
     }
 
 #ifdef ENABLE_SMIME
     else if (!PL_strcasecmp(content_type, APPLICATION_XPKCS7_MIME)
              || !PL_strcasecmp(content_type, APPLICATION_PKCS7_MIME)) {
         char *ct = (hdrs ? MimeHeaders_get(hdrs, HEADER_CONTENT_TYPE,
-                                           PR_FALSE, PR_FALSE)
+                                           false, false)
                            : nsnull);
         char *st = (ct ? MimeHeaders_get_parameter(ct, "smime-type", NULL, NULL)
                          : nsnull);
 
         /* by default, assume that it is an encrypted message */
         clazz = (MimeObjectClass *)&mimeEncryptedCMSClass;
 
         /* if the smime-type parameter says that it's a certs-only or
@@ -873,19 +873,19 @@ mime_create (const char *content_type, M
   /* There are some clients send out all attachments with a content-type
    of application/octet-stream.  So, if we have an octet-stream attachment,
    try to guess what type it really is based on the file extension.  I HATE
    that we have to do this...
   */
   if (hdrs && opts && opts->file_type_fn &&
 
     /* ### mwelch - don't override AppleSingle */
-    (content_type ? PL_strcasecmp(content_type, APPLICATION_APPLEFILE) : PR_TRUE) &&
+    (content_type ? PL_strcasecmp(content_type, APPLICATION_APPLEFILE) : true) &&
     /* ## davidm Apple double shouldn't use this #$%& either. */
-    (content_type ? PL_strcasecmp(content_type, MULTIPART_APPLEDOUBLE) : PR_TRUE) &&
+    (content_type ? PL_strcasecmp(content_type, MULTIPART_APPLEDOUBLE) : true) &&
     (!content_type ||
      !PL_strcasecmp(content_type, APPLICATION_OCTET_STREAM) ||
      !PL_strcasecmp(content_type, UNKNOWN_CONTENT_TYPE)))
   {
     char *name = MimeHeaders_get_name(hdrs, opts);
     if (name)
     {
       override_content_type = opts->file_type_fn (name, opts->stream_closure);
@@ -899,17 +899,17 @@ mime_create (const char *content_type, M
       // file name, let's do some better checking not to inline something bad
       if (override_content_type &&
           *override_content_type &&
           (PL_strcasecmp(override_content_type, UNKNOWN_CONTENT_TYPE)))
         content_type = override_content_type;
     }
   }
 
-  clazz = mime_find_class(content_type, hdrs, opts, PR_FALSE);
+  clazz = mime_find_class(content_type, hdrs, opts, false);
 
   NS_ASSERTION(clazz, "1.1 <rhp@netscape.com> 19 Mar 1999 12:00");
   if (!clazz) goto FAIL;
 
   if (opts && opts->part_to_load)
   /* Always ignore Content-Disposition when we're loading some specific
      sub-part (which may be within some container that we wouldn't otherwise
      descend into, if the container itself had a Content-Disposition of
@@ -927,17 +927,17 @@ mime_create (const char *content_type, M
   {
     /* Check to see if the plugin should override the content disposition
        to make it appear inline. One example is a vcard which has a content
        disposition of an "attachment;" */
     if (force_inline_display(content_type))
       NS_MsgSACopy(&content_disposition, "inline");
     else
       content_disposition = (hdrs
-                 ? MimeHeaders_get(hdrs, HEADER_CONTENT_DISPOSITION, PR_TRUE, PR_FALSE)
+                 ? MimeHeaders_get(hdrs, HEADER_CONTENT_DISPOSITION, true, false)
                  : 0);
   }
 
   if (!content_disposition || !PL_strcasecmp(content_disposition, "inline"))
     ;  /* Use the class we've got. */
   else
   {
     //
@@ -1058,17 +1058,17 @@ mime_classinit(MimeObjectClass *clazz)
   }
 
   /* Now run each of the superclass-init procedures in turn,
    parentmost-first. */
   status = mime_classinit_1(clazz, clazz);
   if (status < 0) return status;
 
   /* Now we're done. */
-  clazz->class_initialized = PR_TRUE;
+  clazz->class_initialized = true;
   return 0;
 }
 
 static int
 mime_classinit_1(MimeObjectClass *clazz, MimeObjectClass *target)
 {
   int status;
   if (clazz->superclass)
@@ -1079,19 +1079,19 @@ mime_classinit_1(MimeObjectClass *clazz,
   return clazz->class_initialize(target);
 }
 
 
 bool
 mime_subclass_p(MimeObjectClass *child, MimeObjectClass *parent)
 {
   if (child == parent)
-  return PR_TRUE;
+  return true;
   else if (!child->superclass)
-  return PR_FALSE;
+  return false;
   else
   return mime_subclass_p(child->superclass, parent);
 }
 
 bool
 mime_typep(MimeObject *obj, MimeObjectClass *clazz)
 {
   return mime_subclass_p(obj->clazz, clazz);
@@ -1166,82 +1166,82 @@ mime_part_address(MimeObject *obj)
    Return value must be freed by the caller.
  */
 char *
 mime_imap_part_address(MimeObject *obj)
 {
   if (!obj || !obj->headers)
     return 0;
   else
-    return MimeHeaders_get(obj->headers, IMAP_EXTERNAL_CONTENT_HEADER, PR_FALSE, PR_FALSE);
+    return MimeHeaders_get(obj->headers, IMAP_EXTERNAL_CONTENT_HEADER, false, false);
 }
 
 /* Returns a full URL if the current mime object has a EXTERNAL_ATTACHMENT_URL_HEADER
    header.
    Return value must be freed by the caller.
 */
 char *
 mime_external_attachment_url(MimeObject *obj)
 {
   if (!obj || !obj->headers)
     return 0;
   else
-    return MimeHeaders_get(obj->headers, EXTERNAL_ATTACHMENT_URL_HEADER, PR_FALSE, PR_FALSE);
+    return MimeHeaders_get(obj->headers, EXTERNAL_ATTACHMENT_URL_HEADER, false, false);
 }
 
 #ifdef ENABLE_SMIME
 /* Asks whether the given object is one of the cryptographically signed
    or encrypted objects that we know about.  (MimeMessageClass uses this
    to decide if the headers need to be presented differently.)
  */
 bool
 mime_crypto_object_p(MimeHeaders *hdrs, bool clearsigned_counts)
 {
   char *ct;
   MimeObjectClass *clazz;
 
-  if (!hdrs) return PR_FALSE;
+  if (!hdrs) return false;
 
-  ct = MimeHeaders_get (hdrs, HEADER_CONTENT_TYPE, PR_TRUE, PR_FALSE);
-  if (!ct) return PR_FALSE;
+  ct = MimeHeaders_get (hdrs, HEADER_CONTENT_TYPE, true, false);
+  if (!ct) return false;
 
   /* Rough cut -- look at the string before doing a more complex comparison. */
   if (PL_strcasecmp(ct, MULTIPART_SIGNED) &&
     PL_strncasecmp(ct, "application/", 12))
   {
     PR_Free(ct);
-    return PR_FALSE;
+    return false;
   }
 
   /* It's a candidate for being a crypto object.  Let's find out for sure... */
-  clazz = mime_find_class (ct, hdrs, 0, PR_TRUE);
+  clazz = mime_find_class (ct, hdrs, 0, true);
   PR_Free(ct);
 
   if (clazz == ((MimeObjectClass *)&mimeEncryptedCMSClass))
-  return PR_TRUE;
+  return true;
   else if (clearsigned_counts &&
        clazz == ((MimeObjectClass *)&mimeMultipartSignedCMSClass))
-  return PR_TRUE;
+  return true;
   else
-  return PR_FALSE;
+  return false;
 }
 
 /* Whether the given object has written out the HTML version of its headers
    in such a way that it will have a "crypto stamp" next to the headers.  If
    this is true, then the child must write out its HTML slightly differently
    to take this into account...
  */
 bool
 mime_crypto_stamped_p(MimeObject *obj)
 {
-  if (!obj) return PR_FALSE;
+  if (!obj) return false;
   if (mime_typep (obj, (MimeObjectClass *) &mimeMessageClass))
   return ((MimeMessage *) obj)->crypto_stamped_p;
   else
-  return PR_FALSE;
+  return false;
 }
 
 #endif // ENABLE_SMIME
 
 /* Puts a part-number into a URL.  If append_p is true, then the part number
    is appended to any existing part-number already in that URL; otherwise,
    it replaces it.
  */
@@ -1265,17 +1265,17 @@ mime_set_url_part(const char *url, const
       urlString.Replace(typeIndex, 1, '?');
     url = urlString.get();
   }
 
   for (s = url; *s; s++)
   {
     if (*s == '?')
     {
-      got_q = PR_TRUE;
+      got_q = true;
       if (!PL_strncasecmp(s, "?part=", 6))
       part_begin = (s += 6);
     }
     else if (got_q && *s == '&' && !PL_strncasecmp(s, "&part=", 6))
     part_begin = (s += 6);
 
     if (part_begin)
     {
@@ -1416,17 +1416,17 @@ mime_address_to_part(const char *part, M
 char *
 mime_find_content_type_of_part(const char *part, MimeObject *obj)
 {
   char *result = 0;
 
   obj = mime_address_to_part(part, obj);
   if (!obj) return 0;
 
-  result = (obj->headers ? MimeHeaders_get(obj->headers, HEADER_CONTENT_TYPE, PR_TRUE, PR_FALSE) : 0);
+  result = (obj->headers ? MimeHeaders_get(obj->headers, HEADER_CONTENT_TYPE, true, false) : 0);
 
   return result;
 }
 
 /* Given a part ID, looks through the MimeObject tree for a sub-part whose ID
    number matches; if one is found, returns the Content-Name of that part.
    Else returns NULL.  (part is not a URL -- it's of the form "1.3.5".)
  */
@@ -1584,30 +1584,30 @@ mime_parse_url_options(const char *url, 
       options->rot13_p = end <= value || !PL_strncasecmp ("true", value, end - value);
     }
     else if (!PL_strncasecmp ("emitter", q, name_end - q))
     {
       if ((end > value) && !PL_strncasecmp ("js", value, end - value))
       {
         // the js emitter needs to hear about nested message bodies
         //  in order to build a proper representation.
-        options->notify_nested_bodies = PR_TRUE;
+        options->notify_nested_bodies = true;
         // show_attachment_inline_p has the side-effect of letting the
         //  emitter see all parts of a multipart/alternative, which it
         //  really appreciates.
-        options->show_attachment_inline_p = PR_TRUE;
+        options->show_attachment_inline_p = true;
         // however, show_attachment_inline_p also results in a few
         //  subclasses writing junk into the body for display purposes.
         // put a stop to these shenanigans by enabling write_pure_bodies.
         //  current offenders are:
         //  - MimeInlineImage
-        options->write_pure_bodies = PR_TRUE;
+        options->write_pure_bodies = true;
         // we don't actually care about the data in the attachments, just the
         // metadata (i.e. size)
-        options->metadata_only = PR_TRUE;
+        options->metadata_only = true;
       }
     }
 
     q = end;
     if (*q)
       q++;
   }
 
@@ -1714,49 +1714,49 @@ MimeOptions_write(MimeDisplayOptions *op
 
   closure = opt->output_closure;
   if (!closure) closure = opt->stream_closure;
 
 //  PR_ASSERT(opt->state->first_data_written_p);
 
   if (opt->state->separator_queued_p && user_visible_p)
   {
-    opt->state->separator_queued_p = PR_FALSE;
+    opt->state->separator_queued_p = false;
     if (opt->state->separator_suppressed_p)
-      opt->state->separator_suppressed_p = PR_FALSE;
+      opt->state->separator_suppressed_p = false;
     else {
       const char *sep = "<BR><FIELDSET CLASS=\"mimeAttachmentHeader\">";
       int lstatus = opt->output_fn(sep, strlen(sep), closure);
-      opt->state->separator_suppressed_p = PR_FALSE;
+      opt->state->separator_suppressed_p = false;
       if (lstatus < 0) return lstatus;
 
       if (!name.IsEmpty()) {
           sep = "<LEGEND CLASS=\"mimeAttachmentHeaderName\">";
           lstatus = opt->output_fn(sep, strlen(sep), closure);
-          opt->state->separator_suppressed_p = PR_FALSE;
+          opt->state->separator_suppressed_p = false;
           if (lstatus < 0) return lstatus;
 
           lstatus = opt->output_fn(name.get(), name.Length(), closure);
-          opt->state->separator_suppressed_p = PR_FALSE;
+          opt->state->separator_suppressed_p = false;
           if (lstatus < 0) return lstatus;
 
           sep = "</LEGEND>";
           lstatus = opt->output_fn(sep, strlen(sep), closure);
-          opt->state->separator_suppressed_p = PR_FALSE;
+          opt->state->separator_suppressed_p = false;
           if (lstatus < 0) return lstatus;
       }
 
       sep = "</FIELDSET><BR/>";
       lstatus = opt->output_fn(sep, strlen(sep), closure);
-      opt->state->separator_suppressed_p = PR_FALSE;
+      opt->state->separator_suppressed_p = false;
       if (lstatus < 0) return lstatus;
     }
   }
   if (user_visible_p)
-  opt->state->separator_suppressed_p = PR_FALSE;
+  opt->state->separator_suppressed_p = false;
 
   if (length > 0)
   {
     status = opt->output_fn(data, length, closure);
     if (status < 0) return status;
   }
 
   return 0;
@@ -1767,17 +1767,17 @@ MimeObject_write(MimeObject *obj, const 
          bool user_visible_p)
 {
   if (!obj->output_p) return 0;
 
   // if we're stripping attachments, check if any parent is not being ouput
   if (obj->options->format_out == nsMimeOutput::nsMimeMessageAttach)
   {
     // if true, mime generates a separator in html - we don't want that.
-    user_visible_p = PR_FALSE;
+    user_visible_p = false;
 
     for (MimeObject *parent = obj->parent; parent; parent = parent->parent)
     {
       if (!parent->output_p)
         return 0;
     }
   }
   if (!obj->options->state->first_data_written_p)
@@ -1794,17 +1794,17 @@ MimeObject_write(MimeObject *obj, const 
 }
 
 int
 MimeObject_write_separator(MimeObject *obj)
 {
   if (obj->options && obj->options->state &&
       // we never want separators if we are asking for pure bodies
       !obj->options->write_pure_bodies)
-    obj->options->state->separator_queued_p = PR_TRUE;
+    obj->options->state->separator_queued_p = true;
   return 0;
 }
 
 int
 MimeObject_output_init(MimeObject *obj, const char *content_type)
 {
   if (obj &&
     obj->options &&
@@ -1812,35 +1812,35 @@ MimeObject_output_init(MimeObject *obj, 
     !obj->options->state->first_data_written_p)
   {
     int status;
     const char *charset = 0;
     char *name = 0, *x_mac_type = 0, *x_mac_creator = 0;
 
     if (!obj->options->output_init_fn)
     {
-      obj->options->state->first_data_written_p = PR_TRUE;
+      obj->options->state->first_data_written_p = true;
       return 0;
     }
 
     if (obj->headers)
     {
       char *ct;
       name = MimeHeaders_get_name(obj->headers, obj->options);
 
       ct = MimeHeaders_get(obj->headers, HEADER_CONTENT_TYPE,
-                 PR_FALSE, PR_FALSE);
+                 false, false);
       if (ct)
       {
         x_mac_type   = MimeHeaders_get_parameter(ct, PARAM_X_MAC_TYPE, NULL, NULL);
         x_mac_creator= MimeHeaders_get_parameter(ct, PARAM_X_MAC_CREATOR, NULL, NULL);
         /* if don't have a x_mac_type and x_mac_creator, we need to try to get it from its parent */
         if (!x_mac_type && !x_mac_creator && obj->parent && obj->parent->headers)
         {
-          char * ctp = MimeHeaders_get(obj->parent->headers, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
+          char * ctp = MimeHeaders_get(obj->parent->headers, HEADER_CONTENT_TYPE, false, false);
           if (ctp)
           {
             x_mac_type   = MimeHeaders_get_parameter(ctp, PARAM_X_MAC_TYPE, NULL, NULL);
             x_mac_creator= MimeHeaders_get_parameter(ctp, PARAM_X_MAC_CREATOR, NULL, NULL);
             PR_Free(ctp);
           }
         }
 
@@ -1877,17 +1877,17 @@ MimeObject_output_init(MimeObject *obj, 
       ResetChannelCharset(obj);
 
     status = obj->options->output_init_fn (content_type, charset, name,
                        x_mac_type, x_mac_creator,
                        obj->options->stream_closure);
     PR_FREEIF(name);
     PR_FREEIF(x_mac_type);
     PR_FREEIF(x_mac_creator);
-    obj->options->state->first_data_written_p = PR_TRUE;
+    obj->options->state->first_data_written_p = true;
     return status;
   }
   return 0;
 }
 
 char *
 mime_get_base_url(const char *url)
 {
--- a/mailnews/mime/src/mimei.h
+++ b/mailnews/mime/src/mimei.h
@@ -371,19 +371,19 @@ extern bool mime_crypto_stamped_p(MimeOb
 extern void mime_set_crypto_stamp(MimeObject *obj,
                   bool signed_p, bool encrypted_p);
 #endif // ENABLE_SMIME
 
 class MimeParseStateObject {
 public:
 
   MimeParseStateObject()
-      {root = 0; separator_queued_p = PR_FALSE; separator_suppressed_p = PR_FALSE;
-        first_part_written_p = PR_FALSE; post_header_html_run_p = PR_FALSE; first_data_written_p = PR_FALSE;
-        decrypted_p = PR_FALSE; strippingPart = PR_FALSE;
+      {root = 0; separator_queued_p = false; separator_suppressed_p = false;
+        first_part_written_p = false; post_header_html_run_p = false; first_data_written_p = false;
+        decrypted_p = false; strippingPart = false;
       }
   MimeObject *root;        /* The outermost parser object. */
 
   bool separator_queued_p;  /* Whether a separator should be written out
                    before the next text is written (this lets
                    us write separators lazily, so that one
                    doesn't appear at the end, and so that more
                    than one don't appear in a row.) */
@@ -414,17 +414,17 @@ public:
 
 
 /* Some output-generation utility functions...
  */
 extern int MimeObject_output_init(MimeObject *obj, const char *content_type);
 
 /* The `user_visible_p' argument says whether the output that has just been
    written will cause characters or images to show up on the screen, that
-   is, it should be PR_FALSE if the stuff being written is merely structural
+   is, it should be false if the stuff being written is merely structural
    HTML or whitespace ("<P>", "</TABLE>", etc.)  This information is used
    when making the decision of whether a separating <HR> is needed.
  */
 extern int MimeObject_write(MimeObject *, const char *data, PRInt32 length,
                             bool user_visible_p);
 extern int MimeOptions_write(MimeDisplayOptions *, nsCString &name,
                              const char *data, PRInt32 length,
                              bool user_visible_p);
--- a/mailnews/mime/src/mimeiimg.cpp
+++ b/mailnews/mime/src/mimeiimg.cpp
@@ -119,21 +119,21 @@ MimeInlineImage_parse_begin (MimeObject 
     if (!part) return MIME_OUT_OF_MEMORY;
 
       char *no_part_url = nsnull;
       if (obj->options->part_to_load && obj->options->format_out == nsMimeOutput::nsMimeMessageBodyDisplay)
         no_part_url = mime_get_base_url(obj->options->url);
 
         if (no_part_url)
         {
-          image_url = mime_set_url_part(no_part_url, part, PR_TRUE);
+          image_url = mime_set_url_part(no_part_url, part, true);
           PR_Free(no_part_url);
         }
         else
-          image_url = mime_set_url_part(obj->options->url, part, PR_TRUE);
+          image_url = mime_set_url_part(obj->options->url, part, true);
 
     if (!image_url)
     {
       PR_Free(part);
       return MIME_OUT_OF_MEMORY;
     }
     PR_Free(part);
 
@@ -162,17 +162,17 @@ MimeInlineImage_parse_begin (MimeObject 
       obj->options->image_begin(url_with_filename.get(), ct, obj->options->stream_closure);
     PR_Free(image_url);
 
     if (!img->image_data) return MIME_OUT_OF_MEMORY;
 
     html = obj->options->make_image_html(img->image_data);
     if (!html) return MIME_OUT_OF_MEMORY;
 
-    status = MimeObject_write(obj, html, strlen(html), PR_TRUE);
+    status = MimeObject_write(obj, html, strlen(html), true);
     PR_Free(html);
     if (status < 0) return status;
   }
 
   //
   // Now we are going to see if we should set the content type in the
   // URI for the url being run...
   //
@@ -193,17 +193,17 @@ static int
 MimeInlineImage_parse_eof (MimeObject *obj, bool abort_p)
 {
   MimeInlineImage *img = (MimeInlineImage *) obj;
   int status;
   if (obj->closed_p) return 0;
 
   /* Force out any buffered data from the superclass (the base64 decoder.) */
   status = ((MimeObjectClass*)&MIME_SUPERCLASS)->parse_eof(obj, abort_p);
-  if (status < 0) abort_p = PR_TRUE;
+  if (status < 0) abort_p = true;
 
   if (img->image_data)
   {
     obj->options->image_end(img->image_data,
                 (status < 0 ? status : (abort_p ? -1 : 0)));
     img->image_data = 0;
   }
 
@@ -238,17 +238,17 @@ MimeInlineImage_parse_decoded_buffer (co
 
     if (!obj->options->state->first_data_written_p)
     {
       status = MimeObject_output_init(obj, 0);
       if (status < 0) return status;
       NS_ASSERTION(obj->options->state->first_data_written_p, "1.1 <rhp@netscape.com> 19 Mar 1999 12:00");
     }
 
-    return MimeObject_write(obj, buf, size, PR_TRUE);
+    return MimeObject_write(obj, buf, size, true);
   }
 
 
   if (!obj->options ||
     !obj->options->image_write_buffer)
   return 0;
 
   /* If we don't have any image data, the image_end method must have already
--- a/mailnews/mime/src/mimeleaf.cpp
+++ b/mailnews/mime/src/mimeleaf.cpp
@@ -91,23 +91,23 @@ MimeLeaf_initialize (MimeObject *obj)
   return ((MimeObjectClass*)&MIME_SUPERCLASS)->initialize(obj);
 }
 
 
 static void
 MimeLeaf_finalize (MimeObject *object)
 {
   MimeLeaf *leaf = (MimeLeaf *)object;
-  object->clazz->parse_eof (object, PR_FALSE);
+  object->clazz->parse_eof (object, false);
 
   /* Free the decoder data, if it's still around.  It was probably freed
    in MimeLeaf_parse_eof(), but just in case... */
   if (leaf->decoder_data)
   {
-    MimeDecoderDestroy(leaf->decoder_data, PR_TRUE);
+    MimeDecoderDestroy(leaf->decoder_data, true);
     leaf->decoder_data = 0;
   }
 
   ((MimeObjectClass*)&MIME_SUPERCLASS)->finalize (object);
 }
 
 
 static int
@@ -197,17 +197,17 @@ MimeLeaf_parse_line (const char *line, P
 
 static int
 MimeLeaf_close_decoder (MimeObject *obj)
 {
   MimeLeaf *leaf = (MimeLeaf *) obj;
 
   if (leaf->decoder_data)
   {
-      int status = MimeDecoderDestroy(leaf->decoder_data, PR_FALSE);
+      int status = MimeDecoderDestroy(leaf->decoder_data, false);
       leaf->decoder_data = 0;
       return status;
   }
 
   return 0;
 }
 
 
@@ -231,10 +231,10 @@ MimeLeaf_parse_eof (MimeObject *obj, boo
    */
   return ((MimeObjectClass*)&MIME_SUPERCLASS)->parse_eof (obj, abort_p);
 }
 
 
 static bool
 MimeLeaf_displayable_inline_p (MimeObjectClass *clazz, MimeHeaders *hdrs)
 {
-  return PR_TRUE;
+  return true;
 }
--- a/mailnews/mime/src/mimemalt.cpp
+++ b/mailnews/mime/src/mimemalt.cpp
@@ -229,38 +229,38 @@ MimeMultipartAlternative_flush_children(
   if (! malt->pending_parts)
     return NS_OK;
 
   have_displayable =
     MimeMultipartAlternative_display_part_p(obj, malt->buffered_hdrs[0]);
   
   if (finished && have_displayable) {
     /* Case 2 */
-    do_flush = PR_TRUE;
-    do_display = PR_TRUE;
+    do_flush = true;
+    do_display = true;
   }
   else if (finished && ! have_displayable) {
     /* Case 3 */
-    do_flush = PR_TRUE;
-    do_display = PR_FALSE;
+    do_flush = true;
+    do_display = false;
   }
   else if (! finished && have_displayable && next_is_displayable) {
     /* Case 4 */
-    do_flush = PR_TRUE;
-    do_display = PR_FALSE;
+    do_flush = true;
+    do_display = false;
   }
   else if (! finished && have_displayable && ! next_is_displayable) {
     /* Case 5 */
-    do_flush = PR_FALSE;
-    do_display = PR_FALSE;
+    do_flush = false;
+    do_display = false;
   }
   else if (! finished && ! have_displayable) {
     /* Case 6 */
-    do_flush = PR_TRUE;
-    do_display = PR_FALSE;
+    do_flush = true;
+    do_display = false;
   }
   else {
     NS_ERROR("mimemalt.cpp: logic error in flush_children");
     return NS_ERROR_FAILURE;
   }
   
   if (do_flush) {
     PRInt32 i;
@@ -283,17 +283,17 @@ MimeMultipartAlternative_parse_eof (Mime
   int status = 0;
 
   if (obj->closed_p) return 0;
 
   status = ((MimeObjectClass*)&MIME_SUPERCLASS)->parse_eof(obj, abort_p);
   if (status < 0) return status;
 
 
-  status = MimeMultipartAlternative_flush_children(obj, PR_TRUE, PR_FALSE);
+  status = MimeMultipartAlternative_flush_children(obj, true, false);
   if (status < 0)
     return status;
 
   MimeMultipartAlternative_cleanup(obj);
 
   return status;
 }
 
@@ -302,17 +302,17 @@ static int
 MimeMultipartAlternative_create_child(MimeObject *obj)
 {
   MimeMultipart *mult = (MimeMultipart *) obj;
   MimeMultipartAlternative *malt = (MimeMultipartAlternative *) obj;
 
   bool displayable =
     MimeMultipartAlternative_display_part_p (obj, mult->hdrs);
 
-  MimeMultipartAlternative_flush_children(obj, PR_FALSE, displayable);
+  MimeMultipartAlternative_flush_children(obj, false, displayable);
   
   mult->state = MimeMultipartPartFirstLine;
   PRInt32 i = malt->pending_parts++;
   if (malt->pending_parts > malt->max_parts) {
     malt->max_parts = malt->pending_parts;
     malt->buffered_hdrs = (MimeHeaders **)
       PR_REALLOC(malt->buffered_hdrs, malt->max_parts *
                  sizeof *malt->buffered_hdrs);
@@ -374,19 +374,19 @@ MimeMultipartAlternative_close_child(Mim
   return 0;
 }
 
 
 static bool
 MimeMultipartAlternative_display_part_p(MimeObject *self,
                     MimeHeaders *sub_hdrs)
 {
-  char *ct = MimeHeaders_get (sub_hdrs, HEADER_CONTENT_TYPE, PR_TRUE, PR_FALSE);
+  char *ct = MimeHeaders_get (sub_hdrs, HEADER_CONTENT_TYPE, true, false);
   if (!ct)
-    return PR_FALSE;
+    return false;
 
   /* RFC 1521 says:
      Receiving user agents should pick and display the last format
      they are capable of displaying.  In the case where one of the
      alternatives is itself of type "multipart" and contains unrecognized
      sub-parts, the user agent may choose either to show that alternative,
      an earlier alternative, or both.
 
@@ -404,48 +404,48 @@ MimeMultipartAlternative_display_part_p(
   if (prefer_plaintext
       && self->options->format_out != nsMimeOutput::nsMimeMessageSaveAs
       && (!PL_strncasecmp(ct, "text/html", 9) ||
           !PL_strncasecmp(ct, "text/enriched", 13) ||
           !PL_strncasecmp(ct, "text/richtext", 13))
      )
     // if the user prefers plaintext and this is the "rich" (e.g. HTML) part...
   {
-    return PR_FALSE;
+    return false;
   }
 
-  MimeObjectClass *clazz = mime_find_class (ct, sub_hdrs, self->options, PR_TRUE);
+  MimeObjectClass *clazz = mime_find_class (ct, sub_hdrs, self->options, true);
   bool result = (clazz
           ? clazz->displayable_inline_p(clazz, sub_hdrs)
-          : PR_FALSE);
+          : false);
   PR_FREEIF(ct);
   return result;
 }
 
 static int
 MimeMultipartAlternative_display_cached_part(MimeObject *obj,
                                              MimeHeaders *hdrs,
                                              MimePartBufferData *buffer,
                                              bool do_display)
 {
   int status;
 
   char *ct = (hdrs
-        ? MimeHeaders_get (hdrs, HEADER_CONTENT_TYPE, PR_TRUE, PR_FALSE)
+        ? MimeHeaders_get (hdrs, HEADER_CONTENT_TYPE, true, false)
         : 0);
   const char *dct = (((MimeMultipartClass *) obj->clazz)->default_part_type);
   MimeObject *body;
   /** Don't pass in NULL as the content-type (this means that the
    * auto-uudecode-hack won't ever be done for subparts of a
    * multipart, but only for untyped children of message/rfc822.
    */
   const char *uct = (ct && *ct) ? ct : (dct ? dct: TEXT_PLAIN);
 
   // We always want to display the cached part inline.
-  body = mime_create(uct, hdrs, obj->options, PR_TRUE);
+  body = mime_create(uct, hdrs, obj->options, true);
   PR_FREEIF(ct);
   if (!body) return MIME_OUT_OF_MEMORY;
   body->output_p = do_display;
 
   status = ((MimeContainerClass *) obj->clazz)->add_child(obj, body);
   if (status < 0)
   {
     mime_free(body);
@@ -519,19 +519,19 @@ MimeMultipartAlternative_display_cached_
                    `void' argument into `MimeObject'. */
                   ((nsresult (*) (const char *, PRInt32, void *))
                   body->clazz->parse_buffer),
                   body);
 
   if (status < 0) return status;
 
   /* Done parsing. */
-  status = body->clazz->parse_eof(body, PR_FALSE);
+  status = body->clazz->parse_eof(body, false);
   if (status < 0) return status;
-  status = body->clazz->parse_end(body, PR_FALSE);
+  status = body->clazz->parse_end(body, false);
   if (status < 0) return status;
 
 #ifdef MIME_DRAFTS
   if (decomposeFile)
   {
     status = obj->options->decompose_file_close_fn ( obj->options->stream_closure );
     if (status < 0) return status;
   }
--- a/mailnews/mime/src/mimemapl.cpp
+++ b/mailnews/mime/src/mimemapl.cpp
@@ -85,17 +85,17 @@ MimeMultipartAppleDouble_parse_begin (Mi
     status = MimeObject_output_init(obj, 0);
     if (status < 0) return status;
     NS_ASSERTION(obj->options->state->first_data_written_p, "first data not written");
   }
 
 #ifdef XP_MACOSX
   if (obj->options && obj->options->state)
   {
-//  obj->options->state->separator_suppressed_p = PR_TRUE;
+//  obj->options->state->separator_suppressed_p = true;
   goto done;
   }
   /*
    * It would be nice to not showing the resource fork links
    * if we are displaying inline. But, there is no way we could
    * know ahead of time that we could display the data fork and
    * the data fork is always hidden on MAC platform.
    */
@@ -124,17 +124,17 @@ MimeMultipartAppleDouble_parse_begin (Mi
       if (id_imap && id)
       {
       /* if this is an IMAP part. */
       id_url = mime_set_url_imap_part(url, id_imap, id);
       }
       else
       {
       /* This is just a normal MIME part as usual. */
-      id_url = mime_set_url_part(url, id, PR_TRUE);
+      id_url = mime_set_url_part(url, id, true);
       }
       if (!id_url)
       {
         PR_Free(id);
         return MIME_OUT_OF_MEMORY;
       }
     }
 
@@ -161,19 +161,19 @@ MimeMultipartAppleDouble_parse_begin (Mi
     }
 
     if (all_headers_p &&
       // Don't bother showing all headers on this part if it's the only
       // part in the message: in that case, we've already shown these
       // headers.
       obj->options->state &&
       obj->options->state->root == obj->parent)
-    all_headers_p = PR_FALSE;
+    all_headers_p = false;
 
-    newopt.fancy_headers_p = PR_TRUE;
+    newopt.fancy_headers_p = true;
     newopt.headers = (all_headers_p ? MimeHeadersAll : MimeHeadersSome);
 
 //
 RICHIE SHERRY
 GOTTA STILL DO THIS FOR QUOTING!
      status = MimeHeaders_write_attachment_box (obj->headers, &newopt,
                                                  obj->content_type,
                                                  obj->encoding,
@@ -205,17 +205,17 @@ MimeMultipartAppleDouble_output_child_p(
    the first one should always be an application/applefile.)
    */
 
   if (cont->nchildren >= 1 && cont->children[0] == child && child->content_type &&
       !PL_strcasecmp(child->content_type, APPLICATION_APPLEFILE))
   {
 #ifdef XP_MACOSX
     if (obj->output_p && obj->options && obj->options->write_html_p) //output HTML
-      return PR_FALSE;
+      return false;
 #else
     /* if we are not on a Macintosh, don't emitte the resources fork at all. */
-    return PR_FALSE;
+    return false;
 #endif
   }
 
-  return PR_TRUE;
+  return true;
 }
--- a/mailnews/mime/src/mimemcms.cpp
+++ b/mailnews/mime/src/mimemcms.cpp
@@ -115,21 +115,21 @@ typedef struct MimeMultCMSdata
   MimeObject *self;
   bool parent_is_encrypted_p;
   bool parent_holds_stamp_p;
   nsCOMPtr<nsIMsgSMIMEHeaderSink> smimeHeaderSink;
 
   MimeMultCMSdata()
   :hash_type(0),
   sender_addr(nsnull),
-  decoding_failed(PR_FALSE),
+  decoding_failed(false),
   item_data(nsnull),
   self(nsnull),
-  parent_is_encrypted_p(PR_FALSE),
-  parent_holds_stamp_p(PR_FALSE)
+  parent_is_encrypted_p(false),
+  parent_holds_stamp_p(false)
   {
   }
 
   ~MimeMultCMSdata()
   {
     PR_FREEIF(sender_addr);
 
     // Do a graceful shutdown of the nsICMSDecoder and release the nsICMSMessage //
@@ -167,17 +167,17 @@ static void *
 MimeMultCMS_init (MimeObject *obj)
 {
   MimeHeaders *hdrs = obj->headers;
   MimeMultCMSdata *data = 0;
   char *ct, *micalg;
   PRInt16 hash_type;
   nsresult rv;
 
-  ct = MimeHeaders_get (hdrs, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
+  ct = MimeHeaders_get (hdrs, HEADER_CONTENT_TYPE, false, false);
   if (!ct) return 0; /* #### bogus message?  out of memory? */
   micalg = MimeHeaders_get_parameter (ct, PARAM_MICALG, NULL, NULL);
   PR_Free(ct);
   ct = 0;
   if (!micalg) return 0; /* #### bogus message?  out of memory? */
 
   if (!PL_strcasecmp(micalg, PARAM_MICALG_MD5) ||
       !PL_strcasecmp(micalg, PARAM_MICALG_MD5_2))
@@ -319,17 +319,17 @@ static int
 MimeMultCMS_data_eof (void *crypto_closure, bool abort_p)
 {
   MimeMultCMSdata *data = (MimeMultCMSdata *) crypto_closure;
   if (!data || !data->data_hash_context) {
     return -1;
   }
 
   nsCAutoString hashString;
-  data->data_hash_context->Finish(PR_FALSE, hashString);
+  data->data_hash_context->Finish(false, hashString);
   PR_SetError(0, 0);
 
   data->item_len  = hashString.Length();
   data->item_data = new unsigned char[data->item_len];
   if (!data->item_data) return MIME_OUT_OF_MEMORY;
 
   memcpy(data->item_data, hashString.get(), data->item_len);
 
@@ -353,17 +353,17 @@ MimeMultCMS_sig_init (void *crypto_closu
   char *ct;
   int status = 0;
   nsresult rv;
 
   if (!signature_hdrs) {
     return -1;
   }
 
-  ct = MimeHeaders_get (signature_hdrs, HEADER_CONTENT_TYPE, PR_TRUE, PR_FALSE);
+  ct = MimeHeaders_get (signature_hdrs, HEADER_CONTENT_TYPE, true, false);
 
   /* Verify that the signature object is of the right type. */
   if (!ct || /* is not a signature type */
              (PL_strcasecmp(ct, APPLICATION_XPKCS7_SIGNATURE) != 0
               && PL_strcasecmp(ct, APPLICATION_PKCS7_SIGNATURE) != 0)) {
     status = -1; /* #### error msg about bogus message */
   }
   PR_FREEIF(ct);
--- a/mailnews/mime/src/mimemoz2.cpp
+++ b/mailnews/mime/src/mimemoz2.cpp
@@ -156,17 +156,17 @@ ProcessBodyAsAttachment(MimeObject *obj,
   n = 1;
   *data = new nsMsgAttachmentData[2];
   if (!*data)
     return NS_ERROR_OUT_OF_MEMORY;
 
   tmp = *data;
   tmp->m_realType = child->content_type;
   tmp->m_realEncoding = child->encoding;
-  disp = MimeHeaders_get(child->headers, HEADER_CONTENT_DISPOSITION, PR_FALSE, PR_FALSE);
+  disp = MimeHeaders_get(child->headers, HEADER_CONTENT_DISPOSITION, false, false);
   tmp->m_realName.Adopt(MimeHeaders_get_parameter(disp, "name", &charset, NULL));
   if (!tmp->m_realName.IsEmpty())
   {
     char *fname = NULL;
     fname = mime_decode_filename(tmp->m_realName.get(), charset, obj->options);
     nsMemory::Free(charset);
     if (fname)
       tmp->m_realName.Adopt(fname);
@@ -208,32 +208,32 @@ ProcessBodyAsAttachment(MimeObject *obj,
     {
       // if this is an IMAP part.
       tmpURL = mime_set_url_imap_part(url, id_imap, id);
       rv = nsMimeNewURI(getter_AddRefs(tmp->m_url), tmpURL, nsnull);
     }
     else
     {
       // This is just a normal MIME part as usual.
-      tmpURL = mime_set_url_part(url, id, PR_TRUE);
+      tmpURL = mime_set_url_part(url, id, true);
       rv = nsMimeNewURI(getter_AddRefs(tmp->m_url), tmpURL, nsnull);
     }
 
     if (!tmp->m_url || NS_FAILED(rv))
     {
       PR_FREEIF(*data);
       PR_FREEIF(id);
       PR_FREEIF(id_imap);
       return NS_ERROR_OUT_OF_MEMORY;
     }
   }
   PR_FREEIF(id);
   PR_FREEIF(id_imap);
   PR_FREEIF(tmpURL);
-  tmp->m_description.Adopt(MimeHeaders_get(child->headers, HEADER_CONTENT_DESCRIPTION, PR_FALSE, PR_FALSE));
+  tmp->m_description.Adopt(MimeHeaders_get(child->headers, HEADER_CONTENT_DESCRIPTION, false, false));
 
   tmp->m_size = 0;
   MimeGetSize(child, &tmp->m_size);
 
   return NS_OK;
 }
 
 PRInt32
@@ -333,38 +333,38 @@ GenerateAttachmentData(MimeObject *objec
     return NS_ERROR_OUT_OF_MEMORY;
 
   if (options->missing_parts)
     imappart.Adopt(mime_imap_part_address(object));
 
   char *urlSpec = nsnull;
   if (!imappart.IsEmpty())
   {
-    isIMAPPart = PR_TRUE;
+    isIMAPPart = true;
     urlSpec = mime_set_url_imap_part(aMessageURL, imappart.get(), part.get());
   }
   else
   {
-    isIMAPPart = PR_FALSE;
+    isIMAPPart = false;
     char *no_part_url = nsnull;
     if (options->part_to_load && options->format_out == nsMimeOutput::nsMimeMessageBodyDisplay)
       no_part_url = mime_get_base_url(aMessageURL);
     if (no_part_url) {
-      urlSpec = mime_set_url_part(no_part_url, part.get(), PR_TRUE);
+      urlSpec = mime_set_url_part(no_part_url, part.get(), true);
       PR_Free(no_part_url);
     }
     else
     {
       // if the mime object contains an external attachment URL, then use it, otherwise
       // fall back to creating an attachment url based on the message URI and the
       // part number.
       urlSpec = mime_external_attachment_url(object);
-      isExternalAttachment = urlSpec ? PR_TRUE : PR_FALSE;
+      isExternalAttachment = urlSpec ? true : false;
       if (!urlSpec)
-        urlSpec = mime_set_url_part(aMessageURL, part.get(), PR_TRUE);
+        urlSpec = mime_set_url_part(aMessageURL, part.get(), true);
     }
   }
 
   if (!urlSpec)
     return NS_ERROR_OUT_OF_MEMORY;
 
   if ((options->format_out == nsMimeOutput::nsMimeMessageBodyDisplay) && (PL_strncasecmp(aMessageURL, urlSpec, strlen(urlSpec)) == 0))
     return NS_OK;
@@ -377,26 +377,26 @@ GenerateAttachmentData(MimeObject *objec
   tmp->m_size = attSize;
 
   char *part_addr = mime_imap_part_address(object);
   tmp->m_isDownloaded = !part_addr;
   PR_FREEIF(part_addr);
 
   PRInt32 i;
   char *charset = nsnull;
-  char *disp = MimeHeaders_get(object->headers, HEADER_CONTENT_DISPOSITION, PR_FALSE, PR_FALSE);
+  char *disp = MimeHeaders_get(object->headers, HEADER_CONTENT_DISPOSITION, false, false);
   if (disp)
   {
     tmp->m_realName.Adopt(MimeHeaders_get_parameter(disp, "filename", &charset, nsnull));
     if (isAnAppleDoublePart)
       for (i = 0; i < 2 && tmp->m_realName.IsEmpty(); i ++)
       {
         PR_FREEIF(disp);
         nsMemory::Free(charset);
-        disp = MimeHeaders_get(((MimeContainer *)object)->children[i]->headers, HEADER_CONTENT_DISPOSITION, PR_FALSE, PR_FALSE);
+        disp = MimeHeaders_get(((MimeContainer *)object)->children[i]->headers, HEADER_CONTENT_DISPOSITION, false, false);
         tmp->m_realName.Adopt(MimeHeaders_get_parameter(disp, "filename", &charset, nsnull));
       }
 
     if (!tmp->m_realName.IsEmpty())
     {
       // check encoded type
       //
       // The parameter of Content-Disposition must use RFC 2231.
@@ -409,36 +409,36 @@ GenerateAttachmentData(MimeObject *objec
 
       if (fname)
         tmp->m_realName.Adopt(fname);
     }
 
     PR_FREEIF(disp);
   }
 
-  disp = MimeHeaders_get(object->headers, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
+  disp = MimeHeaders_get(object->headers, HEADER_CONTENT_TYPE, false, false);
   if (disp)
   {
     tmp->m_xMacType.Adopt(MimeHeaders_get_parameter(disp, PARAM_X_MAC_TYPE, nsnull, nsnull));
     tmp->m_xMacCreator.Adopt(MimeHeaders_get_parameter(disp, PARAM_X_MAC_CREATOR, nsnull, nsnull));
 
     if (tmp->m_realName.IsEmpty())
     {
       tmp->m_realName.Adopt(MimeHeaders_get_parameter(disp, "name", &charset, nsnull));
       if (isAnAppleDoublePart)
         // the data fork is the 2nd part, and we should ALWAYS look there first for the file name
         for (i = 1; i >= 0 && tmp->m_realName.IsEmpty(); i --)
         {
           PR_FREEIF(disp);
           nsMemory::Free(charset);
-          disp = MimeHeaders_get(((MimeContainer *)object)->children[i]->headers, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
+          disp = MimeHeaders_get(((MimeContainer *)object)->children[i]->headers, HEADER_CONTENT_TYPE, false, false);
           tmp->m_realName.Adopt(MimeHeaders_get_parameter(disp, "name", &charset, nsnull));
           tmp->m_realType.Adopt(
             MimeHeaders_get(((MimeContainer *)object)->children[i]->headers,
-                            HEADER_CONTENT_TYPE, PR_TRUE, PR_FALSE));
+                            HEADER_CONTENT_TYPE, true, false));
         }
 
       if (!tmp->m_realName.IsEmpty())
       {
         // check encoded type
         //
         // The parameter of Content-Disposition must use RFC 2231.
         // But old Netscape 4.x and Outlook Express etc. use RFC2047.
@@ -451,17 +451,17 @@ GenerateAttachmentData(MimeObject *objec
         if (fname)
           tmp->m_realName.Adopt(fname);
       }
     }
     PR_FREEIF(disp);
   }
 
   tmp->m_description.Adopt(MimeHeaders_get(object->headers, HEADER_CONTENT_DESCRIPTION,
-                                           PR_FALSE, PR_FALSE));
+                                           false, false));
 
   // Now, do the right thing with the name!
   if (tmp->m_realName.IsEmpty() && !(tmp->m_realType.LowerCaseEqualsLiteral(MESSAGE_RFC822)))
   {
     // Keep in mind that the name was provided by us and this is probably not a
     // real attachment.
     tmp->m_hasFilename = false;
     /* If this attachment doesn't have a name, just give it one... */
@@ -529,40 +529,40 @@ BuildAttachmentList(MimeObject *anObject
     if (! child->output_p)
       continue;
     
     // Skip the first child that's being output if it's in fact a message body.
     // Start by assuming that it is, until proven otherwise in the code below.
     bool skip = true;
     if (found_output)
       // not first child being output
-      skip = PR_FALSE;
+      skip = false;
     else if (! ct)
       // no content type so can't be message body
-      skip = PR_FALSE;
+      skip = false;
     else if (PL_strcasecmp (ct, TEXT_PLAIN) &&
              PL_strcasecmp (ct, TEXT_HTML) &&
              PL_strcasecmp (ct, TEXT_MDL))
       // not a type we recognize as a message body
-      skip = PR_FALSE;
+      skip = false;
     // we're displaying all body parts
     if (child->options->html_as_p == 4)
-        skip = PR_FALSE;
+        skip = false;
     if (skip && child->headers)
     {
       char * disp = MimeHeaders_get (child->headers,
                                      HEADER_CONTENT_DISPOSITION,
-                                     PR_TRUE, PR_FALSE);
+                                     true, false);
       if (MimeHeaders_get_name(child->headers, nsnull) &&
           (!disp || PL_strcasecmp(disp, "attachment")))
         // it has a filename and isn't being displayed inline
-        skip = PR_FALSE;
+        skip = false;
     }
 
-    found_output = PR_TRUE;
+    found_output = true;
     if (skip)
       continue;
 
     // We should generate an attachment for leaf object only but...
     bool isALeafObject = mime_subclass_p(child->clazz, (MimeObjectClass *) &mimeLeafClass);
 
     // ...we will generate an attachment for inline message too.
     bool isAnInlineMessage = mime_typep(child, (MimeObjectClass *) &mimeMessageClass);
@@ -640,17 +640,17 @@ MimeGetAttachmentList(MimeObject *tobj, 
   attIndex = 0;
 
   // Now, build the list!
 
   nsresult rv;
 
   if (isAnInlineMessage)
   {
-    rv = GenerateAttachmentData(obj, aMessageURL, obj->options, PR_FALSE, -1, *data);
+    rv = GenerateAttachmentData(obj, aMessageURL, obj->options, false, -1, *data);
     NS_ENSURE_SUCCESS(rv, rv);
   }
   return BuildAttachmentList((MimeObject *) cobj, *data, aMessageURL);
 }
 
 extern "C" void
 MimeFreeAttachmentList(nsMsgAttachmentData *data)
 {
@@ -987,43 +987,43 @@ mime_display_stream_write (nsMIMESession
       {
         nsCOMPtr<nsIImapUrl> imapURL = do_QueryInterface(aUri);
         if (imapURL)
         {
           nsImapContentModifiedType   cModified;
           if (NS_SUCCEEDED(imapURL->GetContentModified(&cModified)))
           {
             if ( cModified != nsImapContentModifiedTypes::IMAP_CONTENT_NOT_MODIFIED )
-              msd->options->missing_parts = PR_TRUE;
+              msd->options->missing_parts = true;
           }
         }
       }
     }
 
-    msd->firstCheck = PR_FALSE;
+    msd->firstCheck = false;
   }
 
   return obj->clazz->parse_buffer((char *) buf, size, obj);
 }
 
 extern "C" void
 mime_display_stream_complete (nsMIMESession *stream)
 {
   mime_stream_data *msd = (mime_stream_data *) ((nsMIMESession *)stream)->data_object;
   MimeObject *obj = (msd ? msd->obj : 0);
   if (obj)
   {
     int       status;
     bool      abortNow = false;
 
     if ((obj->options) && (obj->options->headers == MimeHeadersOnly))
-      abortNow = PR_TRUE;
+      abortNow = true;
 
     status = obj->clazz->parse_eof(obj, abortNow);
-    obj->clazz->parse_end(obj, (status < 0 ? PR_TRUE : PR_FALSE));
+    obj->clazz->parse_end(obj, (status < 0 ? true : false));
 
     //
     // Ok, now we are going to process the attachment data by getting all
     // of the attachment info and then driving the emitter with this data.
     //
     if (!msd->options->part_to_load || msd->options->format_out == nsMimeOutput::nsMimeMessageBodyDisplay)
     {
       nsMsgAttachmentData *attachments;
@@ -1069,19 +1069,19 @@ extern "C" void
 mime_display_stream_abort (nsMIMESession *stream, int status)
 {
   mime_stream_data *msd = (mime_stream_data *) ((nsMIMESession *)stream)->data_object;
 
   MimeObject *obj = (msd ? msd->obj : 0);
   if (obj)
   {
     if (!obj->closed_p)
-      obj->clazz->parse_eof(obj, PR_TRUE);
+      obj->clazz->parse_eof(obj, true);
     if (!obj->parsed_p)
-      obj->clazz->parse_end(obj, PR_TRUE);
+      obj->clazz->parse_end(obj, true);
 
     // Destroy code....
     PR_ASSERT(msd->options == obj->options);
     mime_free(obj);
     if (msd->options)
     {
       delete msd->options;
       msd->options = 0;
@@ -1138,17 +1138,17 @@ public:
   bool m_shouldCacheImage;
 };
 
 mime_image_stream_data::mime_image_stream_data()
 {
   url = nsnull;
   istream = nsnull;
   msd = nsnull;
-  m_shouldCacheImage = PR_FALSE;
+  m_shouldCacheImage = false;
 }
 
 static void *
 mime_image_begin(const char *image_url, const char *content_type,
                  void *stream_closure)
 {
   mime_stream_data *msd = (mime_stream_data *) stream_closure;
   class mime_image_stream_data *mid;
@@ -1360,42 +1360,42 @@ bool MimeObjectIsMessageBodyNoClimb(Mime
   NS_ASSERTION(stop, "NULL stop to MimeObjectIsMessageBodyNoClimb");
 
   for (i = 0; i < container->nchildren; i++) {
     MimeObject *child = container->children[i];
     bool is_body = false;
 
     // The body can't be something we're not displaying.
     if (! child->output_p)
-      is_body = PR_FALSE;
+      is_body = false;
     else if ((disp = MimeHeaders_get (child->headers, HEADER_CONTENT_DISPOSITION,
-                                      PR_TRUE, PR_FALSE))) {
+                                      true, false))) {
       PR_Free(disp);
-      is_body = PR_FALSE;
+      is_body = false;
     }
     else if (PL_strcasecmp (child->content_type, TEXT_PLAIN) &&
              PL_strcasecmp (child->content_type, TEXT_HTML) &&
              PL_strcasecmp (child->content_type, TEXT_MDL) &&
              PL_strcasecmp (child->content_type, MESSAGE_NEWS) &&
              PL_strcasecmp (child->content_type, MESSAGE_RFC822))
-      is_body = PR_FALSE;
+      is_body = false;
 
     if (is_body || child == looking_for) {
-      *stop = PR_TRUE;
+      *stop = true;
       return child == looking_for;
     }
 
     // The body could be down inside a multipart child, so search recursively.
     if (mime_subclass_p(child->clazz, (MimeObjectClass*) &mimeContainerClass)) {
       is_body = MimeObjectIsMessageBodyNoClimb(child, looking_for, stop);
       if (is_body || *stop)
         return is_body;
     }
   }
-  return PR_FALSE;
+  return false;
 }
 
 /* Should this be static in mimemult.cpp? */
 bool MimeObjectIsMessageBody(MimeObject *looking_for)
 {
   bool stop = false;
   MimeObject *root = looking_for;
   while (root->parent)
@@ -1429,44 +1429,44 @@ GetTextConverter(MimeDisplayOptions *opt
 
 MimeDisplayOptions::MimeDisplayOptions()
 {
   conv = nsnull;        // For text conversion...
   format_out = 0;   // The format out type
   url = nsnull;
 
   memset(&headers,0, sizeof(headers));
-  fancy_headers_p = PR_FALSE;
+  fancy_headers_p = false;
 
-  output_vcard_buttons_p = PR_FALSE;
+  output_vcard_buttons_p = false;
 
-  variable_width_plaintext_p = PR_FALSE;
-  wrap_long_lines_p = PR_FALSE;
-  rot13_p = PR_FALSE;
+  variable_width_plaintext_p = false;
+  wrap_long_lines_p = false;
+  rot13_p = false;
   part_to_load = nsnull;
 
-  write_html_p = PR_FALSE;
+  write_html_p = false;
 
-  decrypt_p = PR_FALSE;
+  decrypt_p = false;
 
   whattodo = 0 ;
   default_charset = nsnull;
-  override_charset = PR_FALSE;
-  force_user_charset = PR_FALSE;
+  override_charset = false;
+  force_user_charset = false;
   stream_closure = nsnull;
 
   /* For setting up the display stream, so that the MIME parser can inform
    the caller of the type of the data it will be getting. */
   output_init_fn = nsnull;
   output_fn = nsnull;
 
   output_closure = nsnull;
 
   charset_conversion_fn = nsnull;
-  rfc1522_conversion_p = PR_FALSE;
+  rfc1522_conversion_p = false;
 
   file_type_fn = nsnull;
 
   passwd_prompt_fn = nsnull;
 
   html_closure = nsnull;
 
   generate_header_html_fn = nsnull;
@@ -1478,37 +1478,37 @@ MimeDisplayOptions::MimeDisplayOptions()
 
   image_begin = nsnull;
   image_end = nsnull;
   image_write_buffer = nsnull;
   make_image_html = nsnull;
   state = nsnull;
 
 #ifdef MIME_DRAFTS
-  decompose_file_p = PR_FALSE;
-  done_parsing_outer_headers = PR_FALSE;
-  is_multipart_msg = PR_FALSE;
+  decompose_file_p = false;
+  done_parsing_outer_headers = false;
+  is_multipart_msg = false;
   decompose_init_count = 0;
 
-  signed_p = PR_FALSE;
-  caller_need_root_headers = PR_FALSE;
+  signed_p = false;
+  caller_need_root_headers = false;
   decompose_headers_info_fn = nsnull;
   decompose_file_init_fn = nsnull;
   decompose_file_output_fn = nsnull;
   decompose_file_close_fn = nsnull;
 #endif /* MIME_DRAFTS */
 
   attachment_icon_layer_id = 0;
 
-  missing_parts = PR_FALSE;
-  show_attachment_inline_p = PR_FALSE;
-  quote_attachment_inline_p = PR_FALSE;
-  notify_nested_bodies = PR_FALSE;
-  write_pure_bodies = PR_FALSE;
-  metadata_only = PR_FALSE;
+  missing_parts = false;
+  show_attachment_inline_p = false;
+  quote_attachment_inline_p = false;
+  notify_nested_bodies = false;
+  write_pure_bodies = false;
+  metadata_only = false;
 }
 
 MimeDisplayOptions::~MimeDisplayOptions()
 {
   PR_FREEIF(part_to_load);
   PR_FREEIF(default_charset);
 }
 ////////////////////////////////////////////////////////////////
@@ -1532,17 +1532,17 @@ mime_bridge_create_display_stream(
     return nsnull;
 
   msd = new mime_stream_data;
   if (!msd)
     return NULL;
 
   // Assign the new mime emitter - will handle output operations
   msd->output_emitter = newEmitter;
-  msd->firstCheck = PR_TRUE;
+  msd->firstCheck = true;
 
   // Store the URL string for this decode operation
   nsCAutoString urlString;
   nsresult rv;
 
   // Keep a hold of the channel...
   msd->channel = aChannel;
   rv = uri->GetSpec(urlString);
@@ -1589,58 +1589,58 @@ mime_bridge_create_display_stream(
     delete msd;
     return nsnull;
   }
 
   //
   // Set the defaults, based on the context, and the output-type.
   //
   MIME_HeaderType = MimeHeadersAll;
-  msd->options->write_html_p = PR_TRUE;
+  msd->options->write_html_p = true;
   switch (format_out)
   {
     case nsMimeOutput::nsMimeMessageSplitDisplay:   // the wrapper HTML output to produce the split header/body display
     case nsMimeOutput::nsMimeMessageHeaderDisplay:  // the split header/body display
     case nsMimeOutput::nsMimeMessageBodyDisplay:    // the split header/body display
-      msd->options->fancy_headers_p = PR_TRUE;
-      msd->options->output_vcard_buttons_p = PR_TRUE;
+      msd->options->fancy_headers_p = true;
+      msd->options->output_vcard_buttons_p = true;
       break;
 
     case nsMimeOutput::nsMimeMessageSaveAs:         // Save As operations
     case nsMimeOutput::nsMimeMessageQuoting:        // all HTML quoted/printed output
     case nsMimeOutput::nsMimeMessagePrintOutput:
-      msd->options->fancy_headers_p = PR_TRUE;
+      msd->options->fancy_headers_p = true;
       break;
 
     case nsMimeOutput::nsMimeMessageBodyQuoting:        // only HTML body quoted output
       MIME_HeaderType = MimeHeadersNone;
       break;
 
     case nsMimeOutput::nsMimeMessageAttach:           // handling attachment storage
-        msd->options->write_html_p = PR_FALSE;
+        msd->options->write_html_p = false;
         break;
     case nsMimeOutput::nsMimeMessageRaw:              // the raw RFC822 data (view source) and attachments
     case nsMimeOutput::nsMimeMessageDraftOrTemplate:  // Loading drafts & templates
     case nsMimeOutput::nsMimeMessageEditorTemplate:   // Loading templates into editor
     case nsMimeOutput::nsMimeMessageFilterSniffer:    // generating an output that can be scan by a message filter
       break;
 
     case nsMimeOutput::nsMimeMessageDecrypt:
-      msd->options->decrypt_p = PR_TRUE;
-      msd->options->write_html_p = PR_FALSE;
+      msd->options->decrypt_p = true;
+      msd->options->write_html_p = false;
       break;
   }
 
   ////////////////////////////////////////////////////////////
   // Now, get the libmime prefs...
   ////////////////////////////////////////////////////////////
 
-  MIME_WrapLongLines = PR_TRUE;
-  MIME_VariableWidthPlaintext = PR_TRUE;
-  msd->options->force_user_charset = PR_FALSE;
+  MIME_WrapLongLines = true;
+  MIME_VariableWidthPlaintext = true;
+  msd->options->force_user_charset = false;
 
   if (msd->options->m_prefBranch)
   {
     msd->options->m_prefBranch->GetBoolPref("mail.wrap_long_lines", &MIME_WrapLongLines);
     msd->options->m_prefBranch->GetBoolPref("mail.fixed_width_messages", &MIME_VariableWidthPlaintext);
       //
       // Charset overrides takes place here
       //
@@ -1679,32 +1679,32 @@ mime_bridge_create_display_stream(
 
   msd->options->url = msd->url_name;
   msd->options->output_init_fn        = mime_output_init_fn;
 
   msd->options->output_fn             = mime_output_fn;
 
   msd->options->whattodo              = whattodo;
   msd->options->charset_conversion_fn = mime_convert_charset;
-  msd->options->rfc1522_conversion_p  = PR_TRUE;
+  msd->options->rfc1522_conversion_p  = true;
   msd->options->file_type_fn          = mime_file_type;
   msd->options->stream_closure        = msd;
   msd->options->passwd_prompt_fn      = 0;
 
   msd->options->image_begin           = mime_image_begin;
   msd->options->image_end             = mime_image_end;
   msd->options->make_image_html       = mime_image_make_image_html;
   msd->options->image_write_buffer    = mime_image_write_buffer;
 
   msd->options->variable_width_plaintext_p = MIME_VariableWidthPlaintext;
 
   // If this is a part, then we should emit the HTML to render the data
   // (i.e. embedded images)
   if (msd->options->part_to_load && msd->options->format_out != nsMimeOutput::nsMimeMessageBodyDisplay)
-    msd->options->write_html_p = PR_FALSE;
+    msd->options->write_html_p = false;
 
   obj = mime_new ((MimeObjectClass *)&mimeMessageClass, (MimeHeaders *) NULL, MESSAGE_RFC822);
   if (!obj)
   {
     delete msd->options;
     delete msd;
     return 0;
   }
@@ -1771,19 +1771,19 @@ GetMSD(MimeDisplayOptions *opt)
   return msd;
 }
 
 bool
 NoEmitterProcessing(nsMimeOutputType    format_out)
 {
   if ( (format_out == nsMimeOutput::nsMimeMessageDraftOrTemplate) ||
        (format_out == nsMimeOutput::nsMimeMessageEditorTemplate))
-    return PR_TRUE;
+    return true;
   else
-    return PR_FALSE;
+    return false;
 }
 
 extern "C" nsresult
 mimeEmitterAddAttachmentField(MimeDisplayOptions *opt, const char *field, const char *value)
 {
   // Check for draft processing...
   if (NoEmitterProcessing(opt->format_out))
     return NS_OK;
@@ -2072,17 +2072,17 @@ MimeGetStringByID(PRInt32 stringID)
 
 void
 ResetChannelCharset(MimeObject *obj)
 {
   if (obj->options && obj->options->stream_closure &&
       obj->options->default_charset && obj->headers )
   {
     mime_stream_data  *msd = (mime_stream_data *) (obj->options->stream_closure);
-    char *ct = MimeHeaders_get (obj->headers, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
+    char *ct = MimeHeaders_get (obj->headers, HEADER_CONTENT_TYPE, false, false);
     if ( (ct) && (msd) && (msd->channel) )
     {
       char *ptr = strstr(ct, "charset=");
       if (ptr)
       {
         // First, setup the channel!
         msd->channel->SetContentType(nsDependentCString(ct));
 
@@ -2102,17 +2102,17 @@ ResetChannelCharset(MimeObject *obj)
             char *ptr2 = cSet;
             while ( (*cSet) && (*cSet != ' ') && (*cSet != ';') &&
                     (*cSet != '\r') && (*cSet != '\n') && (*cSet != '"') )
               ptr2++;
 
             if (*cSet) {
               PR_FREEIF(obj->options->default_charset);
               obj->options->default_charset = strdup(cSet);
-              obj->options->override_charset = PR_TRUE;
+              obj->options->override_charset = true;
             }
 
             PR_FREEIF(cSet);
           }
         }
       }
       PR_FREEIF(ct);
     }
@@ -2228,17 +2228,17 @@ HTML2Plaintext(const nsString& inString,
 
   nsCOMPtr<nsIHTMLToTextSink> textSink(do_QueryInterface(sink));
   NS_ENSURE_TRUE(textSink, NS_ERROR_FAILURE);
 
   textSink->Initialize(&outString, flags, wrapCol);
 
   parser->SetContentSink(sink);
 
-  rv = parser->Parse(inString, 0, NS_LITERAL_CSTRING("text/html"), PR_TRUE);
+  rv = parser->Parse(inString, 0, NS_LITERAL_CSTRING("text/html"), true);
 
   // Aah! How can NS_ERROR and NS_ABORT_IF_FALSE be no-ops in release builds???
   if (NS_FAILED(rv))
   {
     NS_ERROR("Parse() failed!");
     return rv;
   }
 
@@ -2287,17 +2287,17 @@ HTMLSanitize(const nsString& inString, n
 
   nsCOMPtr<mozISanitizingHTMLSerializer> sanSink(do_QueryInterface(sink));
   NS_ENSURE_TRUE(sanSink, NS_ERROR_FAILURE);
 
   sanSink->Initialize(&outString, flags, allowedTags);
 
   parser->SetContentSink(sink);
 
-  rv = parser->Parse(inString, 0, NS_LITERAL_CSTRING("text/html"), PR_TRUE);
+  rv = parser->Parse(inString, 0, NS_LITERAL_CSTRING("text/html"), true);
   if (NS_FAILED(rv))
   {
     NS_ERROR("Parse() failed!");
     return rv;
   }
 
 #if DEBUG_BenB
   charstar = ToNewUTF8String(outString);
--- a/mailnews/mime/src/mimemrel.cpp
+++ b/mailnews/mime/src/mimemrel.cpp
@@ -172,22 +172,22 @@ public:
   char        *m_url;
 };
 
 static int
 MimeMultipartRelated_initialize(MimeObject* obj)
 {
   MimeMultipartRelated* relobj = (MimeMultipartRelated*) obj;
   relobj->base_url = MimeHeaders_get(obj->headers, HEADER_CONTENT_BASE,
-                     PR_FALSE, PR_FALSE);
+                     false, false);
   /* rhp: need this for supporting Content-Location */
   if (!relobj->base_url)
   {
     relobj->base_url = MimeHeaders_get(obj->headers, HEADER_CONTENT_LOCATION,
-      PR_FALSE, PR_FALSE);
+      false, false);
   }
   /* rhp: need this for supporting Content-Location */
 
   /* I used to have code here to test if the type was text/html.  Then I
      added multipart/alternative as being OK, too.  Then I found that the
      VCard spec seems to talk about having the first part of a
      multipart/related be an application/directory.  At that point, I decided
      to punt.  We handle anything as the first part, and stomp on the HTML it
@@ -247,17 +247,17 @@ MimeMultipartRelated_finalize (MimeObjec
   if (relobj->output_file_stream)
   {
     relobj->output_file_stream->Close();
     relobj->output_file_stream = nsnull;
   }
 
   if (relobj->file_buffer)
   {
-    relobj->file_buffer->Remove(PR_FALSE);
+    relobj->file_buffer->Remove(false);
     relobj->file_buffer = nsnull;
   }
   
   if (relobj->headobj) {
     mime_free(relobj->headobj);
     relobj->headobj = nsnull;
   }
 
@@ -348,47 +348,47 @@ escape_for_mrel_subst(char *inURL)
     }
   }
   return output;
 }
 
 static bool
 MimeStartParamExists(MimeObject *obj, MimeObject* child)
 {
-  char *ct = MimeHeaders_get (obj->headers, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
+  char *ct = MimeHeaders_get (obj->headers, HEADER_CONTENT_TYPE, false, false);
   char *st = (ct
               ? MimeHeaders_get_parameter(ct, HEADER_PARM_START, NULL, NULL)
               : 0);
 
   PR_FREEIF(ct);
   if (!st)
-    return PR_FALSE;
+    return false;
 
   PR_FREEIF(st);
-  return PR_TRUE;
+  return true;
 }
 
 static bool
 MimeThisIsStartPart(MimeObject *obj, MimeObject* child)
 {
   bool rval = false;
   char *ct, *st, *cst;
 
-  ct = MimeHeaders_get (obj->headers, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
+  ct = MimeHeaders_get (obj->headers, HEADER_CONTENT_TYPE, false, false);
   st = (ct
         ? MimeHeaders_get_parameter(ct, HEADER_PARM_START, NULL, NULL)
         : 0);
 
   PR_FREEIF(ct);
   if (!st)
-    return PR_FALSE;
+    return false;
 
-  cst = MimeHeaders_get(child->headers, HEADER_CONTENT_ID, PR_FALSE, PR_FALSE);
+  cst = MimeHeaders_get(child->headers, HEADER_CONTENT_ID, false, false);
   if (!cst)
-    rval = PR_FALSE;
+    rval = false;
   else
   {
     char *tmp = cst;
     if (*tmp == '<')
     {
       int length;
       tmp++;
       length = strlen(tmp);
@@ -460,20 +460,20 @@ MimeMultipartRelated_output_child_p(Mime
        (relobj->head_loaded) ||
        (MimeStartParamExists(obj, child) && !MimeThisIsStartPart(obj, child))
      )
   {
     /* This is a child part.  Just remember the mapping between the URL
        it represents and the part-URL to get it back. */
 
     char* location = MimeHeaders_get(child->headers, HEADER_CONTENT_LOCATION,
-                     PR_FALSE, PR_FALSE);
+                     false, false);
     if (!location) {
       char* tmp = MimeHeaders_get(child->headers, HEADER_CONTENT_ID,
-                    PR_FALSE, PR_FALSE);
+                    false, false);
       if (tmp) {
         char* tmp2 = tmp;
         if (*tmp2 == '<') {
           int length;
           tmp2++;
           length = strlen(tmp2);
           if (length > 0 && tmp2[length - 1] == '>') {
             tmp2[length - 1] = '\0';
@@ -482,17 +482,17 @@ MimeMultipartRelated_output_child_p(Mime
         location = PR_smprintf("cid:%s", tmp2);
         PR_Free(tmp);
       }
     }
 
     if (location) {
       char *absolute;
       char *base_url = MimeHeaders_get(child->headers, HEADER_CONTENT_BASE,
-                       PR_FALSE, PR_FALSE);
+                       false, false);
       absolute = MakeAbsoluteURL(base_url ? base_url : relobj->base_url, location);
 
       PR_FREEIF(base_url);
       PR_Free(location);
       if (absolute) {
         nsCAutoString partnum;
         nsCAutoString imappartnum;
         partnum.Adopt(mime_part_address(child));
@@ -517,21 +517,21 @@ MimeMultipartRelated_output_child_p(Mime
             part = mime_set_url_imap_part(obj->options->url, imappartnum.get(), partnum.get());
           else
           {
             char *no_part_url = nsnull;
             if (obj->options->part_to_load && obj->options->format_out == nsMimeOutput::nsMimeMessageBodyDisplay)
               no_part_url = mime_get_base_url(obj->options->url);
             if (no_part_url)
             {
-              part = mime_set_url_part(no_part_url, partnum.get(), PR_FALSE);
+              part = mime_set_url_part(no_part_url, partnum.get(), false);
               PR_Free(no_part_url);
             }
             else
-              part = mime_set_url_part(obj->options->url, partnum.get(), PR_FALSE);
+              part = mime_set_url_part(obj->options->url, partnum.get(), false);
           }
           if (part)
           {
             char *name = MimeHeaders_get_name(child->headers, child->options);
             // let's stick the filename in the part so save as will work.
             if (name)
             {
               char *savePart = part;
@@ -547,17 +547,17 @@ MimeMultipartRelated_output_child_p(Mime
               MimeHashValue * value = new MimeHashValue(child, temp);
               PL_HashTableAdd(relobj->hash, absolute, value);
 
             /* rhp - If this part ALSO has a Content-ID we need to put that into
                      the hash table and this is what this code does
              */
             {
               char *tloc;
-              char *tmp = MimeHeaders_get(child->headers, HEADER_CONTENT_ID, PR_FALSE, PR_FALSE);
+              char *tmp = MimeHeaders_get(child->headers, HEADER_CONTENT_ID, false, false);
               if (tmp)
               {
                 char* tmp2 = tmp;
                 if (*tmp2 == '<')
                 {
                   int length;
                   tmp2++;
                   length = strlen(tmp2);
@@ -593,25 +593,25 @@ MimeMultipartRelated_output_child_p(Mime
               PR_Free(part);
             }
           }
         }
       }
   } else {
     /* Ah-hah!  We're the head object.  */
     char* base_url;
-    relobj->head_loaded = PR_TRUE;
+    relobj->head_loaded = true;
     relobj->headobj = child;
     relobj->buffered_hdrs = MimeHeaders_copy(child->headers);
     base_url = MimeHeaders_get(child->headers, HEADER_CONTENT_BASE,
-                   PR_FALSE, PR_FALSE);
+                   false, false);
     /* rhp: need this for supporting Content-Location */
     if (!base_url)
     {
-      base_url = MimeHeaders_get(child->headers, HEADER_CONTENT_LOCATION, PR_FALSE, PR_FALSE);
+      base_url = MimeHeaders_get(child->headers, HEADER_CONTENT_LOCATION, false, false);
     }
     /* rhp: need this for supporting Content-Location */
 
     if (base_url) {
       /* If the head object has a base_url associated with it, use
          that instead of any base_url that may have been associated
          with the multipart/related. */
       PR_FREEIF(relobj->base_url);
@@ -619,20 +619,20 @@ MimeMultipartRelated_output_child_p(Mime
     }
   }
   if (obj->options && !obj->options->write_html_p
 #ifdef MIME_DRAFTS
     && !obj->options->decompose_file_p
 #endif /* MIME_DRAFTS */
     )
     {
-    return PR_TRUE;
+    return true;
     }
 
-  return PR_FALSE;      /* Don't actually parse this child; we'll handle
+  return false;      /* Don't actually parse this child; we'll handle
                  all that at eof time. */
 }
 
 static int
 MimeMultipartRelated_parse_child_line (MimeObject *obj,
                      const char *line, PRInt32 length,
                      bool first_line_p)
 {
@@ -806,24 +806,24 @@ push_tag(MimeMultipartRelated* relobj, c
   memcpy(relobj->curtag + relobj->curtag_length, buf, size);
   relobj->curtag_length += size;
   return 0;
 }
 
 static bool accept_related_part(MimeMultipartRelated* relobj, MimeObject* part_obj)
 {
   if (!relobj || !part_obj)
-    return PR_FALSE;
+    return false;
 
   /* before accepting it as a valid related part, make sure we
      are able to display it inline as an embedded object. Else just ignore
      it, that will prevent any bad surprise... */
-  MimeObjectClass *clazz = mime_find_class (part_obj->content_type, part_obj->headers, part_obj->options, PR_FALSE);
-  if (clazz ? clazz->displayable_inline_p(clazz, part_obj->headers) : PR_FALSE)
-    return PR_TRUE;
+  MimeObjectClass *clazz = mime_find_class (part_obj->content_type, part_obj->headers, part_obj->options, false);
+  if (clazz ? clazz->displayable_inline_p(clazz, part_obj->headers) : false)
+    return true;
 
   /* ...but we always accept it if it's referenced by an anchor */
   return (relobj->curtag && relobj->curtag_length >= 3 &&
     (relobj->curtag[1] == 'A' || relobj->curtag[1] == 'a') && IS_SPACE(relobj->curtag[2]));
 }
 
 static int
 flush_tag(MimeMultipartRelated* relobj)
@@ -913,17 +913,17 @@ flush_tag(MimeMultipartRelated* relobj)
         if (part_url && accept_related_part(relobj, value->m_obj))
         {
           status = real_write(relobj, part_url, strlen(part_url));
           if (status < 0) return status;
           buf = ptr2; /* skip over the cid: URL we substituted */
 
           /* don't show that object as attachment */
           if (value->m_obj)
-            value->m_obj->dontShowAsAttachment = PR_TRUE;
+            value->m_obj->dontShowAsAttachment = true;
         }
 
         /* Restore the character that we nulled. */
         *ptr2 = c;
       }
       /* rhp - if we get here, we should still check against the hash table! */
       else
       {
@@ -950,17 +950,17 @@ flush_tag(MimeMultipartRelated* relobj)
         if (realout && accept_related_part(relobj, value->m_obj))
         {
           status = real_write(relobj, realout, strlen(realout));
           if (status < 0) return status;
           buf = ptr2; /* skip over the cid: URL we substituted */
 
           /* don't show that object as attachment */
           if (value->m_obj)
-            value->m_obj->dontShowAsAttachment = PR_TRUE;
+            value->m_obj->dontShowAsAttachment = true;
         }
       }
       /* rhp - if we get here, we should still check against the hash table! */
 
       /* Advance to the beginning of the next word, or to
          the end of the value string. */
       while((ptr2<ptr) && (IS_SPACE(*ptr2)))
         ptr2++;
@@ -1040,17 +1040,17 @@ MimeMultipartRelated_parse_eof (MimeObje
 
   status = ((MimeObjectClass*)&MIME_SUPERCLASS)->parse_eof(obj, abort_p);
   if (status < 0) goto FAIL;
 
   if (!relobj->headobj) return 0;
 
   ct = (relobj->buffered_hdrs
       ? MimeHeaders_get (relobj->buffered_hdrs, HEADER_CONTENT_TYPE,
-               PR_TRUE, PR_FALSE)
+               true, false)
       : 0);
   dct = (((MimeMultipartClass *) obj->clazz)->default_part_type);
 
   relobj->real_output_fn = obj->options->output_fn;
   relobj->real_output_closure = obj->options->output_closure;
 
   obj->options->output_fn = mime_multipart_related_output_fn;
   obj->options->output_closure = obj;
@@ -1175,19 +1175,19 @@ MimeMultipartRelated_parse_eof (MimeObje
       }
     }
     PR_Free(buf);
   }
 
   if (status < 0) goto FAIL;
 
   /* Done parsing. */
-  status = body->clazz->parse_eof(body, PR_FALSE);
+  status = body->clazz->parse_eof(body, false);
   if (status < 0) goto FAIL;
-  status = body->clazz->parse_end(body, PR_FALSE);
+  status = body->clazz->parse_end(body, false);
   if (status < 0) goto FAIL;
 
 FAIL:
 
 #ifdef MIME_DRAFTS
   if ( obj->options &&
      obj->options->decompose_file_p &&
      obj->options->decompose_file_close_fn &&
--- a/mailnews/mime/src/mimemsg.cpp
+++ b/mailnews/mime/src/mimemsg.cpp
@@ -102,17 +102,17 @@ MimeMessageClassInitialize(MimeMessageCl
   return 0;
 }
 
 
 static int
 MimeMessage_initialize (MimeObject *object)
 {
   MimeMessage *msg = (MimeMessage *)object;
-  msg->grabSubject = PR_FALSE;
+  msg->grabSubject = false;
   msg->bodyLength = 0;
 
   return ((MimeObjectClass*)&MIME_SUPERCLASS)->initialize(object);
 }
 
 static void
 MimeMessage_finalize (MimeObject *object)
 {
@@ -128,17 +128,17 @@ MimeMessage_parse_begin (MimeObject *obj
 {
   MimeMessage *msg = (MimeMessage *)obj;
 
   int status = ((MimeObjectClass*)&MIME_SUPERCLASS)->parse_begin(obj);
   if (status < 0) return status;
 
   if (obj->parent)
   {
-    msg->grabSubject = PR_TRUE;
+    msg->grabSubject = true;
   }
 
   /* Messages have separators before the headers, except for the outermost
    message. */
   return MimeObject_write_separator(obj);
 }
 
 
@@ -294,17 +294,17 @@ MimeMessage_close_headers (MimeObject *o
   if (obj->headers && msg->hdrs && msg->grabSubject && obj->headers->munged_subject) {
     // nsMsgI18NConvertToUnicode wants nsAStrings...
     nsDependentCString orig(obj->headers->munged_subject);
     nsAutoString dest;
     // First, get the Content-Type, then extract the charset="whatever" part of
     // it.
     nsCString charset;
     nsCString contentType;
-    contentType.Adopt(MimeHeaders_get(msg->hdrs, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE));
+    contentType.Adopt(MimeHeaders_get(msg->hdrs, HEADER_CONTENT_TYPE, false, false));
     if (!contentType.IsEmpty())
       charset.Adopt(MimeHeaders_get_parameter(contentType.get(), "charset", nsnull, nsnull));
 
     // If we've got a charset, use nsMsgI18NConvertToUnicode to magically decode
     // the munged subject.
     if (!charset.IsEmpty()) {
       nsresult rv = nsMsgI18NConvertToUnicode(charset.get(), orig, dest);
       // If we managed to convert the string, replace munged_subject with the
@@ -328,18 +328,18 @@ MimeMessage_close_headers (MimeObject *o
 
 #ifdef MIME_DRAFTS
     if (outer_p &&
       obj->options &&
           (obj->options->decompose_file_p || obj->options->caller_need_root_headers) &&
       obj->options->decompose_headers_info_fn)
     {
 #ifdef ENABLE_SMIME
-      if (obj->options->decrypt_p && !mime_crypto_object_p (msg->hdrs, PR_FALSE))
-        obj->options->decrypt_p = PR_FALSE;
+      if (obj->options->decrypt_p && !mime_crypto_object_p (msg->hdrs, false))
+        obj->options->decrypt_p = false;
 #endif /* ENABLE_SMIME */
       if (!obj->options->caller_need_root_headers || (obj == obj->options->state->root))
         status = obj->options->decompose_headers_info_fn (
                          obj->options->stream_closure,
                                msg->hdrs );
     }
 #endif /* MIME_DRAFTS */
 
@@ -369,48 +369,48 @@ MimeMessage_close_headers (MimeObject *o
         PR_ASSERT(obj->options->state->first_data_written_p);
       }
 
       html = obj->options->generate_header_html_fn(NULL,
                            obj->options->html_closure,
                              msg->hdrs);
       if (html)
       {
-        lstatus = MimeObject_write(obj, html, strlen(html), PR_FALSE);
+        lstatus = MimeObject_write(obj, html, strlen(html), false);
         PR_Free(html);
         if (lstatus < 0) return lstatus;
       }
     }
 
 
     /* Find the content-type of the body of this message.
      */
     {
     bool ok = true;
     char *mv = MimeHeaders_get (msg->hdrs, HEADER_MIME_VERSION,
-                  PR_TRUE, PR_FALSE);
+                  true, false);
 
 #ifdef REQUIRE_MIME_VERSION_HEADER
     /* If this is the outermost message, it must have a MIME-Version
        header with the value 1.0 for us to believe what might be in
        the Content-Type header.  If the MIME-Version header is not
        present, we must treat this message as untyped.
      */
     ok = (mv && !strcmp(mv, "1.0"));
 #else
     /* #### actually, we didn't check this in Mozilla 2.0, and checking
        it now could cause some compatibility nonsense, so for now, let's
        just believe any Content-Type header we see.
      */
-    ok = PR_TRUE;
+    ok = true;
 #endif
 
     if (ok)
       {
-      ct = MimeHeaders_get (msg->hdrs, HEADER_CONTENT_TYPE, PR_TRUE, PR_FALSE);
+      ct = MimeHeaders_get (msg->hdrs, HEADER_CONTENT_TYPE, true, false);
 
       /* If there is no Content-Type header, but there is a MIME-Version
          header, then assume that this *is* in fact a MIME message.
          (I've seen messages with
 
           MIME-Version: 1.0
           Content-Transfer-Encoding: quoted-printable
 
@@ -427,26 +427,26 @@ MimeMessage_close_headers (MimeObject *o
     /* If this message has a body which is encrypted and we're going to
        decrypt it (whithout converting it to HTML, since decrypt_p and
        write_html_p are never true at the same time)
     */
     if (obj->output_p &&
         obj->options &&
         obj->options->decrypt_p
 #ifdef ENABLE_SMIME
-        && !mime_crypto_object_p (msg->hdrs, PR_FALSE)
+        && !mime_crypto_object_p (msg->hdrs, false)
 #endif /* ENABLE_SMIME */
         )
     {
       /* The body of this message is not an encrypted object, so we need
          to turn off the decrypt_p flag (to prevent us from s#$%ing the
          body of the internal object up into one.) In this case,
          our output will end up being identical to our input.
       */
-      obj->options->decrypt_p = PR_FALSE;
+      obj->options->decrypt_p = false;
     }
 
     /* Emit the HTML for this message's headers.  Do this before
      creating the object representing the body.
      */
     if (obj->output_p &&
       obj->options &&
       obj->options->write_html_p)
@@ -458,33 +458,33 @@ MimeMessage_close_headers (MimeObject *o
 
       /* Emit a normal header block. */
       status = MimeMessage_write_headers_html(obj);
       if (status < 0) return status;
     }
     else if (obj->output_p)
     {
       /* Dump the headers, raw. */
-      status = MimeObject_write(obj, "", 0, PR_FALSE);  /* initialize */
+      status = MimeObject_write(obj, "", 0, false);  /* initialize */
       if (status < 0) return status;
       status = MimeHeaders_write_raw_headers(msg->hdrs, obj->options,
                          obj->options->decrypt_p);
       if (status < 0) return status;
     }
 
 #ifdef XP_UNIX
     if (outer_p && obj->output_p)
     /* Kludge from mimehdrs.c */
     MimeHeaders_do_unix_display_hook_hack(msg->hdrs);
 #endif /* XP_UNIX */
   }
 
   /* Never put out a separator after a message header block. */
   if (obj->options && obj->options->state)
-  obj->options->state->separator_suppressed_p = PR_TRUE;
+  obj->options->state->separator_suppressed_p = true;
 
 #ifdef MIME_DRAFTS
   if ( !obj->headers &&    /* outer most message header */
      obj->options &&
      obj->options->decompose_file_p &&
      ct )
   obj->options->is_multipart_msg = PL_strcasestr(ct, "multipart/") != NULL;
 #endif /* MIME_DRAFTS */
@@ -499,17 +499,17 @@ MimeMessage_close_headers (MimeObject *o
   {
     mime_free(body);
     return status;
   }
 
   // Only do this if this is a Text Object!
   if ( mime_typep(body, (MimeObjectClass *) &mimeInlineTextClass) )
   {
-    ((MimeInlineText *) body)->needUpdateMsgWinCharset = PR_TRUE;
+    ((MimeInlineText *) body)->needUpdateMsgWinCharset = true;
   }
 
   /* Now that we've added this new object to our list of children,
    start its parser going. */
   status = body->clazz->parse_begin(body);
   if (status < 0) return status;
 
   // Now notify the emitter if this is the outer most message, unless
@@ -525,28 +525,28 @@ MimeMessage_close_headers (MimeObject *o
     if (mime_typep(body, (MimeObjectClass *) &mimeInlineTextClass))
     {
       MimeInlineText  *text = (MimeInlineText *) body;
       if (text && text->charset && *text->charset)
         SetMailCharacterSetToMsgWindow(body, text->charset);
     }
 
     char  *msgID = MimeHeaders_get (msg->hdrs, HEADER_MESSAGE_ID,
-                                    PR_FALSE, PR_FALSE);
+                                    false, false);
 
     const char  *outCharset = NULL;
     if (!obj->options->force_user_charset)  /* Only convert if the user prefs is false */
       outCharset = "UTF-8";
 
     mimeEmitterStartBody(obj->options, (obj->options->headers == MimeHeadersNone), msgID, outCharset);
     PR_FREEIF(msgID);
 
   // setting up truncated message html fotter function
-  char *xmoz = MimeHeaders_get(msg->hdrs, HEADER_X_MOZILLA_STATUS, PR_FALSE,
-                 PR_FALSE);
+  char *xmoz = MimeHeaders_get(msg->hdrs, HEADER_X_MOZILLA_STATUS, false,
+                 false);
   if (xmoz)
   {
     PRUint32 flags = 0;
     char dummy = 0;
     if (sscanf(xmoz, " %x %c", &flags, &dummy) == 1 &&
       flags & nsMsgMessageFlags::Partial)
     {
       obj->options->html_closure = obj;
@@ -600,17 +600,17 @@ MimeMessage_parse_eof (MimeObject *obj, 
       if (msd)
       {
         char *html = obj->options->generate_footer_html_fn
           (msd->orig_url_name, obj->options->html_closure, msg->hdrs);
         if (html)
         {
           int lstatus = MimeObject_write(obj, html,
                          strlen(html),
-                         PR_FALSE);
+                         false);
           PR_Free(html);
           if (lstatus < 0) return lstatus;
         }
       }
     }
     if ((!obj->options->part_to_load  || obj->options->format_out == nsMimeOutput::nsMimeMessageBodyDisplay) &&
       obj->options->headers != MimeHeadersOnly)
       mimeEmitterEndBody(obj->options);
@@ -674,30 +674,30 @@ MimeMessage_add_child (MimeObject *paren
 char *
 DetermineMailCharset(MimeMessage *msg)
 {
   char          *retCharset = nsnull;
 
   if ( (msg) && (msg->hdrs) )
   {
     char *ct = MimeHeaders_get (msg->hdrs, HEADER_CONTENT_TYPE,
-                                PR_FALSE, PR_FALSE);
+                                false, false);
     if (ct)
     {
       retCharset = MimeHeaders_get_parameter (ct, "charset", NULL, NULL);
       PR_Free(ct);
     }
 
     if (!retCharset)
     {
       // If we didn't find "Content-Type: ...; charset=XX" then look
       // for "X-Sun-Charset: XX" instead.  (Maybe this should be done
       // in MimeSunAttachmentClass, but it's harder there than here.)
       retCharset = MimeHeaders_get (msg->hdrs, HEADER_X_SUN_CHARSET,
-                                    PR_FALSE, PR_FALSE);
+                                    false, false);
     }
   }
 
   if (!retCharset)
     return strdup("ISO-8859-1");
   else
     return retCharset;
 }
@@ -741,17 +741,17 @@ MimeMessage_write_headers_html (MimeObje
       mimeEmitterEndHeader(obj->options, obj);
       return status;
     }
     PR_ASSERT(obj->options->state->first_data_written_p);
   }
 
   // Start the header parsing by the emitter
   char *msgID = MimeHeaders_get (msg->hdrs, HEADER_MESSAGE_ID,
-                                    PR_FALSE, PR_FALSE);
+                                    false, false);
   bool outer_p = !obj->headers; /* is this the outermost message? */
   if (!outer_p && obj->options->format_out == nsMimeOutput::nsMimeMessageBodyDisplay &&
       obj->options->part_to_load)
   {
     //Maybe we are displaying a embedded message as outer part!
     char *id = mime_part_address(obj);
     if (id)
     {
@@ -783,17 +783,17 @@ MimeMessage_write_headers_html (MimeObje
   {
     PR_FREEIF(obj->options->default_charset);
     obj->options->default_charset = strdup(mailCharset);
   }
 
   PR_FREEIF(msgID);
   PR_FREEIF(mailCharset);
 
-  status = MimeHeaders_write_all_headers (msg->hdrs, obj->options, PR_FALSE);
+  status = MimeHeaders_write_all_headers (msg->hdrs, obj->options, false);
   if (status < 0)
   {
     mimeEmitterEndHeader(obj->options, obj);
     return status;
   }
 
   if (!msg->crypto_stamped_p)
   {
@@ -808,20 +808,20 @@ MimeMessage_write_headers_html (MimeObje
       obj->options->generate_post_header_html_fn &&
       !obj->options->state->post_header_html_run_p)
     {
       char *html = 0;
       PR_ASSERT(obj->options->state->first_data_written_p);
       html = obj->options->generate_post_header_html_fn(NULL,
                                           obj->options->html_closure,
                                           msg->hdrs);
-      obj->options->state->post_header_html_run_p = PR_TRUE;
+      obj->options->state->post_header_html_run_p = true;
       if (html)
       {
-        status = MimeObject_write(obj, html, strlen(html), PR_FALSE);
+        status = MimeObject_write(obj, html, strlen(html), false);
         PR_Free(html);
         if (status < 0)
         {
           mimeEmitterEndHeader(obj->options, obj);
           return status;
         }
       }
     }
@@ -845,19 +845,19 @@ MimeMessage_write_headers_html (MimeObje
 }
 
 static char *
 MimeMessage_partial_message_html(const char *data, void *closure,
                  MimeHeaders *headers)
 {
   MimeMessage *msg = (MimeMessage *)closure;
   nsCAutoString orig_url(data);
-  char *uidl = MimeHeaders_get(headers, HEADER_X_UIDL, PR_FALSE, PR_FALSE);
-  char *msgId = MimeHeaders_get(headers, HEADER_MESSAGE_ID, PR_FALSE,
-                  PR_FALSE);
+  char *uidl = MimeHeaders_get(headers, HEADER_X_UIDL, false, false);
+  char *msgId = MimeHeaders_get(headers, HEADER_MESSAGE_ID, false,
+                  false);
   char *msgIdPtr = PL_strchr(msgId, '<');
   int msgBase;
 
   PRInt32 pos = orig_url.Find("mailbox-message");
   if (pos != -1)
     orig_url.Cut(pos + 7, 8);
 
   pos = orig_url.FindChar('#');
@@ -932,17 +932,17 @@ MimeMessage_debug_print (MimeObject *obj
   {
     char *s;
 
     depth++;
 
 # define DUMP(HEADER) \
     for (i=0; i < depth; i++)                        \
         PR_Write(stream, "  ", 2);                        \
-    s = MimeHeaders_get (msg->hdrs, HEADER, PR_FALSE, PR_TRUE);
+    s = MimeHeaders_get (msg->hdrs, HEADER, false, true);
 /**
     \
     PR_Write(stream, HEADER ": %s\n", s ? s : "");              \
 **/
 
     PR_FREEIF(s)
 
       DUMP(HEADER_SUBJECT);
--- a/mailnews/mime/src/mimemsig.cpp
+++ b/mailnews/mime/src/mimemsig.cpp
@@ -123,17 +123,17 @@ MimeMultipartSigned_cleanup (MimeObject 
        around for the lifetime of the MIME object, so that we can get at the
        security info of sub-parts of the currently-displayed message. */
     ((MimeMultipartSignedClass *) obj->clazz)->crypto_free (sig->crypto_closure);
      sig->crypto_closure = 0;
   }
 
   if (sig->sig_decoder_data)
   {
-    MimeDecoderDestroy(sig->sig_decoder_data, PR_TRUE);
+    MimeDecoderDestroy(sig->sig_decoder_data, true);
     sig->sig_decoder_data = 0;
   }
 }
 
 static int
 MimeMultipartSigned_parse_eof (MimeObject *obj, bool abort_p)
 {
   MimeMultipartSigned *sig = (MimeMultipartSigned *) obj;
@@ -157,25 +157,25 @@ MimeMultipartSigned_parse_eof (MimeObjec
     /* Now that we've read both the signed object and the signature (and
      have presumably verified the signature) write out a blurb, and then
      the signed object.
      */
     status = MimeMultipartSigned_emit_child(obj);
     if (status < 0) return status;
   }
 
-  MimeMultipartSigned_cleanup(obj, PR_FALSE);
+  MimeMultipartSigned_cleanup(obj, false);
   return ((MimeObjectClass*)&MIME_SUPERCLASS)->parse_eof(obj, abort_p);
 }
 
 
 static void
 MimeMultipartSigned_finalize (MimeObject *obj)
 {
-  MimeMultipartSigned_cleanup(obj, PR_TRUE);
+  MimeMultipartSigned_cleanup(obj, true);
   ((MimeObjectClass*)&MIME_SUPERCLASS)->finalize(obj);
 }
 
 
 static int
 MimeMultipartSigned_parse_line (const char *line, PRInt32 length, MimeObject *obj)
 {
   MimeMultipart *mult = (MimeMultipart *) obj;
@@ -209,33 +209,33 @@ MimeMultipartSigned_parse_line (const ch
       sig->state = MimeMultipartSignedPreamble;
       break;
 
     case MimeMultipartHeaders:
       /* If we're moving in to the Headers state, then that means
        that this line is the preceeding boundary string (and we
        should ignore it.)
        */
-      hash_line_p = PR_FALSE;
+      hash_line_p = false;
 
       if (sig->state == MimeMultipartSignedPreamble)
       sig->state = MimeMultipartSignedBodyFirstHeader;
       else if (sig->state == MimeMultipartSignedBodyFirstLine ||
            sig->state == MimeMultipartSignedBodyLine)
       sig->state = MimeMultipartSignedSignatureHeaders;
       else if (sig->state == MimeMultipartSignedSignatureFirstLine ||
            sig->state == MimeMultipartSignedSignatureLine)
       sig->state = MimeMultipartSignedEpilogue;
       break;
 
     case MimeMultipartPartFirstLine:
       if (sig->state == MimeMultipartSignedBodyFirstHeader)
       {      
         sig->state = MimeMultipartSignedBodyFirstLine;
-        no_headers_p = PR_TRUE;
+        no_headers_p = true;
       }
       else if (sig->state == MimeMultipartSignedBodyHeaders)
       sig->state = MimeMultipartSignedBodyFirstLine;
       else if (sig->state == MimeMultipartSignedSignatureHeaders)
       sig->state = MimeMultipartSignedSignatureFirstLine;
       else
       sig->state = MimeMultipartSignedEpilogue;
       break;
@@ -362,17 +362,17 @@ MimeMultipartSigned_parse_line (const ch
     if (sig->crypto_closure &&
       old_state != mult->state)
     {
       /* We have just moved out of the MimeMultipartSignedBodyLine
        state, so tell the signature verification library that we've
        reached the end of the signed data.
        */
       status = (((MimeMultipartSignedClass *) obj->clazz)
-          ->crypto_data_eof) (sig->crypto_closure, PR_FALSE);
+          ->crypto_data_eof) (sig->crypto_closure, false);
       if (status < 0) return status;
     }
     break;
 
   case MimeMultipartSignedSignatureFirstLine:
     /* We have just moved out of the MimeMultipartSignedSignatureHeaders
      state, so cache away the headers that apply only to the sig part.
      */
@@ -385,17 +385,17 @@ MimeMultipartSigned_parse_line (const ch
     /* If the signature block has an encoding, set up a decoder for it.
      (Similar logic is in MimeLeafClass->parse_begin.)
      */
     {
     MimeDecoderData *(*fn) (nsresult (*) (const char*, PRInt32,void*), void*) = 0;
     nsCString encoding;
     encoding.Adopt(MimeHeaders_get (sig->sig_hdrs,
                    HEADER_CONTENT_TRANSFER_ENCODING,
-                   PR_TRUE, PR_FALSE));
+                   true, false));
     if (encoding.IsEmpty())
       ;
     else if (!PL_strcasecmp(encoding.get(), ENCODING_BASE64))
       fn = &MimeB64DecoderInit;
     else if (!PL_strcasecmp(encoding.get(), ENCODING_QUOTED_PRINTABLE))
     {
       sig->sig_decoder_data =
   MimeQPDecoderInit (((nsresult (*) (const char *, PRInt32, void *))
@@ -625,17 +625,17 @@ MimeMultipartSigned_emit_child (MimeObje
     obj->options->headers != MimeHeadersCitation &&
     sig->crypto_closure)
   {
     char *html = (((MimeMultipartSignedClass *) obj->clazz)
           ->crypto_generate_html (sig->crypto_closure));
 #if 0 // XXX For the moment, no HTML output. Fix this XXX //
     if (!html) return -1; /* MIME_OUT_OF_MEMORY? */
 
-    status = MimeObject_write(obj, html, strlen(html), PR_FALSE);
+    status = MimeObject_write(obj, html, strlen(html), false);
     PR_Free(html);
     if (status < 0) return status;
 #endif
 
     /* Now that we have written out the crypto stamp, the outermost header
      block is well and truly closed.  If this is in fact the outermost
      message, then run the post_header_html_fn now.
      */
@@ -648,20 +648,20 @@ MimeMultipartSigned_emit_child (MimeObje
       MimeObject *p;
       for (p = obj; p->parent; p = p->parent)
       outer_headers = p->headers;
       NS_ASSERTION(obj->options->state->first_data_written_p,
                    "should have already written some data");
       html = obj->options->generate_post_header_html_fn(NULL,
                           obj->options->html_closure,
                               outer_headers);
-      obj->options->state->post_header_html_run_p = PR_TRUE;
+      obj->options->state->post_header_html_run_p = true;
       if (html)
       {
-        status = MimeObject_write(obj, html, strlen(html), PR_FALSE);
+        status = MimeObject_write(obj, html, strlen(html), false);
         PR_Free(html);
         if (status < 0) return status;
       }
     }
   }
 
 
   /* Oh, this is fairly nasty.  We're skipping over our "create child" method
@@ -683,30 +683,30 @@ MimeMultipartSigned_emit_child (MimeObje
   status = (((MimeMultipartClass *)(&MIME_SUPERCLASS))->create_child(obj));
   if (status < 0) return status;
 
   // Notify the charset of the first part.
   if (obj->options && !(obj->options->override_charset)) {
     MimeObject *firstChild = ((MimeContainer*) obj)->children[0];
     char *disposition = MimeHeaders_get (firstChild->headers,
                                          HEADER_CONTENT_DISPOSITION, 
-                                         PR_TRUE,
-                                         PR_FALSE);
+                                         true,
+                                         false);
     // check if need to show as inline
     if (!disposition)
     {
       const char *content_type = firstChild->content_type;
       if (!PL_strcasecmp (content_type, TEXT_PLAIN) ||
           !PL_strcasecmp (content_type, TEXT_HTML) ||
           !PL_strcasecmp (content_type, TEXT_MDL) ||
           !PL_strcasecmp (content_type, MULTIPART_ALTERNATIVE) ||
           !PL_strcasecmp (content_type, MULTIPART_RELATED) ||
           !PL_strcasecmp (content_type, MESSAGE_NEWS) ||
           !PL_strcasecmp (content_type, MESSAGE_RFC822)) {
-        char *ct = MimeHeaders_get(mult->hdrs, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
+        char *ct = MimeHeaders_get(mult->hdrs, HEADER_CONTENT_TYPE, false, false);
         if (ct) {
           char *cset = MimeHeaders_get_parameter (ct, "charset", NULL, NULL);
           if (cset) {
             mimeEmitterUpdateCharacterSet(obj->options, cset);
             SetMailCharacterSetToMsgWindow(obj, cset);
             PR_Free(cset);
           }
           PR_Free(ct);
@@ -720,18 +720,18 @@ MimeMultipartSigned_emit_child (MimeObje
   //  in MimeMultipart_parse_line that would normally provide this notification
   //  does not get to fire.
   if (obj->options && obj->options->notify_nested_bodies) {
     MimeObject *kid = ((MimeContainer*) obj)->children[0];
     // The emitter is expecting the content type with parameters; not the fully
     //  parsed thing, so get it from raw.  (We do not do it in the charset
     //  notification block that just happened because it already has complex
     //  if-checks that do not jive with us.
-    char *ct = MimeHeaders_get(mult->hdrs, HEADER_CONTENT_TYPE, PR_FALSE,
-                               PR_FALSE);
+    char *ct = MimeHeaders_get(mult->hdrs, HEADER_CONTENT_TYPE, false,
+                               false);
     mimeEmitterAddHeaderField(obj->options, HEADER_CONTENT_TYPE,
                               ct ? ct : "text/plain");
     PR_Free(ct);
     
     char *part_path = mime_part_address(kid);
     if (part_path) {
       mimeEmitterAddHeaderField(obj->options,
                                 "x-jsemitter-part-path",
@@ -747,17 +747,17 @@ MimeMultipartSigned_emit_child (MimeObje
     return -1;
   body = cont->children[0];
   NS_ASSERTION(body, "missing body");
   if (!body)
     return -1;
 
 #ifdef MIME_DRAFTS
   if (body->options->decompose_file_p) {
-    body->options->signed_p = PR_TRUE;
+    body->options->signed_p = true;
     if (!mime_typep(body, (MimeObjectClass*)&mimeMultipartClass) &&
     body->options->decompose_file_init_fn)
     body->options->decompose_file_init_fn ( body->options->stream_closure, body->headers );
   }
 #endif /* MIME_DRAFTS */
 
   /* If there's no part_buffer, this is a zero-length signed message? */
   if (sig->part_buffer)
@@ -779,22 +779,22 @@ MimeMultipartSigned_emit_child (MimeObje
                  /* The (nsresult (*) ...) cast is to turn the
                   `void' argument into `MimeObject'. */
                  ((nsresult (*) (const char *, PRInt32, void *))
                 body->clazz->parse_buffer),
                 body);
     if (status < 0) return status;
   }
 
-  MimeMultipartSigned_cleanup(obj, PR_FALSE);
+  MimeMultipartSigned_cleanup(obj, false);
 
   /* Done parsing. */
-  status = body->clazz->parse_eof(body, PR_FALSE);
+  status = body->clazz->parse_eof(body, false);
   if (status < 0) return status;
-  status = body->clazz->parse_end(body, PR_FALSE);
+  status = body->clazz->parse_end(body, false);
   if (status < 0) return status;
 
 #ifdef MIME_DRAFTS
   if (body->options->decompose_file_p &&
     !mime_typep(body, (MimeObjectClass*)&mimeMultipartClass)  &&
     body->options->decompose_file_close_fn)
     body->options->decompose_file_close_fn(body->options->stream_closure);
 #endif /* MIME_DRAFTS */
--- a/mailnews/mime/src/mimemult.cpp
+++ b/mailnews/mime/src/mimemult.cpp
@@ -111,44 +111,44 @@ static int
 MimeMultipart_initialize (MimeObject *object)
 {
   MimeMultipart *mult = (MimeMultipart *) object;
   char *ct;
 
   /* This is an abstract class; it shouldn't be directly instantiated. */
   PR_ASSERT(object->clazz != (MimeObjectClass *) &mimeMultipartClass);
 
-  ct = MimeHeaders_get (object->headers, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
+  ct = MimeHeaders_get (object->headers, HEADER_CONTENT_TYPE, false, false);
   mult->boundary = (ct
           ? MimeHeaders_get_parameter (ct, HEADER_PARM_BOUNDARY, NULL, NULL)
           : 0);
   PR_FREEIF(ct);
   mult->state = MimeMultipartPreamble;
   return ((MimeObjectClass*)&MIME_SUPERCLASS)->initialize(object);
 }
 
 
 static void
 MimeMultipart_finalize (MimeObject *object)
 {
   MimeMultipart *mult = (MimeMultipart *) object;
 
-  object->clazz->parse_eof(object, PR_FALSE);
+  object->clazz->parse_eof(object, false);
 
   PR_FREEIF(mult->boundary);
   if (mult->hdrs)
   MimeHeaders_free(mult->hdrs);
   mult->hdrs = 0;
   ((MimeObjectClass*)&MIME_SUPERCLASS)->finalize(object);
 }
 
 int MimeWriteAString(MimeObject *obj, const nsACString &string)
 {
   const nsCString &flatString = PromiseFlatCString(string);
-  return MimeObject_write(obj, flatString.get(), flatString.Length(), PR_TRUE);
+  return MimeObject_write(obj, flatString.get(), flatString.Length(), true);
 }
 
 static int
 MimeMultipart_parse_line (const char *line, PRInt32 length, MimeObject *obj)
 {
   MimeMultipart *mult = (MimeMultipart *) obj;
   MimeContainer *container = (MimeContainer*) obj; 
   int status = 0;
@@ -162,17 +162,17 @@ MimeMultipart_parse_line (const char *li
 
   /* If we're supposed to write this object, but aren't supposed to convert
      it to HTML, simply pass it through unaltered. */
   if (obj->output_p &&
     obj->options &&
     !obj->options->write_html_p &&
     obj->options->output_fn
           && obj->options->format_out != nsMimeOutput::nsMimeMessageAttach)
-  return MimeObject_write(obj, line, length, PR_TRUE);
+  return MimeObject_write(obj, line, length, true);
 
   if (mult->state == MimeMultipartEpilogue)  /* already done */
     boundary = MimeMultipartBoundaryTypeNone;
   else
     boundary = ((MimeMultipartClass *)obj->clazz)->check_boundary(obj, line,
                                                                   length);
 
   if (boundary == MimeMultipartBoundaryTypeTerminator ||
@@ -200,24 +200,24 @@ MimeMultipart_parse_line (const char *li
       if (!mult->hdrs)
         return MIME_OUT_OF_MEMORY;
       if (obj->options && obj->options->state &&
           obj->options->state->partsToStrip.Length() > 0)
       {
         nsCAutoString newPart(mime_part_address(obj));
         newPart.Append('.');
         newPart.AppendInt(container->nchildren + 1);
-        obj->options->state->strippingPart = PR_FALSE;
+        obj->options->state->strippingPart = false;
         // check if this is a sub-part of a part we're stripping.
         for (PRUint32 partIndex = 0; partIndex < obj->options->state->partsToStrip.Length(); partIndex++)
         {
           nsCString &curPartToStrip = obj->options->state->partsToStrip[partIndex];
           if (newPart.Find(curPartToStrip) == 0 && (newPart.Length() == curPartToStrip.Length() || newPart.CharAt(curPartToStrip.Length()) == '.'))
           {
-            obj->options->state->strippingPart = PR_TRUE;
+            obj->options->state->strippingPart = true;
             if (partIndex < obj->options->state->detachToFiles.Length())
               obj->options->state->detachedFilePath = obj->options->state->detachToFiles[partIndex];
             break;
           }
         }
       }
     }
     
@@ -226,17 +226,17 @@ MimeMultipart_parse_line (const char *li
     if (obj->options && obj->options->format_out == nsMimeOutput::nsMimeMessageAttach)
     {
       // Because MimeMultipart_parse_child_line strips out the 
       // the CRLF of the last line before the end of a part, we need to add that
       // back in here.
       if (endOfPart)
         MimeWriteAString(obj, NS_LITERAL_CSTRING(MSG_LINEBREAK));
 
-      status = MimeObject_write(obj, line, length, PR_TRUE);
+      status = MimeObject_write(obj, line, length, true);
     }
     return 0;
   }
 
   /* Otherwise, this isn't a boundary string.  So do whatever it is we
    should do with this line (parse it as a header, feed it to the
    child part, ignore it, etc.) */
 
@@ -258,24 +258,24 @@ MimeMultipart_parse_line (const char *li
       // If this line is blank, we're now done parsing headers, and should
       // now examine the content-type to create this "body" part.
       //
       if (*line == '\r' || *line == '\n')
       {
         if (obj->options && obj->options->state &&
             obj->options->state->strippingPart)
         {
-          stripping = PR_TRUE;
+          stripping = true;
           bool detachingPart = obj->options->state->detachedFilePath.Length() > 0;
 
           nsCAutoString fileName;
           fileName.Adopt(MimeHeaders_get_name(mult->hdrs, obj->options));
           if (detachingPart)
           {
-            char *contentType = MimeHeaders_get(mult->hdrs, "Content-Type", PR_FALSE, PR_FALSE);
+            char *contentType = MimeHeaders_get(mult->hdrs, "Content-Type", false, false);
             if (contentType)
             {
               MimeWriteAString(obj, NS_LITERAL_CSTRING("Content-Type: "));
               MimeWriteAString(obj, nsDependentCString(contentType));
               PR_Free(contentType);
             }
             MimeWriteAString(obj, NS_LITERAL_CSTRING(MSG_LINEBREAK));
             MimeWriteAString(obj, NS_LITERAL_CSTRING("Content-Disposition: attachment; filename=\""));
@@ -303,17 +303,17 @@ MimeMultipart_parse_line (const char *li
           PRExplodedTime now;
           PR_ExplodeTime(PR_Now(), PR_LocalTimeParameters, &now);
           PR_FormatTimeUSEnglish(timeBuffer, sizeof(timeBuffer),
                                  "%a %b %d %H:%M:%S %Y",
                                  &now);
           MimeWriteAString(obj, nsDependentCString(timeBuffer));
           MimeWriteAString(obj, NS_LITERAL_CSTRING("\""MSG_LINEBREAK));
           MimeWriteAString(obj, NS_LITERAL_CSTRING(MSG_LINEBREAK"You deleted an attachment from this message. The original MIME headers for the attachment were:"MSG_LINEBREAK));
-          MimeHeaders_write_raw_headers(mult->hdrs, obj->options, PR_FALSE);
+          MimeHeaders_write_raw_headers(mult->hdrs, obj->options, false);
         }
         PRInt32 old_nchildren = container->nchildren;
         status = ((MimeMultipartClass *) obj->clazz)->create_child(obj);
         if (status < 0) return status;
         NS_ASSERTION(mult->state != MimeMultipartHeaders,
                      "mult->state shouldn't be MimeMultipartHeaders");
 
         if (!stripping && container->nchildren > old_nchildren && obj->options &&
@@ -324,51 +324,51 @@ MimeMultipart_parse_line (const char *li
         }
       }
       break;
     }
 
     case MimeMultipartPartFirstLine:
       /* Hand this line off to the sub-part. */
       status = (((MimeMultipartClass *) obj->clazz)->parse_child_line(obj,
-                                                  line, length, PR_TRUE));
+                                                  line, length, true));
       if (status < 0) return status;
       mult->state = MimeMultipartPartLine;
       break;
 
     case MimeMultipartPartLine:
       /* Hand this line off to the sub-part. */
       status = (((MimeMultipartClass *) obj->clazz)->parse_child_line(obj,
-                  line, length, PR_FALSE));
+                  line, length, false));
       if (status < 0) return status;
       break;
 
     default:
       NS_ERROR("unexpected state in parse line");
       return -1;
   }
 
   if (obj->options &&
       obj->options->format_out == nsMimeOutput::nsMimeMessageAttach &&
       (!(obj->options->state && obj->options->state->strippingPart) &&
       mult->state != MimeMultipartPartLine))
-      return MimeObject_write(obj, line, length, PR_FALSE);
+      return MimeObject_write(obj, line, length, false);
   return 0;
 }
 
 void MimeMultipart_notify_emitter(MimeObject *obj)
 {
   char *ct = nsnull;
 
   NS_ASSERTION(obj->options, "MimeMultipart_notify_emitter called with null options");
   if (! obj->options)
     return;
 
   ct = MimeHeaders_get(obj->headers, HEADER_CONTENT_TYPE,
-                       PR_FALSE, PR_FALSE);
+                       false, false);
   if (obj->options->notify_nested_bodies) {
     mimeEmitterAddHeaderField(obj->options, HEADER_CONTENT_TYPE,
                               ct ? ct : TEXT_PLAIN);
     char *part_path = mime_part_address(obj);
     if (part_path) {
       mimeEmitterAddHeaderField(obj->options, "x-jsemitter-part-path",
                                 part_path);
       PR_Free(part_path);
@@ -403,28 +403,28 @@ MimeMultipart_check_boundary(MimeObject 
 
   if (!mult->boundary ||
     line[0] != '-' ||
     line[1] != '-')
   return MimeMultipartBoundaryTypeNone;
 
   /* This is a candidate line to be a boundary.  Check it out... */
   blen = strlen(mult->boundary);
-  term_p = PR_FALSE;
+  term_p = false;
 
   /* strip trailing whitespace (including the newline.) */
   while(length > 2 && IS_SPACE(line[length-1]))
   length--;
 
   /* Could this be a terminating boundary? */
   if (length == blen + 4 &&
     line[length-1] == '-' &&
     line[length-2] == '-')
   {
-    term_p = PR_TRUE;
+    term_p = true;
   }
 
   //looks like we have a separator but first, we need to check it's not for one of the part's children.
   MimeContainer *cont = (MimeContainer *) obj;
   if (cont->nchildren > 0)
   {
     MimeObject *kid = cont->children[cont->nchildren-1];
     if (kid)
@@ -452,17 +452,17 @@ MimeMultipart_check_boundary(MimeObject 
 
 static int
 MimeMultipart_create_child(MimeObject *obj)
 {
   MimeMultipart *mult = (MimeMultipart *) obj;
   int           status;
   char *ct = (mult->hdrs
         ? MimeHeaders_get (mult->hdrs, HEADER_CONTENT_TYPE,
-                 PR_TRUE, PR_FALSE)
+                 true, false)
         : 0);
   const char *dct = (((MimeMultipartClass *) obj->clazz)->default_part_type);
   MimeObject *body = NULL;
 
   mult->state = MimeMultipartPartFirstLine;
   /* Don't pass in NULL as the content-type (this means that the
    auto-uudecode-hack won't ever be done for subparts of a
    multipart, but only for untyped children of message/rfc822.
@@ -539,17 +539,17 @@ MimeMultipart_create_child(MimeObject *o
 }
 
 
 static bool
 MimeMultipart_output_child_p(MimeObject *obj, MimeObject *child)
 {
   /* We don't output a child if we're stripping it. */
   if (obj->options && obj->options->state && obj->options->state->strippingPart)
-    return PR_FALSE;
+    return false;
   /* if we are saving an apple double attachment, ignore the appledouble wrapper part */
   return (obj->options && obj->options->write_html_p) ||
           PL_strcasecmp(child->content_type, MULTIPART_APPLEDOUBLE);
 }
 
 
 
 static int
@@ -572,19 +572,19 @@ MimeMultipart_close_child(MimeObject *ob
     // The kid would be already be closed if we encounter a multipart section
     // that did not have a fully delineated header block.  No header block means
     // no creation of a new child, but the termination case still happens and
     // we still end up here.  Obviously, we don't want to close the child a
     // second time and the best thing we can do is nothing.
     if (kid && !kid->closed_p)
     {
       int status;
-      status = kid->clazz->parse_eof(kid, PR_FALSE);
+      status = kid->clazz->parse_eof(kid, false);
       if (status < 0) return status;
-      status = kid->clazz->parse_end(kid, PR_FALSE);
+      status = kid->clazz->parse_end(kid, false);
       if (status < 0) return status;
 
 #ifdef MIME_DRAFTS
       if ( object->options &&
          object->options->decompose_file_p &&
          object->options->is_multipart_msg &&
          object->options->decompose_file_close_fn ) 
       {
@@ -707,17 +707,17 @@ MimeMultipart_parse_eof (MimeObject *obj
    */
   if (!abort_p && obj->ibuffer_fp > 0)
   {
     /* There is leftover data without a terminating newline. */
     int status = obj->clazz->parse_line(obj->ibuffer, obj->ibuffer_fp,obj);
     obj->ibuffer_fp = 0;
     if (status < 0)
     {
-      obj->closed_p = PR_TRUE;
+      obj->closed_p = true;
       return status;
     }
   }
 
   /* Now call parse_eof for our active child, if there is one.
    */
   if (cont->nchildren > 0 &&
     (mult->state == MimeMultipartPartLine ||
--- a/mailnews/mime/src/mimeobj.cpp
+++ b/mailnews/mime/src/mimeobj.cpp
@@ -99,21 +99,21 @@ static int
 MimeObject_initialize (MimeObject *obj)
 {
   /* This is an abstract class; it shouldn't be directly instantiated. */
   NS_ASSERTION(obj->clazz != &mimeObjectClass, "should directly instantiate abstract class");
 
   /* Set up the content-type and encoding. */
   if (!obj->content_type && obj->headers)
   obj->content_type = MimeHeaders_get (obj->headers, HEADER_CONTENT_TYPE,
-                     PR_TRUE, PR_FALSE);
+                     true, false);
   if (!obj->encoding && obj->headers)
   obj->encoding = MimeHeaders_get (obj->headers,
                    HEADER_CONTENT_TRANSFER_ENCODING,
-                   PR_TRUE, PR_FALSE);
+                   true, false);
 
   /* Special case to normalize some types and encodings to a canonical form.
    (These are nonstandard types/encodings which have been seen to appear in
    multiple forms; we normalize them so that things like looking up icons
    and extensions has consistent behavior for the receiver, regardless of
    the "alias" type that the sender used.)
    */
   if (!obj->content_type || !*(obj->content_type))
@@ -161,18 +161,18 @@ MimeObject_initialize (MimeObject *obj)
   }
 
   return 0;
 }
 
 static void
 MimeObject_finalize (MimeObject *obj)
 {
-  obj->clazz->parse_eof (obj, PR_FALSE);
-  obj->clazz->parse_end (obj, PR_FALSE);
+  obj->clazz->parse_eof (obj, false);
+  obj->clazz->parse_end (obj, false);
 
   if (obj->headers)
   {
     MimeHeaders_free(obj->headers);
     obj->headers = 0;
   }
 
   /* Should have been freed by parse_eof, but just in case... */
@@ -200,17 +200,17 @@ MimeObject_parse_begin (MimeObject *obj)
    the outermost object... */
   if (obj->options && !obj->options->state)
   {
     NS_ASSERTION(!obj->headers, "headers should be null");  /* should be the outermost object. */
 
     obj->options->state = new MimeParseStateObject;
     if (!obj->options->state) return MIME_OUT_OF_MEMORY;
     obj->options->state->root = obj;
-    obj->options->state->separator_suppressed_p = PR_TRUE; /* no first sep */
+    obj->options->state->separator_suppressed_p = true; /* no first sep */
     const char *delParts = PL_strcasestr(obj->options->url, "&del=");
     const char *detachLocations = PL_strcasestr(obj->options->url, "&detachTo=");
     if (delParts)
     {
       const char *delEnd = PL_strcasestr(delParts + 1, "&");
       if (!delEnd)
         delEnd = delParts + strlen(delParts);
       ParseString(Substring(delParts + 5, delEnd), ',', obj->options->state->partsToStrip);
@@ -224,19 +224,19 @@ MimeObject_parse_begin (MimeObject *obj)
 
   /* Decide whether this object should be output or not... */
   if (!obj->options || !obj->options->output_fn
     /* if we are decomposing the message in files and processing a multipart object,
        we must not output it without parsing it first */
      || (obj->options->decompose_file_p && obj->options->decompose_file_output_fn &&
       mime_typep(obj, (MimeObjectClass*) &mimeMultipartClass))
     )
-    obj->output_p = PR_FALSE;
+    obj->output_p = false;
   else if (!obj->options->part_to_load)
-    obj->output_p = PR_TRUE;
+    obj->output_p = true;
   else
   {
     char *id = mime_part_address(obj);
     if (!id) return MIME_OUT_OF_MEMORY;
 
       // We need to check if a part is the subpart of the part to load.
       // If so and this is a raw or body display output operation, then
       // we should mark the part for subsequent output.
@@ -263,17 +263,17 @@ MimeObject_parse_begin (MimeObject *obj)
 static int
 MimeObject_parse_buffer (const char *buffer, PRInt32 size, MimeObject *obj)
 {
   NS_ASSERTION(!obj->closed_p, "object shouldn't be closed");
   if (obj->closed_p) return -1;
 
   return mime_LineBuffer (buffer, size,
              &obj->ibuffer, &obj->ibuffer_size, &obj->ibuffer_fp,
-             PR_TRUE,
+             true,
              ((int (*) (char *, PRInt32, void *))
               /* This cast is to turn void into MimeObject */
               obj->clazz->parse_line),
              obj);
 }
 
 static int
 MimeObject_parse_line (const char *line, PRInt32 length, MimeObject *obj)
@@ -295,22 +295,22 @@ MimeObject_parse_eof (MimeObject *obj, b
    */
   if (!abort_p &&
     obj->ibuffer_fp > 0)
   {
     int status = obj->clazz->parse_line (obj->ibuffer, obj->ibuffer_fp, obj);
     obj->ibuffer_fp = 0;
     if (status < 0)
     {
-      obj->closed_p = PR_TRUE;
+      obj->closed_p = true;
       return status;
     }
   }
 
-  obj->closed_p = PR_TRUE;
+  obj->closed_p = true;
   return 0;
 }
 
 static int
 MimeObject_parse_end (MimeObject *obj, bool abort_p)
 {
   if (obj->parsed_p)
   {
@@ -321,25 +321,25 @@ MimeObject_parse_end (MimeObject *obj, b
   /* We won't be needing these buffers any more; nuke 'em. */
   PR_FREEIF(obj->ibuffer);
   obj->ibuffer_fp = 0;
   obj->ibuffer_size = 0;
   PR_FREEIF(obj->obuffer);
   obj->obuffer_fp = 0;
   obj->obuffer_size = 0;
 
-  obj->parsed_p = PR_TRUE;
+  obj->parsed_p = true;
   return 0;
 }
 
 static bool
 MimeObject_displayable_inline_p (MimeObjectClass *clazz, MimeHeaders *hdrs)
 {
   NS_ERROR("shouldn't call this method");
-  return PR_FALSE;
+  return false;
 }
 
 #if defined(DEBUG) && defined(XP_UNIX)
 static int
 MimeObject_debug_print (MimeObject *obj, PRFileDesc *stream, PRInt32 depth)
 {
   int i;
   char *addr = mime_part_address(obj);
--- a/mailnews/mime/src/mimepbuf.cpp
+++ b/mailnews/mime/src/mimepbuf.cpp
@@ -141,17 +141,17 @@ MimePartBufferReset (MimePartBufferData 
   if (data->output_file_stream)
   {
     data->output_file_stream->Close();
     data->output_file_stream = nsnull;
   }
 
   if (data->file_buffer)
   {
-    data->file_buffer->Remove(PR_FALSE);
+    data->file_buffer->Remove(false);
     data->file_buffer = nsnull;
   }
 }
 
 
 void
 MimePartBufferDestroy (MimePartBufferData *data)
 {
--- a/mailnews/mime/src/mimesun.cpp
+++ b/mailnews/mime/src/mimesun.cpp
@@ -129,17 +129,17 @@ MimeSunAttachment_create_child(MimeObjec
   const char *mime_ct = 0, *sun_enc_info = 0, *mime_cte = 0;
   char *mime_ct2 = 0;    /* sometimes we need to copy; this is for freeing. */
   MimeObject *child = 0;
 
   mult->state = MimeMultipartPartLine;
 
   sun_data_type = (mult->hdrs
            ? MimeHeaders_get (mult->hdrs, HEADER_X_SUN_DATA_TYPE,
-                    PR_TRUE, PR_FALSE)
+                    true, false)
            : 0);
   if (sun_data_type)
   {
     int i;
     static const struct { const char *in, *out; } sun_types[] = {
 
     /* Convert recognised Sun types to the corresponding MIME types,
        and convert unrecognized ones based on the file extension and
@@ -241,17 +241,17 @@ MimeSunAttachment_create_child(MimeObjec
         encoding: COMPRESS,UUENCODE   encoding: x-uuencode
 
         type:     TEXT                type:     application/octet-stream
         encoding: UNKNOWN,UUENCODE    encoding: x-uuencode
    */
 
   sun_data_type = (mult->hdrs
            ? MimeHeaders_get (mult->hdrs, HEADER_X_SUN_ENCODING_INFO,
-                    PR_FALSE,PR_FALSE)
+                    false,false)
            : 0);
   sun_enc_info = sun_data_type;
 
 
   /* this "adpcm-compress" pseudo-encoding is some random junk that
    MailTool adds to the encoding description of .AU files: we can
    ignore it if it is the leftmost element of the encoding field.
    (It looks like it's created via `audioconvert -f g721'.  Why?
--- a/mailnews/mime/src/mimetenr.cpp
+++ b/mailnews/mime/src/mimetenr.cpp
@@ -50,11 +50,11 @@ MimeDefClass(MimeInlineTextEnriched, Mim
 static int
 MimeInlineTextEnrichedClassInitialize(MimeInlineTextEnrichedClass *clazz)
 {
 #ifdef DEBUG
   MimeObjectClass *oclass = (MimeObjectClass *) clazz;
   PR_ASSERT(!oclass->class_initialized);
 #endif
   MimeInlineTextRichtextClass *rclass = (MimeInlineTextRichtextClass *) clazz;
-  rclass->enriched_p = PR_TRUE;
+  rclass->enriched_p = true;
   return 0;
 }
--- a/mailnews/mime/src/mimetext.cpp
+++ b/mailnews/mime/src/mimetext.cpp
@@ -91,55 +91,55 @@ MimeInlineTextClassInitialize(MimeInline
 }
 
 static int
 MimeInlineText_initialize (MimeObject *obj)
 {
   /* This is an abstract class; it shouldn't be directly instantiated. */
   PR_ASSERT(obj->clazz != (MimeObjectClass *) &mimeInlineTextClass);
 
-  ((MimeInlineText *) obj)->initializeCharset = PR_FALSE;
-  ((MimeInlineText *) obj)->needUpdateMsgWinCharset = PR_FALSE;
+  ((MimeInlineText *) obj)->initializeCharset = false;
+  ((MimeInlineText *) obj)->needUpdateMsgWinCharset = false;
   return ((MimeObjectClass*)&MIME_SUPERCLASS)->initialize(obj);
 }
 
 static int MimeInlineText_initializeCharset(MimeObject *obj)
 {
   MimeInlineText  *text = (MimeInlineText *) obj;
 
-  text->inputAutodetect = PR_FALSE;
-  text->charsetOverridable = PR_FALSE;
+  text->inputAutodetect = false;
+  text->charsetOverridable = false;
   
   /* Figure out an appropriate charset for this object.
   */
   if (!text->charset && obj->headers)
   {
     if (obj->options && obj->options->override_charset)
     {
       text->charset = strdup(obj->options->default_charset);
     }
     else
     {
       char *ct = MimeHeaders_get (obj->headers, HEADER_CONTENT_TYPE,
-                                  PR_FALSE, PR_FALSE);
+                                  false, false);
       if (ct)
       {
         text->charset = MimeHeaders_get_parameter (ct, "charset", NULL, NULL);
         PR_Free(ct);
       }
     
       if (!text->charset)
       {
         /* If we didn't find "Content-Type: ...; charset=XX" then look
            for "X-Sun-Charset: XX" instead.  (Maybe this should be done
            in MimeSunAttachmentClass, but it's harder there than here.)
          */
         text->charset = MimeHeaders_get (obj->headers,
                                           HEADER_X_SUN_CHARSET,
-                                          PR_FALSE, PR_FALSE);
+                                          false, false);
       }
 
       /* iMIP entities without an explicit charset parameter default to
        US-ASCII (RFC 2447, section 2.4). However, Microsoft Outlook generates
        UTF-8 but omits the charset parameter.
        When no charset is defined by the container (e.g. iMIP), iCalendar
        files default to UTF-8 (RFC 2445, section 4.1.4).
        */
@@ -147,25 +147,25 @@ static int MimeInlineText_initializeChar
           obj->content_type &&
           !PL_strcasecmp(obj->content_type, TEXT_CALENDAR))
         text->charset = strdup("UTF-8");
 
       if (!text->charset)
       {
         nsresult res;
         
-        text->charsetOverridable = PR_TRUE;
+        text->charsetOverridable = true;
 
         nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID, &res)); 
         if (NS_SUCCEEDED(res))
         {
           nsCOMPtr<nsIPrefLocalizedString> str;
           if (NS_SUCCEEDED(prefBranch->GetComplexValue("intl.charset.detector", NS_GET_IID(nsIPrefLocalizedString), getter_AddRefs(str)))) {
             //only if we can get autodetector name correctly, do we set this to true
-            text->inputAutodetect = PR_TRUE;
+            text->inputAutodetect = true;
           }
         }
         
         if (obj->options && obj->options->default_charset)
           text->charset = strdup(obj->options->default_charset);
         else
         {
           if (NS_SUCCEEDED(res))
@@ -185,47 +185,47 @@ static int MimeInlineText_initializeChar
   {
     //we need to prepare lineDam for charset detection
     text->lineDamBuffer = (char*)PR_Malloc(DAM_MAX_BUFFER_SIZE);
     text->lineDamPtrs = (char**)PR_Malloc(DAM_MAX_LINES*sizeof(char*));
     text->curDamOffset = 0;
     text->lastLineInDam = 0;
     if (!text->lineDamBuffer || !text->lineDamPtrs)
     {
-      text->inputAutodetect = PR_FALSE;
+      text->inputAutodetect = false;
       PR_FREEIF(text->lineDamBuffer);
       PR_FREEIF(text->lineDamPtrs);
     }
   }
 
-  text->initializeCharset = PR_TRUE;
+  text->initializeCharset = true;
 
   return 0;
 }
 
 static void
 MimeInlineText_finalize (MimeObject *obj)
 {
   MimeInlineText *text = (MimeInlineText *) obj;
 
-  obj->clazz->parse_eof (obj, PR_FALSE);
-  obj->clazz->parse_end (obj, PR_FALSE);
+  obj->clazz->parse_eof (obj, false);
+  obj->clazz->parse_end (obj, false);
 
   text->inputDecoder = nsnull;
   text->utf8Encoder = nsnull;
   PR_FREEIF(text->charset);
 
   /* Should have been freed by parse_eof, but just in case... */
   PR_ASSERT(!text->cbuffer);
   PR_FREEIF (text->cbuffer);
 
   if (text->inputAutodetect) {
     PR_FREEIF(text->lineDamBuffer);
     PR_FREEIF(text->lineDamPtrs);
-    text->inputAutodetect = PR_FALSE;
+    text->inputAutodetect = false;
   }
 
   ((MimeObjectClass*)&MIME_SUPERCLASS)->finalize (obj);
 }
 
 
 static int
 MimeInlineText_parse_eof (MimeObject *obj, bool abort_p)
@@ -256,17 +256,17 @@ MimeInlineText_parse_eof (MimeObject *ob
                                                            obj);
     obj->ibuffer_fp = 0;
     if (status < 0)
     {
       //we haven't find charset yet? Do it before return
       if (text->inputAutodetect)
         status = MimeInlineText_open_dam(nsnull, 0, obj);
 
-      obj->closed_p = PR_TRUE;
+      obj->closed_p = true;
       return status;
     }
   }
 
   //we haven't find charset yet? now its the time
   if (text->inputAutodetect)
      status = MimeInlineText_open_dam(nsnull, 0, obj);
  
@@ -338,25 +338,25 @@ MimeInlineText_parse_decoded_buffer (con
 
   /* MimeLeaf takes care of this. */
   PR_ASSERT(obj->output_p && obj->options && obj->options->output_fn);
   if (!obj->options) return -1;
 
   /* If we're supposed to write this object, but aren't supposed to convert
    it to HTML, simply pass it through unaltered. */
   if (!obj->options->write_html_p && obj->options->format_out != nsMimeOutput::nsMimeMessageAttach)
-  return MimeObject_write(obj, buf, size, PR_TRUE);
+  return MimeObject_write(obj, buf, size, true);
 
   /* This is just like the parse_decoded_buffer method we inherit from the
    MimeLeaf class, except that we line-buffer to our own wrapper on the
    `parse_line' method instead of calling the `parse_line' method directly.
    */
   return mime_LineBuffer (buf, size,
              &obj->ibuffer, &obj->ibuffer_size, &obj->ibuffer_fp,
-             PR_TRUE,
+             true,
              ((int (*) (char *, PRInt32, void *))
               /* This cast is to turn void into MimeObject */
               MimeInlineText_rotate_convert_and_parse_line),
              obj);
 }
 
 
 #define MimeInlineText_grow_cbuffer(text, desired_size) \
@@ -493,17 +493,17 @@ MimeInlineText_open_dam(char *line, PRIn
 
   if (length)
     status = MimeInlineText_convert_and_parse_line(line, length, obj);
 
   PR_Free(text->lineDamPtrs);
   PR_Free(text->lineDamBuffer);
   text->lineDamPtrs = nsnull;
   text->lineDamBuffer = nsnull;
-  text->inputAutodetect = PR_FALSE;
+  text->inputAutodetect = false;
 
   return status;
 }
 
 
 static int
 MimeInlineText_rotate_convert_and_parse_line(char *line, PRInt32 length,
                        MimeObject *obj)
@@ -524,17 +524,17 @@ MimeInlineText_rotate_convert_and_parse_
 
   // Now convert to the canonical charset, if desired.
   //
   bool    doConvert = true;
   // Don't convert vCard data
   if ( ( (obj->content_type) && (!PL_strcasecmp(obj->content_type, TEXT_VCARD)) ) ||
        (obj->options->format_out == nsMimeOutput::nsMimeMessageSaveAs)
        || obj->options->format_out == nsMimeOutput::nsMimeMessageAttach)
-    doConvert = PR_FALSE;
+    doConvert = false;
     
   // Only convert if the user prefs is false 
   if ( (obj->options && obj->options->charset_conversion_fn) &&
        (!obj->options->force_user_charset) &&
        (doConvert)       
      )
   {
     MimeInlineText  *text = (MimeInlineText *) obj;
--- a/mailnews/mime/src/mimethpl.cpp
+++ b/mailnews/mime/src/mimethpl.cpp
@@ -132,33 +132,33 @@ MimeInlineTextHTMLAsPlaintext_parse_eof 
   }
 
   if (status < 0)
     return status;
 
   // Second part of the flush hack. Pretend obj wasn't closed yet, so that our super class
   // gets a chance to write the closing.
   bool save_closed_p = obj->closed_p;
-  obj->closed_p = PR_FALSE;
+  obj->closed_p = false;
   status = ((MimeObjectClass*)&MIME_SUPERCLASS)->parse_eof(obj, abort_p);
   // Restore closed_p.
   obj->closed_p = save_closed_p;
   return status;
 }
 
 void
 MimeInlineTextHTMLAsPlaintext_finalize (MimeObject *obj)
 {
   MimeInlineTextHTMLAsPlaintext *textHTMLPlain =
                                         (MimeInlineTextHTMLAsPlaintext *) obj;
   if (textHTMLPlain && textHTMLPlain->complete_buffer)
   {
     // If there's content in the buffer, make sure that we output it.
     // don't care about return codes
-    obj->clazz->parse_eof(obj, PR_FALSE);
+    obj->clazz->parse_eof(obj, false);
 
     delete textHTMLPlain->complete_buffer;
     textHTMLPlain->complete_buffer = NULL;
       /* It is important to zero the pointer, so we can reliably check for
          the validity of it in the other functions. See above. */
   }
   ((MimeObjectClass*)&MIME_SUPERCLASS)->finalize (obj);
 }
--- a/mailnews/mime/src/mimethsa.cpp
+++ b/mailnews/mime/src/mimethsa.cpp
@@ -95,34 +95,34 @@ printf(" B2\n");
   // charset
   /* honestly, I don't know how that charset stuff works in libmime.
      The part in mimethtm doesn't make much sense to me either.
      I'll just dump the charset we get in the mime headers into a
      HTML meta http-equiv.
      XXX Not sure, if that is correct, though. */
   char *content_type =
     (obj->headers
-     ? MimeHeaders_get(obj->headers, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE)
+     ? MimeHeaders_get(obj->headers, HEADER_CONTENT_TYPE, false, false)
      : 0);
   if (content_type)
   {
     char* charset = MimeHeaders_get_parameter(content_type,
                                               HEADER_PARM_CHARSET,
                                               NULL, NULL);
     PR_Free(content_type);
     if (charset)
     {
       nsCAutoString charsetline(
         "\n<meta http-equiv=\"Context-Type\" content=\"text/html; charset=");
       charsetline += charset;
       charsetline += "\">\n";
       int status = MimeObject_write(obj,
                                     charsetline.get(),
                                     charsetline.Length(),
-                                    PR_TRUE);
+                                    true);
       PR_Free(charset);
       if (status < 0)
         return status;
     }
   }
 #ifdef DEBUG_BenB
 printf("/parse_begin\n");
 #endif
@@ -221,17 +221,17 @@ printf("finalize\n");
                                         (MimeInlineTextHTMLSanitized *) obj;
 #ifdef DEBUG_BenB
 printf(" cbp: %d\n", textHTMLSan->complete_buffer);
 printf(" F1\n");
 #endif
 
   if (textHTMLSan && textHTMLSan->complete_buffer)
   {
-    obj->clazz->parse_eof(obj, PR_FALSE);
+    obj->clazz->parse_eof(obj, false);
 #ifdef DEBUG_BenB
 printf(" F2\n");
 #endif
     delete textHTMLSan->complete_buffer;
 #ifdef DEBUG_BenB
 printf(" cbp: %d\n", textHTMLSan->complete_buffer);
 printf(" F3\n");
 #endif
--- a/mailnews/mime/src/mimethtm.cpp
+++ b/mailnews/mime/src/mimethtm.cpp
@@ -78,25 +78,25 @@ MimeInlineTextHTML_parse_begin (MimeObje
   // Set a default font (otherwise unicode font will be used since the data is UTF-8).
   if (nsMimeOutput::nsMimeMessageBodyDisplay == obj->options->format_out ||
       nsMimeOutput::nsMimeMessagePrintOutput == obj->options->format_out)
   {
     char buf[256];            // local buffer for html tag
     PRInt32 fontSize;         // default font size
     PRInt32 fontSizePercentage;   // size percentage
     nsCAutoString fontLang;       // langgroup of the font.
-    if (NS_SUCCEEDED(GetMailNewsFont(obj, PR_FALSE, &fontSize, &fontSizePercentage,fontLang)))
+    if (NS_SUCCEEDED(GetMailNewsFont(obj, false, &fontSize, &fontSizePercentage,fontLang)))
     {
       PR_snprintf(buf, 256, "<div class=\"moz-text-html\"  lang=\"%s\">",
                   fontLang.get());
-      status = MimeObject_write(obj, buf, strlen(buf), PR_TRUE);
+      status = MimeObject_write(obj, buf, strlen(buf), true);
     }
     else
     {
-      status = MimeObject_write(obj, "<div class=\"moz-text-html\">", 27, PR_TRUE);
+      status = MimeObject_write(obj, "<div class=\"moz-text-html\">", 27, true);
     }
     if(status<0) return status;
   }
 
   MimeInlineTextHTML  *textHTML = (MimeInlineTextHTML *) obj;
 
   textHTML->charset = nsnull;
 
@@ -104,22 +104,22 @@ MimeInlineTextHTML_parse_begin (MimeObje
    to the screen (that is, not writing this part "raw") then translate
    that Content-Base header into a <BASE> tag in the HTML.
   */
   if (obj->options &&
     obj->options->write_html_p &&
     obj->options->output_fn)
   {
     char *base_hdr = MimeHeaders_get (obj->headers, HEADER_CONTENT_BASE,
-      PR_FALSE, PR_FALSE);
+      false, false);
 
     /* rhp - for MHTML Spec changes!!! */
     if (!base_hdr)
     {
-      base_hdr = MimeHeaders_get (obj->headers, HEADER_CONTENT_LOCATION, PR_FALSE, PR_FALSE);
+      base_hdr = MimeHeaders_get (obj->headers, HEADER_CONTENT_LOCATION, false, false);
     }
     /* rhp - for MHTML Spec changes!!! */
 
     if (base_hdr)
     {
       PRUint32 buflen = strlen(base_hdr) + 20;
       char *buf = (char *) PR_MALLOC(buflen);
       const char *in;
@@ -144,17 +144,17 @@ MimeInlineTextHTML_parse_begin (MimeObje
 
         /* Close the tag and argument. */
         *out++ = '"';
         *out++ = '>';
         *out++ = 0;
 
         PR_Free(base_hdr);
 
-        status = MimeObject_write(obj, buf, strlen(buf), PR_FALSE);
+        status = MimeObject_write(obj, buf, strlen(buf), false);
         PR_Free(buf);
         if (status < 0) return status;
     }
   }
 
   return 0;
 }
 
@@ -196,30 +196,30 @@ MimeInlineTextHTML_parse_line (const cha
             PL_strncasecmp(charset, "UTF-16", 6) &&
             PL_strncasecmp(charset, "UTF-32", 6))
         {
           textHTML->charset = charset;
 
           // write out the data without the charset part...
           if (textHTML->charset)
           {
-            int err = MimeObject_write(obj, line, cp - line, PR_TRUE);
+            int err = MimeObject_write(obj, line, cp - line, true);
             if (err == 0)
-              err = MimeObject_write(obj, cp2, length - (int)(cp2 - line), PR_TRUE);
+              err = MimeObject_write(obj, cp2, length - (int)(cp2 - line), true);
 
             return err;
           }
         }
         PR_FREEIF(charset);
       }
     }
   }
 
   // Now, just write out the data...
-  return MimeObject_write(obj, line, length, PR_TRUE);
+  return MimeObject_write(obj, line, length, true);
 }
 
 static int
 MimeInlineTextHTML_parse_eof (MimeObject *obj, bool abort_p)
 {
   int status;
   MimeInlineTextHTML  *textHTML = (MimeInlineTextHTML *) obj;
   if (obj->closed_p) return 0;
@@ -227,12 +227,12 @@ MimeInlineTextHTML_parse_eof (MimeObject
   PR_FREEIF(textHTML->charset);
 
   /* Run parent method first, to flush out any buffered data. */
   status = ((MimeObjectClass*)&MIME_SUPERCLASS)->parse_eof(obj, abort_p);
   if (status < 0) return status;
 
   if (nsMimeOutput::nsMimeMessageBodyDisplay == obj->options->format_out ||
       nsMimeOutput::nsMimeMessagePrintOutput == obj->options->format_out)
-    status = MimeObject_write(obj, "</div>", 6, PR_FALSE);
+    status = MimeObject_write(obj, "</div>", 6, false);
 
   return 0;
 }
--- a/mailnews/mime/src/mimetpfl.cpp
+++ b/mailnews/mime/src/mimetpfl.cpp
@@ -87,17 +87,17 @@ MimeInlineTextPlainFlowedClassInitialize
 }
 
 static int
 MimeInlineTextPlainFlowed_parse_begin (MimeObject *obj)
 {
   int status = ((MimeObjectClass*)&MIME_SUPERCLASS)->parse_begin(obj);
   if (status < 0) return status;
 
-  status =  MimeObject_write(obj, "", 0, PR_TRUE); /* force out any separators... */
+  status =  MimeObject_write(obj, "", 0, true); /* force out any separators... */
   if(status<0) return status;
 
   bool quoting = ( obj->options
     && ( obj->options->format_out == nsMimeOutput::nsMimeMessageQuoting ||
          obj->options->format_out == nsMimeOutput::nsMimeMessageBodyQuoting
        )       );  // The output will be inserted in the composer as quotation
   bool plainHTML = quoting || (obj->options &&
        obj->options->format_out == nsMimeOutput::nsMimeMessageSaveAs);
@@ -115,37 +115,37 @@ MimeInlineTextPlainFlowed_parse_begin (M
 
   // Link it up.
   exdata->next = MimeInlineTextPlainFlowedExDataList;
   MimeInlineTextPlainFlowedExDataList = exdata;
 
   // Initialize data
 
   exdata->ownerobj = obj;
-  exdata->inflow = PR_FALSE;
+  exdata->inflow = false;
   exdata->quotelevel = 0;
-  exdata->isSig = PR_FALSE;
+  exdata->isSig = false;
 
   // check for DelSp=yes (RFC 3676)
 
   char *content_type_row =
     (obj->headers
-     ? MimeHeaders_get(obj->headers, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE)
+     ? MimeHeaders_get(obj->headers, HEADER_CONTENT_TYPE, false, false)
      : 0);
   char *content_type_delsp =
     (content_type_row
      ? MimeHeaders_get_parameter(content_type_row, "delsp", NULL,NULL)
      : 0);
   ((MimeInlineTextPlainFlowed *)obj)->delSp = content_type_delsp && !PL_strcasecmp(content_type_delsp, "yes");
   PR_Free(content_type_delsp);
   PR_Free(content_type_row);
 
   // Get Prefs for viewing
 
-  exdata->fixedwidthfont = PR_FALSE;
+  exdata->fixedwidthfont = false;
   //  Quotes
   text->mQuotedSizeSetting = 0;   // mail.quoted_size
   text->mQuotedStyleSetting = 0;  // mail.quoted_style
   text->mCitationColor = nsnull;  // mail.citation_color
 
   nsIPrefBranch *prefBranch = GetPrefBranch(obj->options);
   if (prefBranch)
   {
@@ -203,17 +203,17 @@ MimeInlineTextPlainFlowed_parse_begin (M
     }
     if (!plainHTML && !fontLang.IsEmpty())
     {
       openingDiv += " lang=\"";
       openingDiv += fontLang;
       openingDiv += '\"';
     }
     openingDiv += ">";
-    status = MimeObject_write(obj, openingDiv.get(), openingDiv.Length(), PR_FALSE);
+    status = MimeObject_write(obj, openingDiv.get(), openingDiv.Length(), false);
     if (status < 0) return status;
   }
 
   return 0;
 }
 
 static int
 MimeInlineTextPlainFlowed_parse_eof (MimeObject *obj, bool abort_p)
@@ -251,27 +251,27 @@ MimeInlineTextPlainFlowed_parse_eof (Mim
   NS_ASSERTION (exdata, "The extra data has disappeared!");
 
   if (!obj->output_p) {
     status = 0;
     goto EarlyOut;
   }
 
   for(; exdata->quotelevel > 0; exdata->quotelevel--) {
-    status = MimeObject_write(obj, "</blockquote>", 13, PR_FALSE);
+    status = MimeObject_write(obj, "</blockquote>", 13, false);
     if(status<0) goto EarlyOut;
   }
 
   if (exdata->isSig && !quoting) {
-    status = MimeObject_write(obj, "</div>", 6, PR_FALSE); // .moz-txt-sig
+    status = MimeObject_write(obj, "</div>", 6, false); // .moz-txt-sig
     if (status<0) goto EarlyOut;
   }
   if (!quoting) // HACK (see above)
   {
-    status = MimeObject_write(obj, "</div>", 6, PR_FALSE); // .moz-text-flowed
+    status = MimeObject_write(obj, "</div>", 6, false); // .moz-text-flowed
     if (status<0) goto EarlyOut;
   }
 
   status = 0;
 
 EarlyOut:
   PR_Free(exdata);
 
@@ -336,17 +336,17 @@ MimeInlineTextPlainFlowed_parse_line (co
   PRInt32 index = length-1;
   while(index >= 0 && ('\r' == line[index] || '\n' == line[index])) {
     index--;
   }
   if (index > linep - line && ' ' == line[index])
        /* Ignore space stuffing, i.e. lines with just
           (quote marks and) a space count as empty */
   {
-    flowed = PR_TRUE;
+    flowed = true;
     sigSeparator = (index - (linep - line) + 1 == 3) && !strncmp(linep, "-- ", 3);
     if (((MimeInlineTextPlainFlowed *) obj)->delSp && ! sigSeparator)
        /* If line is flowed and DelSp=yes, logically
           delete trailing space. Line consisting of
           dash dash space ("-- "), commonly used as
           signature separator, gets special handling
           (RFC 3676) */
     {
@@ -457,51 +457,51 @@ MimeInlineTextPlainFlowed_parse_line (co
     // Check RFC 2646 "4.3. Usenet Signature Convention": "-- "+CRLF is
     // not a flowed line
     if (sigSeparator)
     {
       if (linequotelevel > 0 || exdata->isSig)
       {
         preface += "--&nbsp;<br>";
       } else {
-        exdata->isSig = PR_TRUE;
+        exdata->isSig = true;
         preface += "<div class=\"moz-txt-sig\"><span class=\"moz-txt-tag\">"
                    "--&nbsp;<br></span>";
       }
     } else {
-      Line_convert_whitespace(lineResult, PR_FALSE /* Allow wraps */,
+      Line_convert_whitespace(lineResult, false /* Allow wraps */,
                               lineResult2);
     }
 
-    exdata->inflow=PR_TRUE;
+    exdata->inflow=true;
   } else {
     // Fixed paragraph.
     Line_convert_whitespace(lineResult,
                             !plainHTML && !obj->options->wrap_long_lines_p
                               /* If wrap, convert all spaces but the last in
                                  a row into nbsp, otherwise all. */,
                             lineResult2);
     lineResult2.AppendLiteral("<br>");
-    exdata->inflow = PR_FALSE;
+    exdata->inflow = false;
   } // End Fixed line
 
   if (!(exdata->isSig && quoting))
   {
-    status = MimeObject_write(obj, preface.get(), preface.Length(), PR_TRUE);
+    status = MimeObject_write(obj, preface.get(), preface.Length(), true);
     if (status < 0) return status;
     nsCAutoString outString;
     if (obj->options->format_out != nsMimeOutput::nsMimeMessageSaveAs ||
         !mailCharset || !*mailCharset)
       CopyUTF16toUTF8(lineResult2, outString);
     else
     { // convert back to mailCharset before writing.
       rv = nsMsgI18NConvertFromUnicode(mailCharset, lineResult2, outString);
       NS_ENSURE_SUCCESS(rv, -1);
     }
-    status = MimeObject_write(obj, outString.get(), outString.Length(), PR_TRUE);
+    status = MimeObject_write(obj, outString.get(), outString.Length(), true);
     return status;
   }
   else
     return NS_OK;
 }
 
 
 /**
@@ -525,46 +525,46 @@ static void Update_in_tag_info(bool *a_i
   if(*a_in_tag) {
     // Keep us informed of what's quoted so that we
     // don't end the tag too soon. For instance in
     // <font face="weird>font<name">
     if(*a_in_quote_in_tag) {
       // We are in a quote. A quote is ended by the same
       // character that started it ('...' or "...")
       if(*a_quote_char == a_current_char) {
-        *a_in_quote_in_tag = PR_FALSE;
+        *a_in_quote_in_tag = false;
       }
     } else {
       // We are not currently in a quote, but we may enter
       // one right this minute.
       switch(a_current_char) {
       case '"':
       case '\'':
-        *a_in_quote_in_tag = PR_TRUE;
+        *a_in_quote_in_tag = true;
         *a_quote_char = a_current_char;
         break;
       case '>':
         // Tag is ended
-        *a_in_tag = PR_FALSE;
+        *a_in_tag = false;
         break;
       default:
         // Do nothing
         ;
       }
     }
     return;
   }
 
   // Not in a tag.
   // Check if we are entering a tag by looking for '<'.
   // All normal occurrences of '<' should have been replaced
   // by &lt;
   if ('<' == a_current_char) {
-    *a_in_tag = PR_TRUE;
-    *a_in_quote_in_tag = PR_FALSE;
+    *a_in_tag = true;
+    *a_in_quote_in_tag = false;
   }
 }
 
 
 /**
  * Converts whitespace to |&nbsp;|, if appropriate.
  *
  * @param in a_current_char, the char to convert.
--- a/mailnews/mime/src/mimetpla.cpp
+++ b/mailnews/mime/src/mimetpla.cpp
@@ -137,17 +137,17 @@ MimeInlineTextPlain_parse_begin (MimeObj
     obj->options->output_fn)
   {
       MimeInlineTextPlain *text = (MimeInlineTextPlain *) obj;
       text->mCiteLevel = 0;
 
       // Get the prefs
 
       // Quoting
-      text->mBlockquoting = PR_TRUE; // mail.quoteasblock
+      text->mBlockquoting = true; // mail.quoteasblock
 
       // Viewing
       text->mQuotedSizeSetting = 0;   // mail.quoted_size
       text->mQuotedStyleSetting = 0;  // mail.quoted_style
       text->mCitationColor = nsnull;  // mail.citation_color
       bool graphicalQuote = true; // mail.quoted_graphical
 
       nsIPrefBranch *prefBranch = GetPrefBranch(obj->options);
@@ -229,17 +229,17 @@ MimeInlineTextPlain_parse_begin (MimeObj
         else
           openingDiv = "<pre wrap>\n";
 
       /* text/plain objects always have separators before and after them.
        Note that this is not the case for text/enriched objects. */
       status = MimeObject_write_separator(obj);
       if (status < 0) return status;
 
-      status = MimeObject_write(obj, openingDiv.get(), openingDiv.Length(), PR_TRUE);
+      status = MimeObject_write(obj, openingDiv.get(), openingDiv.Length(), true);
       if (status < 0) return status;
     }
   }
 
   return 0;
 }
 
 static int
@@ -274,24 +274,24 @@ MimeInlineTextPlain_parse_eof (MimeObjec
   if (obj->options &&
     obj->options->write_html_p &&
     obj->options->output_fn &&
     !abort_p && !rawPlainText)
   {
       MimeInlineTextPlain *text = (MimeInlineTextPlain *) obj;
       if (text->mIsSig && !quoting)
       {
-        status = MimeObject_write(obj, "</div>", 6, PR_FALSE);  // .moz-txt-sig
+        status = MimeObject_write(obj, "</div>", 6, false);  // .moz-txt-sig
         if (status < 0) return status;
       }
-      status = MimeObject_write(obj, "</pre>", 6, PR_FALSE);
+      status = MimeObject_write(obj, "</pre>", 6, false);
       if (status < 0) return status;
       if (!quoting)
       {
-        status = MimeObject_write(obj, "</div>", 6, PR_FALSE);
+        status = MimeObject_write(obj, "</div>", 6, false);
                                         // .moz-text-plain
         if (status < 0) return status;
       }
 
       /* text/plain objects always have separators before and after them.
      Note that this is not the case for text/enriched objects.
      */
     status = MimeObject_write_separator(obj);
@@ -431,52 +431,52 @@ MimeInlineTextPlain_parse_line (const ch
 
 
     // recognize signature
     if ((lineSourceStr.Length() >= 4)
         && lineSourceStr.First() == '-'
         && Substring(lineSourceStr, 0, 3).EqualsLiteral("-- ")
         && (lineSourceStr[3] == '\r' || lineSourceStr[3] == '\n') )
     {
-      text->mIsSig = PR_TRUE;
+      text->mIsSig = true;
       if (!quoting)
         prefaceResultStr += "<div class=\"moz-txt-sig\">";
     }
 
 
     /* This is the main TXT to HTML conversion:
        escaping (very important), eventually recognizing etc. */
     nsString lineResultUnichar;
 
     rv = conv->ScanTXT(lineSourceStr.get() + logicalLineStart,
                        whattodo, getter_Copies(lineResultUnichar));
     NS_ENSURE_SUCCESS(rv, -1);
 
     if (!(text->mIsSig && quoting))
     {
-      status = MimeObject_write(obj, prefaceResultStr.get(), prefaceResultStr.Length(), PR_TRUE);
+      status = MimeObject_write(obj, prefaceResultStr.get(), prefaceResultStr.Length(), true);
       if (status < 0) return status;
       nsCAutoString outString;
       if (obj->options->format_out != nsMimeOutput::nsMimeMessageSaveAs ||
           !mailCharset || !*mailCharset)
         CopyUTF16toUTF8(lineResultUnichar, outString);
       else
       { // convert back to mailCharset before writing.
         rv = nsMsgI18NConvertFromUnicode(mailCharset,
                                          lineResultUnichar, outString);
         NS_ENSURE_SUCCESS(rv, -1);
       }
 
-      status = MimeObject_write(obj, outString.get(), outString.Length(), PR_TRUE);
+      status = MimeObject_write(obj, outString.get(), outString.Length(), true);
     }
     else
     {
       status = NS_OK;
     }
   }
   else
   {
-    status = MimeObject_write(obj, line, length, PR_TRUE);
+    status = MimeObject_write(obj, line, length, true);
   }
 
   return status;
 }
 
--- a/mailnews/mime/src/mimetric.cpp
+++ b/mailnews/mime/src/mimetric.cpp
@@ -116,17 +116,17 @@ MimeRichtextConvert (const char *line, P
 
   if (enriched_p)
   {
     for (this_start = line; this_start < line + length; this_start++)
     if (!IS_SPACE (*this_start)) break;
     if (this_start >= line + length) /* blank line */
     {
       PL_strncpyz (*obufferP, "<BR>", *obuffer_sizeP);
-      return MimeObject_write(obj, *obufferP, strlen(*obufferP), PR_TRUE);
+      return MimeObject_write(obj, *obufferP, strlen(*obufferP), true);
     }
   }
 
   PRUint32 outlen = (PRUint32) *obuffer_sizeP;
   out = *obufferP;
   *out = 0;
 
   data_end = line + length;
@@ -339,17 +339,17 @@ MimeRichtextConvert (const char *line, P
     }
 
     /* now go around again */
     last_end = this_end;
     this_start = last_end;
   }
   *out = 0;
 
-  return MimeObject_write(obj, *obufferP, out - *obufferP, PR_TRUE);
+  return MimeObject_write(obj, *obufferP, out - *obufferP, true);
 }
 
 
 static int
 MimeInlineTextRichtext_parse_line (const char *line, PRInt32 length, MimeObject *obj)
 {
   bool enriched_p = (((MimeInlineTextRichtextClass *) obj->clazz)
             ->enriched_p);
@@ -362,17 +362,17 @@ MimeInlineTextRichtext_parse_line (const
 
 
 static int
 MimeInlineTextRichtext_parse_begin (MimeObject *obj)
 {
   int status = ((MimeObjectClass*)&MIME_SUPERCLASS)->parse_begin(obj);
   char s[] = "";
   if (status < 0) return status;
-  return MimeObject_write(obj, s, 0, PR_TRUE); /* force out any separators... */
+  return MimeObject_write(obj, s, 0, true); /* force out any separators... */
 }
 
 
 static int
 MimeInlineTextRichtext_parse_eof (MimeObject *obj, bool abort_p)
 {
   int status;
   if (obj->closed_p) return 0;
--- a/mailnews/mime/src/mimeunty.cpp
+++ b/mailnews/mime/src/mimeunty.cpp
@@ -135,61 +135,61 @@ MimeUntypedText_parse_line (const char *
   if (!line || !*line) return -1;
 
   /* If we're supposed to write this object, but aren't supposed to convert
    it to HTML, simply pass it through unaltered. */
   if (obj->output_p &&
     obj->options &&
     !obj->options->write_html_p &&
     obj->options->output_fn)
-  return MimeObject_write(obj, line, length, PR_TRUE);
+  return MimeObject_write(obj, line, length, true);
 
 
   /* Open a new sub-part if this line demands it.
    */
   if (line[0] == 'b' &&
     MimeUntypedText_uu_begin_line_p(line, length, obj->options,
                     &type, &name))
   {
     /* Close the old part and open a new one. */
     status = MimeUntypedText_open_subpart (obj,
                        MimeUntypedTextSubpartTypeUUE,
                        type, ENCODING_UUENCODE,
                        name, NULL);
     PR_FREEIF(name);
     PR_FREEIF(type);
     if (status < 0) return status;
-    begin_line_p = PR_TRUE;
+    begin_line_p = true;
   }
 
   else if (line[0] == '=' &&
     MimeUntypedText_yenc_begin_line_p(line, length, obj->options,
                     &type, &name))
   {
     /* Close the old part and open a new one. */
     status = MimeUntypedText_open_subpart (obj,
                        MimeUntypedTextSubpartTypeYEnc,
                        type, ENCODING_YENCODE,
                        name, NULL);
     PR_FREEIF(name);
     PR_FREEIF(type);
     if (status < 0) return status;
-    begin_line_p = PR_TRUE;
+    begin_line_p = true;
   }
 
   else if (line[0] == '(' && line[1] == 'T' &&
        MimeUntypedText_binhex_begin_line_p(line, length, obj->options))
   {
     /* Close the old part and open a new one. */
     status = MimeUntypedText_open_subpart (obj,
                        MimeUntypedTextSubpartTypeBinhex,
                        APPLICATION_BINHEX, NULL,
                        NULL, NULL);
     if (status < 0) return status;
-    begin_line_p = PR_TRUE;
+    begin_line_p = true;
   }
 
   /* Open a text/plain sub-part if there is no sub-part open.
    */
   if (!uty->open_subpart)
   {
     // rhp: If we get here and we are being fed a line ending, we should
     // just eat it and continue and if we really get more data, we'll open
@@ -248,34 +248,34 @@ MimeUntypedText_parse_line (const char *
 static int
 MimeUntypedText_close_subpart (MimeObject *obj)
 {
   MimeUntypedText *uty = (MimeUntypedText *) obj;
   int status;
 
   if (uty->open_subpart)
   {
-    status = uty->open_subpart->clazz->parse_eof(uty->open_subpart, PR_FALSE);
+    status = uty->open_subpart->clazz->parse_eof(uty->open_subpart, false);
     uty->open_subpart = 0;
 
     PR_ASSERT(uty->open_hdrs);
     if (uty->open_hdrs)
     {
       MimeHeaders_free(uty->open_hdrs);
       uty->open_hdrs = 0;
     }
     uty->type = MimeUntypedTextSubpartTypeText;
     if (status < 0) return status;
 
     /* Never put out a separator between sub-parts of UntypedText.
      (This bypasses the rule that text/plain subparts always
      have separators before and after them.)
      */
     if (obj->options && obj->options->state)
-    obj->options->state->separator_suppressed_p = PR_TRUE;
+    obj->options->state->separator_suppressed_p = true;
   }
 
   PR_ASSERT(!uty->open_hdrs);
   return 0;
 }
 
 static int
 MimeUntypedText_open_subpart (MimeObject *obj,
@@ -366,22 +366,22 @@ MimeUntypedText_open_subpart (MimeObject
   if (status < 0) goto FAIL;
 
 
   /* Create a child... */
   {
   bool horrid_kludge = (obj->options && obj->options->state &&
                obj->options->state->first_part_written_p);
   if (horrid_kludge)
-    obj->options->state->first_part_written_p = PR_FALSE;
+    obj->options->state->first_part_written_p = false;
 
   uty->open_subpart = mime_create(type, uty->open_hdrs, obj->options);
 
   if (horrid_kludge)
-    obj->options->state->first_part_written_p = PR_TRUE;
+    obj->options->state->first_part_written_p = true;
 
   if (!uty->open_subpart)
     {
     status = MIME_OUT_OF_MEMORY;
     goto FAIL;
     }
   }
 
@@ -425,39 +425,39 @@ MimeUntypedText_uu_begin_line_p(const ch
 {
   const char *s;
   char *name = 0;
   char *type = 0;
 
   if (type_ret) *type_ret = 0;
   if (name_ret) *name_ret = 0;
 
-  if (strncmp (line, "begin ", 6)) return PR_FALSE;
+  if (strncmp (line, "begin ", 6)) return false;
   /* ...then three or four octal digits. */
   s = line + 6;
-  if (*s < '0' || *s > '7') return PR_FALSE;
+  if (*s < '0' || *s > '7') return false;
   s++;
-  if (*s < '0' || *s > '7') return PR_FALSE;
+  if (*s < '0' || *s > '7') return false;
   s++;
-  if (*s < '0' || *s > '7') return PR_FALSE;
+  if (*s < '0' || *s > '7') return false;
   s++;
   if (*s == ' ')
   s++;
   else
   {
-    if (*s < '0' || *s > '7') return PR_FALSE;
+    if (*s < '0' || *s > '7') return false;
     s++;
-    if (*s != ' ') return PR_FALSE;
+    if (*s != ' ') return false;
   }
 
   while (IS_SPACE(*s))
   s++;
 
   name = (char *) PR_MALLOC(((line+length)-s) + 1);
-  if (!name) return PR_FALSE; /* grr... */
+  if (!name) return false; /* grr... */
   memcpy(name, s, (line+length)-s);
   name[(line+length)-s] = 0;
 
   /* take off newline. */
   if (name[strlen(name)-1] == '\n') name[strlen(name)-1] = 0;
   if (name[strlen(name)-1] == '\r') name[strlen(name)-1] = 0;
 
   /* Now try and figure out a type.
@@ -472,17 +472,17 @@ MimeUntypedText_uu_begin_line_p(const ch
   else
   PR_FREEIF(name);
 
   if (type_ret)
   *type_ret = type;
   else
   PR_FREEIF(type);
 
-  return PR_TRUE;
+  return true;
 }
 
 static bool
 MimeUntypedText_uu_end_line_p(const char *line, PRInt32 length)
 {
 #if 0
   /* A strictly conforming uuencode end line. */
   return (line[0] == 'e' &&
@@ -522,38 +522,38 @@ MimeUntypedText_yenc_begin_line_p(const 
   char *name = 0;
   char *type = 0;
 
   if (type_ret) *type_ret = 0;
   if (name_ret) *name_ret = 0;
 
   /* we don't support yenc V2 neither multipart yencode,
      therefore the second parameter should always be "line="*/
-  if (length < 13 || strncmp (line, "=ybegin line=", 13)) return PR_FALSE;
+  if (length < 13 || strncmp (line, "=ybegin line=", 13)) return false;
 
   /* ...then couple digits. */
   for (s = line + 13; s < endofline; s ++)
     if (*s < '0' || *s > '9')
       break;
 
   /* ...next, look for <space>size= */
-  if ((endofline - s) < 6 || strncmp (s, " size=", 6)) return PR_FALSE;
+  if ((endofline - s) < 6 || strncmp (s, " size=", 6)) return false;
 
   /* ...then couple digits. */
   for (s += 6; s < endofline; s ++)
     if (*s < '0' || *s > '9')
       break;
 
    /* ...next, look for <space>name= */
-  if ((endofline - s) < 6 || strncmp (s, " name=", 6)) return PR_FALSE;
+  if ((endofline - s) < 6 || strncmp (s, " name=", 6)) return false;
 
   /* anything left is the file name */
   s += 6;
   name = (char *) PR_MALLOC((endofline-s) + 1);
-  if (!name) return PR_FALSE; /* grr... */
+  if (!name) return false; /* grr... */
   memcpy(name, s, endofline-s);
   name[endofline-s] = 0;
 
   /* take off newline. */
   if (name[strlen(name)-1] == '\n') name[strlen(name)-1] = 0;
   if (name[strlen(name)-1] == '\r') name[strlen(name)-1] = 0;
 
   /* Now try and figure out a type.
@@ -568,53 +568,53 @@ MimeUntypedText_yenc_begin_line_p(const 
   else
   PR_FREEIF(name);
 
   if (type_ret)
   *type_ret = type;
   else
   PR_FREEIF(type);
 
-  return PR_TRUE;
+  return true;
 }
 
 static bool
 MimeUntypedText_yenc_end_line_p(const char *line, PRInt32 length)
 {
-  if (length < 11 || strncmp (line, "=yend size=", 11)) return PR_FALSE;
+  if (length < 11 || strncmp (line, "=yend size=", 11)) return false;
 
-  return PR_TRUE;
+  return true;
 }
 
 
 #define BINHEX_MAGIC "(This file must be converted with BinHex 4.0)"
 #define BINHEX_MAGIC_LEN 45
 
 static bool
 MimeUntypedText_binhex_begin_line_p(const char *line, PRInt32 length,
                   MimeDisplayOptions *opt)
 {
   if (length <= BINHEX_MAGIC_LEN)
-  return PR_FALSE;
+  return false;
 
   while(length > 0 && IS_SPACE(line[length-1]))
   length--;
 
   if (length != BINHEX_MAGIC_LEN)
-  return PR_FALSE;
+  return false;
 
   if (!strncmp(line, BINHEX_MAGIC, BINHEX_MAGIC_LEN))
-  return PR_TRUE;
+  return true;
   else
-  return PR_FALSE;
+  return false;
 }
 
 static bool
 MimeUntypedText_binhex_end_line_p(const char *line, PRInt32 length)
 {
   if (length > 0 && line[length-1] == '\n') length--;
   if (length > 0 && line[length-1] == '\r') length--;
 
   if (length != 0 && length != 64)
-  return PR_TRUE;
+  return true;
   else
-  return PR_FALSE;
+  return false;
 }
--- a/mailnews/mime/src/modlmime.h
+++ b/mailnews/mime/src/modlmime.h
@@ -93,22 +93,22 @@ typedef struct MimeHeaders
 class MimeDisplayOptions;
 class MimeParseStateObject;
 typedef struct MSG_AttachmentData MSG_AttachmentData;
 
 /* Given the name of a header, returns the contents of that header as
    a newly-allocated string (which the caller must free.)  If the header
    is not present, or has no contents, NULL is returned.
 
-   If `strip_p' is PR_TRUE, then the data returned will be the first token
+   If `strip_p' is true, then the data returned will be the first token
    of the header; else it will be the full text of the header.  (This is
    useful for getting just "text/plain" from "text/plain; name=foo".)
 
-   If `all_p' is PR_FALSE, then the first header encountered is used, and
-   any subsequent headers of the same name are ignored.  If PR_TRUE, then
+   If `all_p' is false, then the first header encountered is used, and
+   any subsequent headers of the same name are ignored.  If true, then
    all headers of the same name are appended together (this is useful
    for gathering up all CC headers into one, for example.)
  */
 extern char *MimeHeaders_get(MimeHeaders *hdrs,
                const char *header_name,
                bool strip_p,
                bool all_p);
 
@@ -194,17 +194,17 @@ public:
                  Set by "?rot13=true" */
   char *part_to_load;    /* The particular part of the multipart which
                  we are extracting.  Set by "?part=3.2.4" */
 
   bool write_html_p;    /* Whether the output should be HTML, or raw. */
 
   bool decrypt_p;    /* Whether all traces of xlateion should be
                  eradicated -- this is only meaningful when
-                 write_html_p is PR_FALSE; we set this when
+                 write_html_p is false; we set this when
                  attaching a message for forwarding, since
                  forwarding someone else a message that wasn't
                  xlated for them doesn't work.  We have to
                  dexlate it before sending it.
                */
 
   PRUint32 whattodo ;       /* from the prefs, we'll get if the user wants to do glyph or structure substitutions and set this member variable. */
 
@@ -263,17 +263,17 @@ public:
      NULL-terminated.).
    */
   int (*charset_conversion_fn) (const char *input_line,
                 PRInt32 input_length, const char *input_charset,
                 const char *output_charset,
                 char **output_ret, PRInt32 *output_size_ret,
                 void *stream_closure, nsIUnicodeDecoder *decoder, nsIUnicodeEncoder *encoder);
 
-  /* If PR_TRUE, perform both charset-conversion and decoding of
+  /* If true, perform both charset-conversion and decoding of
    MIME-2 header fields (using RFC-1522 encoding.)
    */
   bool rfc1522_conversion_p;
 
   /* A hook for the caller to turn a file name into a content-type. */
   char *(*file_type_fn) (const char *filename, void *stream_closure);
 
   /* A hook by which the user may be prompted for a password by the security
--- a/mailnews/mime/src/modmimee.h
+++ b/mailnews/mime/src/modmimee.h
@@ -92,15 +92,15 @@ MimeEncoderData *MimeUUEncoderInit (cons
 
 /* Push data through the encoder/decoder, causing the above-provided write_fn
    to be called with encoded/decoded data. */
 int MimeDecoderWrite (MimeDecoderData *data, const char *buffer, PRInt32 size,
                   PRInt32 *outSize);
 int MimeEncoderWrite (MimeEncoderData *data, const char *buffer, PRInt32 size);
 
 /* When you're done encoding/decoding, call this to free the data.  If
-   abort_p is PR_FALSE, then calling this may cause the write_fn to be called
+   abort_p is false, then calling this may cause the write_fn to be called
    one last time (as the last buffered data is flushed out.)
  */
 int MimeDecoderDestroy(MimeDecoderData *data, bool abort_p);
 int MimeEncoderDestroy(MimeEncoderData *data, bool abort_p);
 
 #endif /* _MODMIMEE_H_ */
--- a/mailnews/mime/src/nsMimeHeaders.cpp
+++ b/mailnews/mime/src/nsMimeHeaders.cpp
@@ -66,17 +66,17 @@ nsresult nsMimeHeaders::Initialize(const
   return NS_ERROR_OUT_OF_MEMORY;
 }
 
 nsresult nsMimeHeaders::ExtractHeader(const char *headerName, bool getAllOfThem, char **_retval)
 {
   if (! mHeaders)
     return NS_ERROR_NOT_INITIALIZED;
 
-  *_retval = MimeHeaders_get(mHeaders, headerName, PR_FALSE, getAllOfThem);
+  *_retval = MimeHeaders_get(mHeaders, headerName, false, getAllOfThem);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMimeHeaders::GetAllHeaders(char **_retval)
 {
     if (!mHeaders)
         return NS_ERROR_NOT_INITIALIZED;
 
--- a/mailnews/mime/src/nsMsgHeaderParser.cpp
+++ b/mailnews/mime/src/nsMsgHeaderParser.cpp
@@ -101,38 +101,38 @@ nsresult FillResultsArray(const char * a
                           PRUnichar ** aOutgoingFullName, nsIMsgHeaderParser *aParser)
 {
   NS_ENSURE_ARG(aParser);
   nsresult rv = NS_OK;
 
   char * result = nsnull;
   if (aAddress)
   {
-    result = MIME_DecodeMimeHeader(aAddress, NULL, PR_FALSE, PR_TRUE);
+    result = MIME_DecodeMimeHeader(aAddress, NULL, false, true);
     *aOutgoingEmailAddress = ToNewUnicode(NS_ConvertUTF8toUTF16(result ? result : aAddress));
     PR_FREEIF(result);
   }
 
   if (aName)
   {
-    result = MIME_DecodeMimeHeader(aName, NULL, PR_FALSE, PR_TRUE);
+    result = MIME_DecodeMimeHeader(aName, NULL, false, true);
     *aOutgoingName = ToNewUnicode(NS_ConvertUTF8toUTF16(result ? result : aName));
     PR_FREEIF(result);
   }
 
   nsCString fullAddress;
   nsCString unquotedAddress;
   rv = aParser->MakeFullAddressString(aName, aAddress,
                                       getter_Copies(fullAddress));
   if (NS_SUCCEEDED(rv) && !fullAddress.IsEmpty())
   {
-    result = MIME_DecodeMimeHeader(fullAddress.get(), nsnull, PR_FALSE, PR_TRUE);
+    result = MIME_DecodeMimeHeader(fullAddress.get(), nsnull, false, true);
     if (result)
       fullAddress.Adopt(result);
-    aParser->UnquotePhraseOrAddr(fullAddress.get(), PR_TRUE, getter_Copies(unquotedAddress));
+    aParser->UnquotePhraseOrAddr(fullAddress.get(), true, getter_Copies(unquotedAddress));
     if (!unquotedAddress.IsEmpty())
       fullAddress = unquotedAddress;
     *aOutgoingFullName = ToNewUnicode(NS_ConvertUTF8toUTF16(fullAddress));
   }
   else
     *aOutgoingFullName = nsnull;
 
   return rv;
@@ -166,17 +166,17 @@ NS_IMETHODIMP nsMsgHeaderParser::ParseHe
 
     // iterate over the results and fill in our arrays....
     PRUint32 index = 0;
     const char * currentName = names;
     const char * currentAddress = addresses;
     char * unquotedName = nsnull;
     while (index < numAddresses)
     {
-      if (NS_SUCCEEDED(UnquotePhraseOrAddr(currentName, PR_TRUE, &unquotedName)))
+      if (NS_SUCCEEDED(UnquotePhraseOrAddr(currentName, true, &unquotedName)))
         rv = FillResultsArray(unquotedName, currentAddress, &outgoingEmailAddresses[index], &outgoingNames[index], &outgoingFullNames[index], this);
       else
         rv = FillResultsArray(currentName, currentAddress, &outgoingEmailAddresses[index], &outgoingNames[index], &outgoingFullNames[index], this);
 
       PR_FREEIF(unquotedName);
       currentName += strlen(currentName) + 1;
       currentAddress += strlen(currentAddress) + 1;
       index++;
@@ -313,17 +313,17 @@ nsresult nsMsgHeaderParser::ReformatUnqu
         {
           if ((PRInt32) strlen(reformated) < (endOutputPtr - writePtr))
           {
             strncpy(writePtr, reformated, endOutputPtr - writePtr);
             writePtr += strlen(reformated);
           }
           else
           {
-            badInput = PR_TRUE;
+            badInput = true;
           }
           PR_Free(reformated);
         }
         else
         {
           strncpy(writePtr, startRecipient, endOutputPtr - writePtr);
           writePtr += strlen(startRecipient);
         }
@@ -340,17 +340,17 @@ nsresult nsMsgHeaderParser::ReformatUnqu
 
   /* write off the last recipient */
   reformated = msg_reformat_Header_addresses(startRecipient);
   if (reformated)
   {
     if ((PRInt32) strlen(reformated) < (endOutputPtr - writePtr))
       strncpy(writePtr, reformated, endOutputPtr - writePtr);
     else
-      badInput = PR_TRUE;
+      badInput = true;
     PR_Free(reformated);
   }
   else
     strncpy(writePtr, startRecipient, endOutputPtr - writePtr);
 
   if (!badInput)
     *result = ToNewUnicode(NS_ConvertUTF8toUTF16(outputStr));
   PR_Free(outputStr);
@@ -575,22 +575,22 @@ static int msg_parse_Header_addresses (c
             NEXT_CHAR(s);
           }
           oparen = 0;
         }
       }
       else if (*line_end == ':' && !mailbox_start && paren_depth == 0)
       {
         // We're now in group format.
-        in_group = PR_TRUE;
+        in_group = true;
         COPY_CHAR(addr_out, line_end);
       }
       else if (*line_end == ';' && in_group && paren_depth == 0)
       {
-        in_group = PR_FALSE;
+        in_group = false;
         COPY_CHAR(addr_out, line_end);
         // We've got to the end of a group, therefore just continue with the loop
         // so that we avoid moving onto the next char at the end of this cycle of
         // the loop.
         continue;
       }
       else
       {
@@ -749,25 +749,25 @@ static int msg_parse_Header_addresses (c
     /* Now re-quote the names and addresses if necessary.
      */
 #ifdef BUG11892
     // **** jefft - we don't want and shouldn't to requtoe the name, this
     // violate the RFC822 spec
     if (quote_names_p && names)
     {
       int L = name_out - name_start - 1;
-      L = msg_quote_phrase_or_addr(name_start, L, PR_FALSE);
+      L = msg_quote_phrase_or_addr(name_start, L, false);
       name_out = name_start + L + 1;
     }
 #endif
 
     if (quote_addrs_p && addresses)
     {
       int L = addr_out - addr_start - 1;
-      L = msg_quote_phrase_or_addr(addr_start, L, PR_TRUE);
+      L = msg_quote_phrase_or_addr(addr_start, L, true);
       addr_out = addr_start + L + 1;
     }
 
     addr_count++;
 
     /* If we only want the first address, we can stop now.
      */
     if (first_only_p)
@@ -863,17 +863,17 @@ msg_quote_phrase_or_addr(char *address, 
         quotable_count++;
             atsign = in;
 
       /* If address is of the form '"userid"@somewhere.com' don't quote
        * the quotes around 'userid'.  Also reset the quotable count, since
        * any quotables we've seen are already inside quotes.
        */
       if (address[0] == '\"' && in > address + 2 && *(in - 1) == '\"' && *(in - 2) != '\\')
-        unquotable_count -= 2, quotable_count = 0, user_quote = PR_TRUE;
+        unquotable_count -= 2, quotable_count = 0, user_quote = true;
     }
 
         else if (*in == '\\')
         {
             if (in + 1 < address + length && (*(in + 1) == '\\' || *(in + 1) == '\"'))
                 /* If the next character is a backslash or quote, this backslash */
                 /* is an escape backslash; ignore it and the next character.     */
                 in++;
@@ -931,17 +931,17 @@ msg_quote_phrase_or_addr(char *address, 
 
     if (quotable_count == 0 && unquotable_count == 0)
         return full_length;
 
   /* We must quote the entire string if there are quotables outside the user
    * quote.
    */
   if (!atsign || (user_quote && quotable_count > 0))
-    quote_all = PR_TRUE, atsign = NULL;
+    quote_all = true, atsign = NULL;
 
     /* Add 2 to the length for the quotes, plus one for each character
      * which will need a backslash, plus one for a null terminator.
      */
     new_length = length + quotable_count + unquotable_count + 3;
 
     in = address;
     out = orig_out = (char *)PR_Malloc(new_length);
@@ -1077,22 +1077,22 @@ msg_unquote_phrase_or_addr(const char *l
 
   while (*lineptr)
   {
     /* If the character is an '\' then output the character that was
      * escaped.  If it was part of the quote then don't output it.
      */
     if (*lineptr == '\\')
     {
-      escaped = PR_TRUE;
+      escaped = true;
       lineptr++;
     }
     if (*lineptr == '\"' && !escaped)
       lineptr++;
-    escaped = PR_FALSE;
+    escaped = false;
 
     if (*lineptr)
     {
       COPY_CHAR(outptr, lineptr);
       NEXT_CHAR(lineptr);
     }
   }
   *outptr = '\0';
@@ -1247,18 +1247,18 @@ nsMsgHeaderParser::ExtractHeaderAddressN
   {
     aResult.Truncate();
     return NS_OK;
   }
 
   char *name = 0;
   char *addr = 0;
   int status = msg_parse_Header_addresses(PromiseFlatCString(aLine).get(),
-                                          &name, &addr, PR_FALSE, PR_FALSE,
-                                          PR_TRUE);
+                                          &name, &addr, false, false,
+                                          true);
   if (status <= 0)
     return NS_ERROR_FAILURE;
 
   /* This can happen if there is an address like "From: foo bar" which
    * we parse as two addresses (that's a syntax error.)  In that case,
    * we'll return just the first one (the rest is after the NULL.)
    *
    * NS_ASSERTION(status == 1);
@@ -1319,18 +1319,18 @@ msg_format_Header_addresses (const char 
   s2 = addrs;
 
   for (i = 0; (int)i < count; i++)
   {
     char *o;
 
     PL_strncpy(aName, s1, name_maxlen);
     PL_strncpy(anAddr, s2, addr_maxlen);
-    len1 = msg_quote_phrase_or_addr(aName, strlen(s1), PR_FALSE);
-    len2 = msg_quote_phrase_or_addr(anAddr, strlen(s2), PR_TRUE);
+    len1 = msg_quote_phrase_or_addr(aName, strlen(s1), false);
+    len2 = msg_quote_phrase_or_addr(anAddr, strlen(s2), true);
 
     if (   wrap_lines_p && i > 0
         && (column + len1 + len2 + 3 + (((int)(i+1) < count) ? 2 : 0) > 76))
     {
       if (out > result && out[-1] == ' ')
         out--;
       *out++ = '\r';
       *out++ = '\n';
@@ -1380,17 +1380,17 @@ static char *
 msg_reformat_Header_addresses(const char *line)
 {
   char *names = 0;
   char *addrs = 0;
   char *result;
   int status = msg_parse_Header_addresses(line, &names, &addrs);
   if (status <= 0)
     return 0;
-  result = msg_format_Header_addresses(names, addrs, status, PR_TRUE);
+  result = msg_format_Header_addresses(names, addrs, status, true);
   PR_Free (names);
   PR_Free (addrs);
   return result;
 }
 
 /* msg_remove_duplicate_addresses
  *
  * Returns a copy of ADDRS which may have had some addresses removed.
@@ -1469,25 +1469,25 @@ msg_remove_duplicate_addresses(const nsA
    * If those addrs are not present in "3" or "2", add them to "3".
    */
   for (i = 0; i < count1; i++)
   {
     bool found = false;
     for (j = 0; j < count2; j++)
       if (!PL_strcasecmp (a_array1[i], a_array2[j]))
       {
-        found = PR_TRUE;
+        found = true;
         break;
       }
 
     if (!found)
       for (j = 0; j < count3; j++)
         if (!PL_strcasecmp(a_array1[i], a_array3[j]))
         {
-          found = PR_TRUE;
+          found = true;
           break;
         }
 
     if (!found)
     {
       n_array3[count3] = n_array1[i];
       a_array3[count3] = a_array1[i];
       size3 += (strlen(n_array3[count3]) + strlen(a_array3[count3]) + 10);
@@ -1517,17 +1517,17 @@ msg_remove_duplicate_addresses(const nsA
   for (i = 0; i < count3; i++)
   {
     PL_strncpyz(out, n_array3[i], outlen);
     addedlen = strlen(out);
     outlen -= addedlen;
     out += addedlen;
     *out++ = 0;
   }
-  result = msg_format_Header_addresses(s1, s2, count3, PR_FALSE);
+  result = msg_format_Header_addresses(s1, s2, count3, false);
 
  FAIL:
   FREEIF(a_array1);
   FREEIF(a_array2);
   FREEIF(a_array3);
   FREEIF(n_array1);
   FREEIF(n_array3);
   FREEIF(names1);
@@ -1558,33 +1558,33 @@ msg_make_full_address(const char* name, 
 
   buflen = (nl * 2) + (al * 2) + 25;
   buf = (char *)PR_Malloc(buflen);
   if (!buf)
     return 0;
   if (nl > 0)
   {
     PL_strncpyz(buf, name, buflen);
-    L = msg_quote_phrase_or_addr(buf, nl, PR_FALSE);
+    L = msg_quote_phrase_or_addr(buf, nl, false);
     s = buf + L;
     slen = buflen - L;
     if ( slen > 2 ) {
         *s++ = ' ';
         *s++ = '<';
         slen -= 2; // for ' ' and '<'
     }
   }
   else
   {
     s = buf;
     slen = buflen;
   }
 
   PL_strncpyz(s, addr, slen);
-  L = msg_quote_phrase_or_addr(s, al, PR_TRUE);
+  L = msg_quote_phrase_or_addr(s, al, true);
   s += L;
   if (nl > 0)
     *s++ = '>';
   *s = 0;
   L = (s - buf) + 1;
   buf = (char *)PR_Realloc (buf, L);
   return buf;
 }
--- a/mailnews/mime/src/nsSimpleMimeConverterStub.cpp
+++ b/mailnews/mime/src/nsSimpleMimeConverterStub.cpp
@@ -90,17 +90,17 @@ GatherLine(const char *line, PRInt32 len
 
     if (!obj->output_p ||
         !obj->options ||
         !obj->options->output_fn) {
         return 0;
     }
     
     if (!obj->options->write_html_p)
-        return MimeObject_write(obj, line, length, PR_TRUE);
+        return MimeObject_write(obj, line, length, true);
 
     ssobj->buffer->Append(line);
     return 0;
 }
 
 static int
 EndGather(MimeObject *obj, bool abort_p)
 {
@@ -130,17 +130,17 @@ EndGather(MimeObject *obj, bool abort_p)
                                                         asHTML);
     if (NS_FAILED(rv)) {
         NS_ASSERTION(NS_SUCCEEDED(rv), "converter failure");
         return -1;
     }
 
     // MimeObject_write wants a non-const string for some reason, but it doesn't mutate it
     status = MimeObject_write(obj, asHTML.get(),
-                              asHTML.Length(), PR_TRUE);
+                              asHTML.Length(), true);
     if (status < 0)
         return status;
     return 0;
 }
 
 static int
 Initialize(MimeObject *obj)
 {
@@ -213,17 +213,17 @@ nsSimpleMimeConverterStub::CreateContent
                                                      contentTypeHandlerInitStruct *initStruct,
                                                          MimeObjectClass **objClass)
 {
     *objClass = (MimeObjectClass *)&mimeSimpleStubClass;
     (*objClass)->superclass = (MimeObjectClass *)XPCOM_GetmimeInlineTextClass();
     if (!(*objClass)->superclass)
         return NS_ERROR_UNEXPECTED;;
 
-    initStruct->force_inline_display = PR_TRUE;
+    initStruct->force_inline_display = true;
     return NS_OK;;
 }
 
 nsresult
 MIME_NewSimpleMimeConverterStub(const char *aContentType,
                                 nsIMimeContentTypeHandler **aResult)
 {
     nsRefPtr<nsSimpleMimeConverterStub> inst = new nsSimpleMimeConverterStub(aContentType);
--- a/mailnews/mime/src/nsStreamConverter.cpp
+++ b/mailnews/mime/src/nsStreamConverter.cpp
@@ -172,34 +172,34 @@ bridge_new_new_uri(void *bridgeStream, n
         nsCOMPtr<nsIMsgI18NUrl> i18nUrl (do_QueryInterface(aURI));
         if (i18nUrl)
         {
           nsCString charset;
 
           // check to see if we have a charset override...and if we do, set that field appropriately too...
           nsresult rv = i18nUrl->GetCharsetOverRide(getter_Copies(charset));
           if (NS_SUCCEEDED(rv) && !charset.IsEmpty() ) {
-            *override_charset = PR_TRUE;
+            *override_charset = true;
             *default_charset = ToNewCString(charset);
           }
           else
           {
             i18nUrl->GetFolderCharset(getter_Copies(charset));
             if (!charset.IsEmpty())
               *default_charset = ToNewCString(charset);
           }
 
           // if there is no manual override and a folder charset exists
           // then check if we have a folder level override
           if (!(*override_charset) && *default_charset && **default_charset)
           {
             bool folderCharsetOverride;
             rv = i18nUrl->GetFolderCharsetOverride(&folderCharsetOverride);
             if (NS_SUCCEEDED(rv) && folderCharsetOverride)
-              *override_charset = PR_TRUE;
+              *override_charset = true;
 
             // notify the default to msgWindow (for the menu check mark)
             // do not set the default in case of nsMimeMessageDraftOrTemplate
             // or nsMimeMessageEditorTemplate because it is already set
             // when the message is displayed and doing it again may overwrite
             // the correct MIME charset parsed from the message header
             if (aOutputType != nsMimeOutput::nsMimeMessageDraftOrTemplate &&
                 aOutputType != nsMimeOutput::nsMimeMessageEditorTemplate)
@@ -221,17 +221,17 @@ bridge_new_new_uri(void *bridgeStream, n
             if (!*override_charset) {
               nsCOMPtr<nsIPrefBranch> pPrefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
               if (pPrefBranch)
               {
                 bool    force_override;
                 rv = pPrefBranch->GetBoolPref("mailnews.force_charset_override", &force_override);
                 if (NS_SUCCEEDED(rv) && force_override)
                 {
-                  *override_charset = PR_TRUE;
+                  *override_charset = true;
                 }
               }
             }
           }
         }
         nsCAutoString urlString;
         if (NS_SUCCEEDED(aURI->GetSpec(urlString)))
         {
@@ -280,40 +280,40 @@ bridge_set_mime_stream_converter_listene
     if  ( (aOutputType == nsMimeOutput::nsMimeMessageDraftOrTemplate) ||
           (aOutputType == nsMimeOutput::nsMimeMessageEditorTemplate) )
     {
       mime_draft_data *mdd = (mime_draft_data *)session->data_object;
       if (mdd->options)
       {
         if (listener)
         {
-          mdd->options->caller_need_root_headers = PR_TRUE;
+          mdd->options->caller_need_root_headers = true;
           mdd->options->decompose_headers_info_fn = mime_headers_callback;
         }
         else
         {
-          mdd->options->caller_need_root_headers = PR_FALSE;
+          mdd->options->caller_need_root_headers = false;
           mdd->options->decompose_headers_info_fn = nsnull;
         }
       }
     }
     else
     {
       mime_stream_data *msd = (mime_stream_data *)session->data_object;
 
       if (msd->options)
       {
         if (listener)
         {
-          msd->options->caller_need_root_headers = PR_TRUE;
+          msd->options->caller_need_root_headers = true;
           msd->options->decompose_headers_info_fn = mime_headers_callback;
         }
         else
         {
-          msd->options->caller_need_root_headers = PR_FALSE;
+          msd->options->caller_need_root_headers = false;
           msd->options->decompose_headers_info_fn = nsnull;
         }
       }
     }
   }
 
   return NS_OK;
 }
@@ -377,17 +377,17 @@ nsStreamConverter::DetermineOutputFormat
   const char *format = FindQueryElementData(queryPart, "outformat=");
   if (format)
   {
     //NOTE: I've done a file contents search of every file (*.*) in the mozilla
     // directory tree and there is not a single location where the string "outformat"
     // is added to any URL. It appears that this code has been orphaned off by a change
     // elsewhere and is no longer required. It will be removed in the future unless
     // someone complains.
-    NS_ABORT_IF_FALSE(PR_FALSE, "Is this code actually being used?");
+    NS_ABORT_IF_FALSE(false, "Is this code actually being used?");
 
     while (*format == ' ')
       ++format;
 
     if (*format)
     {
       mOverrideFormat = "raw";
 
@@ -512,23 +512,23 @@ nsStreamConverter::InternalCleanup(void)
 }
 
 /*
  * Inherited methods for nsMimeConverter
  */
 nsStreamConverter::nsStreamConverter()
 {
   // Init member variables...
-  mWrapperOutput = PR_FALSE;
+  mWrapperOutput = false;
   mBridgeStream = nsnull;
   mOutputFormat = "text/html";
-  mAlreadyKnowOutputType = PR_FALSE;
-  mForwardInline = PR_FALSE;
-  mForwardInlineFilter = PR_FALSE;
-  mOverrideComposeFormat = PR_FALSE;
+  mAlreadyKnowOutputType = false;
+  mForwardInline = false;
+  mForwardInlineFilter = false;
+  mOverrideComposeFormat = false;
 
   mPendingRequest = nsnull;
   mPendingContext = nsnull;
 }
 
 nsStreamConverter::~nsStreamConverter()
 {
   InternalCleanup();
@@ -558,24 +558,24 @@ NS_IMETHODIMP nsStreamConverter::Init(ns
 
   // mscott --> we need to look at the url and figure out what the correct output type is...
   nsMimeOutputType newType = mOutputType;
   if (!mAlreadyKnowOutputType)
   {
     nsCAutoString urlSpec;
     rv = aURI->GetSpec(urlSpec);
     DetermineOutputFormat(urlSpec.get(), &newType);
-    mAlreadyKnowOutputType = PR_TRUE;
+    mAlreadyKnowOutputType = true;
     mOutputType = newType;
   }
 
   switch (newType)
   {
     case nsMimeOutput::nsMimeMessageSplitDisplay:    // the wrapper HTML output to produce the split header/body display
-      mWrapperOutput = PR_TRUE;
+      mWrapperOutput = true;
       mOutputFormat = "text/html";
       break;
     case nsMimeOutput::nsMimeMessageHeaderDisplay:   // the split header/body display
       mOutputFormat = "text/xml";
       break;
     case nsMimeOutput::nsMimeMessageBodyDisplay:   // the split header/body display
       mOutputFormat = "text/html";
       break;
@@ -658,17 +658,17 @@ NS_IMETHODIMP nsStreamConverter::Init(ns
     if ((NS_FAILED(rv)) || (!mEmitter))
     {
       return NS_ERROR_OUT_OF_MEMORY;
     }
   }
 
   // now we want to create a pipe which we'll use for converting the data...
   nsCOMPtr<nsIPipe> pipe = do_CreateInstance("@mozilla.org/pipe;1");
-  rv = pipe->Init(PR_TRUE, PR_TRUE, 4096, 8, nsnull);
+  rv = pipe->Init(true, true, 4096, 8, nsnull);
   
   // initialize our emitter
   if (NS_SUCCEEDED(rv) && mEmitter)
   {
     pipe->GetInputStream(getter_AddRefs(mInputStream));
     pipe->GetOutputStream(getter_AddRefs(mOutputStream));
 
     mEmitter->Initialize(aURI, aChannel, newType);
@@ -734,17 +734,17 @@ NS_IMETHODIMP nsStreamConverter::GetCont
 
 //
 // This is the type of output operation that is being requested by libmime. The types
 // of output are specified by nsIMimeOutputType enum
 //
 nsresult
 nsStreamConverter::SetMimeOutputType(nsMimeOutputType aType)
 {
-  mAlreadyKnowOutputType = PR_TRUE;
+  mAlreadyKnowOutputType = true;
   mOutputType = aType;
   if (mBridgeStream)
     bridge_set_output_type(mBridgeStream, aType);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsStreamConverter::GetMimeOutputType(nsMimeOutputType *aOutFormat)
 {
@@ -1111,17 +1111,17 @@ nsStreamConverter::OnStopRequest(nsIRequ
   printf("Time Spent in mime:    %d ms\n", PR_IntervalToMilliseconds(PR_IntervalNow() - mConvertContentTime));
 #endif
 
   // forward on top request to any listeners
   if (mOutListener)
     mOutListener->OnStopRequest(request, ctxt, status);
 
 
-  mAlreadyKnowOutputType = PR_FALSE;
+  mAlreadyKnowOutputType = false;
 
   // since we are done converting data, lets close all the objects we own...
   // this helps us fix some circular ref counting problems we are running into...
   Close();
 
   // Time to return...
   return NS_OK;
 }
--- a/mailnews/mime/test/TestMimeCrash.cpp
+++ b/mailnews/mime/test/TestMimeCrash.cpp
@@ -31,17 +31,17 @@ do_test(const char *aBuffer, const PRUin
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = converter->QPEncoderInit(mime_encoder_output_fn, nsnull, &encodeData);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = converter->EncoderWrite(encodeData, aBuffer, aSize, &written);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = converter->EncoderDestroy(encodeData, PR_FALSE);
+  rv = converter->EncoderDestroy(encodeData, false);
   return rv;
 }
 
 int main(int argc, char **argv)
 {
   ScopedXPCOM xpcom("TestMimeCrash");
   if (xpcom.failed())
     return 1;
--- a/mailnews/news/src/nsNNTPArticleList.cpp
+++ b/mailnews/news/src/nsNNTPArticleList.cpp
@@ -48,17 +48,17 @@ NS_IMPL_ISUPPORTS1(nsNNTPArticleList, ns
 nsNNTPArticleList::nsNNTPArticleList()
 {
 }
 
 nsNNTPArticleList::~nsNNTPArticleList()
 {
   if (m_newsDB) {
     m_newsDB->Commit(nsMsgDBCommitType::kSessionCommit);
-    m_newsDB->Close(PR_TRUE);
+    m_newsDB->Close(true);
     m_newsDB = nsnull;
   }
 
   m_newsFolder = nsnull;
 }
 
 NS_IMETHODIMP
 nsNNTPArticleList::Initialize(nsIMsgNewsFolder *newsFolder)
--- a/mailnews/news/src/nsNNTPNewsgroupList.cpp
+++ b/mailnews/news/src/nsNNTPNewsgroupList.cpp
@@ -96,20 +96,20 @@
 #include "nsComponentManagerUtils.h"
 #include "nsServiceManagerUtils.h"
 
 // update status on header download once per second
 #define MIN_STATUS_UPDATE_INTERVAL PRTime(PR_USEC_PER_SEC)
 
 
 nsNNTPNewsgroupList::nsNNTPNewsgroupList()
-  : m_finishingXover(PR_FALSE),
-  m_getOldMessages(PR_FALSE),
-  m_promptedAlready(PR_FALSE),
-  m_downloadAll(PR_FALSE),
+  : m_finishingXover(false),
+  m_getOldMessages(false),
+  m_promptedAlready(false),
+  m_downloadAll(false),
   m_maxArticles(0),
   m_lastPercent(-1),
   m_lastProcessedNumber(0),
   m_firstMsgNumber(0),
   m_lastMsgNumber(0),
   m_firstMsgToDownload(0),
   m_lastMsgToDownload(0),
   m_set(nsnull)
@@ -197,17 +197,17 @@ nsNNTPNewsgroupList::CleanUp()
         {
           while (firstUnreadStart <= firstUnreadEnd)
           {
             bool containsKey;
             m_newsDB->ContainsKey(firstUnreadStart, &containsKey);
             if (!containsKey)
             {
               m_set->Add(firstUnreadStart);
-              foundMissingArticle = PR_TRUE;
+              foundMissingArticle = true;
             }
             firstUnreadStart++;
           }
           firstKnown = firstUnreadStart;
         }
         else
           break;
 
@@ -219,17 +219,17 @@ nsNNTPNewsgroupList::CleanUp()
       {
         nsresult rv;
         nsCOMPtr<nsINewsDatabase> db(do_QueryInterface(m_newsDB, &rv));
         NS_ENSURE_SUCCESS(rv,rv);
         db->SetReadSet(m_set);
       }
     }
     m_newsDB->Commit(nsMsgDBCommitType::kSessionCommit);
-    m_newsDB->Close(PR_TRUE);
+    m_newsDB->Close(true);
     m_newsDB = nsnull;
   }
 
   if (m_knownArts.set)
   {
     delete m_knownArts.set;
     m_knownArts.set = nsnull;
   }
@@ -372,34 +372,34 @@ nsNNTPNewsgroupList::GetRangeOfArtsToDow
   Otherwise, we get the newest articles we haven't gotten, if we're getting more.
   My thought for now is that opening a newsgroup should only try to get new articles.
   Selecting "More Messages" will first try to get unseen messages, then old messages. */
 
   if (m_getOldMessages || !m_knownArts.set->IsMember(last_possible))
   {
     bool notifyMaxExceededOn = true;
     rv = nntpServer->GetNotifyOn(&notifyMaxExceededOn);
-    if (NS_FAILED(rv)) notifyMaxExceededOn = PR_TRUE;
+    if (NS_FAILED(rv)) notifyMaxExceededOn = true;
 
     // if the preference to notify when downloading more than x headers is not on,
     // and we're downloading new headers, set maxextra to a very large number.
     if (!m_getOldMessages && !notifyMaxExceededOn)
       maxextra = 0x7FFFFFFFL;
         int result =
             m_knownArts.set->LastMissingRange(first_possible, last_possible,
                                               first, last);
     if (result < 0) {
             *status=result;
       return NS_ERROR_NOT_INITIALIZED;
         }
     if (*first > 0 && *last - *first >= maxextra)
     {
       if (!m_getOldMessages && !m_promptedAlready && notifyMaxExceededOn)
       {
-        m_downloadAll = PR_FALSE;
+        m_downloadAll = false;
         nsCOMPtr<nsINewsDownloadDialogArgs> args = do_CreateInstance("@mozilla.org/messenger/newsdownloaddialogargs;1", &rv);
         if (NS_FAILED(rv)) return rv;
         NS_ENSURE_SUCCESS(rv,rv);
 
         rv = args->SetArticleCount(*last - *first + 1);
         NS_ENSURE_SUCCESS(rv,rv);
 
         nsString groupName;
@@ -446,26 +446,26 @@ nsNNTPNewsgroupList::GetRangeOfArtsToDow
          NS_ENSURE_SUCCESS(rv,rv);
 
           maxextra = m_maxArticles;
           if (!m_downloadAll)
           {
             bool markOldRead = false;
 
             rv = nntpServer->GetMarkOldRead(&markOldRead);
-            if (NS_FAILED(rv)) markOldRead = PR_FALSE;
+            if (NS_FAILED(rv)) markOldRead = false;
 
             if (markOldRead && m_set)
               m_set->AddRange(*first, *last - maxextra);
             *first = *last - maxextra + 1;
           }
         }
         else
           *first = *last = 0;
-        m_promptedAlready = PR_TRUE;
+        m_promptedAlready = true;
       }
       else if (m_promptedAlready && !m_downloadAll)
         *first = *last - m_maxArticles + 1;
       else if (!m_downloadAll)
         *first = *last - maxextra + 1;
     }
   }
 
@@ -588,17 +588,17 @@ nsNNTPNewsgroupList::ParseLine(char *lin
     if (NS_FAILED(rv))
       return rv;
   }
 
   GET_TOKEN ();
   if (line) {
     dateStr = line;
     PRTime date;
-    PRStatus status = PR_ParseTimeString (line, PR_FALSE, &date);
+    PRStatus status = PR_ParseTimeString (line, false, &date);
     if (PR_SUCCESS == status) {
       rv = newMsgHdr->SetDate(date); /* date */
       if (NS_FAILED(rv))
         return rv;
     }
   }
 
   GET_TOKEN (); /* message id */
@@ -649,17 +649,17 @@ nsNNTPNewsgroupList::ParseLine(char *lin
 NS_IMETHODIMP nsNNTPNewsgroupList::ApplyFilterHit(nsIMsgFilter *aFilter, nsIMsgWindow *aMsgWindow, bool *aApplyMore)
 {
   NS_ENSURE_ARG_POINTER(aFilter);
   NS_ENSURE_ARG_POINTER(aApplyMore);
   NS_ENSURE_TRUE(m_newMsgHdr, NS_ERROR_UNEXPECTED);
   NS_ENSURE_TRUE(m_newsDB, NS_ERROR_UNEXPECTED);
 
   // you can't move news messages, so applyMore is always true
-  *aApplyMore = PR_TRUE;
+  *aApplyMore = true;
 
   nsCOMPtr<nsISupportsArray> filterActionList;
   nsresult rv = NS_NewISupportsArray(getter_AddRefs(filterActionList));
   NS_ENSURE_SUCCESS(rv, rv);
   rv = aFilter->GetSortedActionList(filterActionList);
   NS_ENSURE_SUCCESS(rv, rv);
 
   PRUint32 numActions;
@@ -680,17 +680,17 @@ NS_IMETHODIMP nsNNTPNewsgroupList::Apply
       continue;
 
     nsMsgRuleActionType actionType;
     if (NS_SUCCEEDED(filterAction->GetType(&actionType)))
     {
       switch (actionType)
       {
       case nsMsgFilterAction::Delete:
-        m_addHdrToDB = PR_FALSE;
+        m_addHdrToDB = false;
         break;
       case nsMsgFilterAction::MarkRead:
         m_newsDB->MarkHdrRead(m_newMsgHdr, true, nsnull);
         break;
       case nsMsgFilterAction::MarkUnread:
         m_newsDB->MarkHdrRead(m_newMsgHdr, false, nsnull);
         break;
       case nsMsgFilterAction::KillThread:
@@ -704,31 +704,31 @@ NS_IMETHODIMP nsNNTPNewsgroupList::Apply
         break;
       case nsMsgFilterAction::WatchThread:
         {
           PRUint32 newFlags;
           m_newMsgHdr->OrFlags(nsMsgMessageFlags::Watched, &newFlags);
         }
         break;
       case nsMsgFilterAction::MarkFlagged:
-        m_newMsgHdr->MarkFlagged(PR_TRUE);
+        m_newMsgHdr->MarkFlagged(true);
         break;
       case nsMsgFilterAction::ChangePriority:
         {
           nsMsgPriorityValue filterPriority;
           filterAction->GetPriority(&filterPriority);
           m_newMsgHdr->SetPriority(filterPriority);
         }
         break;
       case nsMsgFilterAction::AddTag:
       {
         nsCString keyword;
         filterAction->GetStrValue(keyword);
         nsCOMPtr<nsIMutableArray> messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID));
-        messageArray->AppendElement(m_newMsgHdr, PR_FALSE);
+        messageArray->AppendElement(m_newMsgHdr, false);
         nsCOMPtr <nsIMsgFolder> folder = do_QueryInterface(m_newsFolder, &rv);
         if (folder)
           folder->AddKeywordsToMessages(messageArray, keyword);
         break;
       }
       case nsMsgFilterAction::Label:
         {
           nsMsgLabelValue filterLabel;
@@ -737,33 +737,33 @@ NS_IMETHODIMP nsNNTPNewsgroupList::Apply
           m_newMsgHdr->GetMessageKey(&msgKey);
           m_newsDB->SetLabel(msgKey, filterLabel);
         }
         break;
 
       case nsMsgFilterAction::StopExecution:
       {
         // don't apply any more filters
-        *aApplyMore = PR_FALSE;
+        *aApplyMore = false;
       }
       break;
 
       case nsMsgFilterAction::Custom:
       {
         nsCOMPtr<nsIMsgFilterCustomAction> customAction;
         rv = filterAction->GetCustomAction(getter_AddRefs(customAction));
         NS_ENSURE_SUCCESS(rv, rv);
 
         nsCAutoString value;
         filterAction->GetStrValue(value);
 
         nsCOMPtr<nsIMutableArray> messageArray(
             do_CreateInstance(NS_ARRAY_CONTRACTID, &rv));
         NS_ENSURE_TRUE(messageArray, rv);
-        messageArray->AppendElement(m_newMsgHdr, PR_FALSE);
+        messageArray->AppendElement(m_newMsgHdr, false);
 
         customAction->Apply(messageArray, value, nsnull,
                             nsMsgFilterType::NewsRule, aMsgWindow);
       }
       break;
 
       default:
         NS_ERROR("unexpected action");
@@ -844,17 +844,17 @@ nsNNTPNewsgroupList::ProcessXOVERLINE(co
     PRInt32 totalToDownload = m_lastMsgToDownload - m_firstMsgToDownload + 1;
     PRInt32 lastIndex = m_lastProcessedNumber - m_firstMsgNumber + 1;
     PRInt32 numDownloaded = lastIndex;
     PRInt32 totIndex = m_lastMsgNumber - m_firstMsgNumber + 1;
 
     PRTime elapsedTime = PR_Now() - m_lastStatusUpdate;
 
     if (elapsedTime > MIN_STATUS_UPDATE_INTERVAL || lastIndex == totIndex)
-      UpdateStatus(PR_FALSE, numDownloaded, totalToDownload);
+      UpdateStatus(false, numDownloaded, totalToDownload);
   }
   return NS_OK;
 }
 
 nsresult
 nsNNTPNewsgroupList::ResetXOVER()
 {
   m_lastMsgNumber = m_firstMsgNumber;
@@ -892,17 +892,17 @@ nsNNTPNewsgroupList::FinishXOVERLINE(int
   }
 
   if (!m_finishingXover)
   {
     // turn on m_finishingXover - this is a horrible hack to avoid recursive
     // calls which happen when the fe selects a message as a result of getting EndingUpdate,
     // which interrupts this url right before it was going to finish and causes FinishXOver
     // to get called again.
-    m_finishingXover = PR_TRUE;
+    m_finishingXover = true;
 
     // XXX is this correct?
     m_runningURL = nsnull;
 
     if (m_lastMsgNumber > 0) {
       nsAutoString firstStr;
       firstStr.AppendInt(m_lastProcessedNumber - m_firstMsgNumber + 1);
 
@@ -976,17 +976,17 @@ nsNNTPNewsgroupList::ProcessXHDRLine(con
   NS_ENSURE_SUCCESS(rv, rv);
 
   PRInt32 totalToDownload = m_lastMsgToDownload - m_firstMsgToDownload + 1;
   PRInt32 numDownloaded = number - m_firstMsgNumber + 1;
 
   PRTime elapsedTime = PR_Now() - m_lastStatusUpdate;
 
   if (elapsedTime > MIN_STATUS_UPDATE_INTERVAL)
-    UpdateStatus(PR_TRUE, numDownloaded, totalToDownload);
+    UpdateStatus(true, numDownloaded, totalToDownload);
   return rv;
 }
 
 NS_IMETHODIMP
 nsNNTPNewsgroupList::InitHEAD(PRInt32 number)
 {
   if (m_newMsgHdr)
   {
@@ -997,17 +997,17 @@ nsNNTPNewsgroupList::InitHEAD(PRInt32 nu
     PRInt32 totalToDownload = m_lastMsgToDownload - m_firstMsgToDownload + 1;
     PRInt32 lastIndex = m_lastProcessedNumber - m_firstMsgNumber + 1;
     PRInt32 numDownloaded = lastIndex;
     PRInt32 totIndex = m_lastMsgNumber - m_firstMsgNumber + 1;
 
     PRTime elapsedTime = PR_Now() - m_lastStatusUpdate;
 
     if (elapsedTime > MIN_STATUS_UPDATE_INTERVAL || lastIndex == totIndex)
-      UpdateStatus(PR_FALSE, numDownloaded, totalToDownload);
+      UpdateStatus(false, numDownloaded, totalToDownload);
   }
 
   if (number >= 0)
   {
     if (m_newHeaders.Count() > 0 && m_lastMsgNumber == m_lastProcessedNumber)
     {
       // We have done some processing of messages. This means that we have
       // relics of headers from XOVER. Since we will get everything from HEAD
@@ -1074,17 +1074,17 @@ nsNNTPNewsgroupList::AddHeader(const cha
   // The From, Date, and Subject headers have special requirements.
   if (PL_strcmp(header, "from") == 0)
   {
     rv = m_newMsgHdr->SetAuthor(value);
   }
   else if (PL_strcmp(header, "date") == 0)
   {
     PRTime date;
-    PRStatus status = PR_ParseTimeString (value, PR_FALSE, &date);
+    PRStatus status = PR_ParseTimeString (value, false, &date);
     if (PR_SUCCESS == status)
       rv = m_newMsgHdr->SetDate(date);
   }
   else if (PL_strcmp(header, "subject") == 0)
   {
     const char *subject = value;
     PRUint32 subjectLen = strlen(value);
 
@@ -1153,29 +1153,29 @@ nsNNTPNewsgroupList::CallFilters()
   // Notify MsgFolderListeners of message adds
   nsCOMPtr<nsIMsgFolderNotificationService> notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
 
   for (PRUint32 i = 0; i < count; i++)
   {
     m_newMsgHdr = m_newHeaders[i];
     if (!filterCount && !serverFilterCount)
     {
-      m_newsDB->AddNewHdrToDB(m_newMsgHdr, PR_TRUE);
+      m_newsDB->AddNewHdrToDB(m_newMsgHdr, true);
 
       if (notifier)
         notifier->NotifyMsgAdded(m_newMsgHdr);
       // mark the header as not yet reported classified
       nsMsgKey msgKey;
       m_newMsgHdr->GetMessageKey(&msgKey);
       folder->OrProcessingFlags(msgKey,
                                 nsMsgProcessingFlags::NotReportedClassified);
 
       continue;
     }
-    m_addHdrToDB = PR_TRUE;
+    m_addHdrToDB = true;
 
     // build up a "headers" for filter code
     nsCString subject, author, date;
     rv = m_newMsgHdr->GetSubject(getter_Copies(subject));
     NS_ENSURE_SUCCESS(rv,rv);
     rv = m_newMsgHdr->GetAuthor(getter_Copies(author));
     NS_ENSURE_SUCCESS(rv,rv);
 
@@ -1223,17 +1223,17 @@ nsNNTPNewsgroupList::CallFilters()
           m_newMsgHdr, folder, m_newsDB, fullHeaders.get(),
           fullHeaders.Length(), this, m_msgWindow);
     }
 
     NS_ENSURE_SUCCESS(rv,rv);
 
     if (m_addHdrToDB)
     {
-      m_newsDB->AddNewHdrToDB(m_newMsgHdr, PR_TRUE);
+      m_newsDB->AddNewHdrToDB(m_newMsgHdr, true);
       if (notifier)
         notifier->NotifyMsgAdded(m_newMsgHdr);
       // mark the header as not yet reported classified
       nsMsgKey msgKey;
       m_newMsgHdr->GetMessageKey(&msgKey);
       folder->OrProcessingFlags(msgKey,
                                 nsMsgProcessingFlags::NotReportedClassified);
     }
--- a/mailnews/news/src/nsNNTPNewsgroupPost.cpp
+++ b/mailnews/news/src/nsNNTPNewsgroupPost.cpp
@@ -52,17 +52,17 @@ nsNNTPNewsgroupPost::nsNNTPNewsgroupPost
 {
   int i;
   for (i=0; i <= HEADER_LAST; i++)
     m_header[i]=nsnull;
 
   m_body=nsnull;
   m_messageBuffer=nsnull;
 
-  m_isControl=PR_FALSE;
+  m_isControl=false;
 }
 
 nsNNTPNewsgroupPost::~nsNNTPNewsgroupPost()
 {
     int i;
     for (i=0; i<=HEADER_LAST; i++)
         PR_FREEIF(m_header[i]);
 
@@ -91,17 +91,17 @@ AppendAndAlloc(char *string, const char 
 
     PR_Free(oldString);
     return string;
 }
 
 nsresult
 nsNNTPNewsgroupPost::AddNewsgroup(const char *newsgroup)
 {
-    m_header[IDX_HEADER_NEWSGROUPS]=AppendAndAlloc(m_header[IDX_HEADER_NEWSGROUPS], newsgroup, PR_TRUE);
+    m_header[IDX_HEADER_NEWSGROUPS]=AppendAndAlloc(m_header[IDX_HEADER_NEWSGROUPS], newsgroup, true);
     return NS_OK;
 }
 
 
 // the message can be stored in a file....allow accessors for getting and setting
 // the file name to post...
 nsresult
 nsNNTPNewsgroupPost::SetPostMessageFile(nsIFile * aPostMessageFile)
--- a/mailnews/news/src/nsNNTPProtocol.cpp
+++ b/mailnews/news/src/nsNNTPProtocol.cpp
@@ -327,18 +327,18 @@ nsNNTPProtocol::nsNNTPProtocol(nsINntpIn
   mBytesReceivedSinceLastStatusUpdate = 0;
   m_startTime = PR_Now();
 
   if (aMsgWindow) {
     m_msgWindow = aMsgWindow;
   }
 
   m_runningURL = nsnull;
-  SetIsBusy(PR_FALSE);
-  m_fromCache = PR_FALSE;
+  SetIsBusy(false);
+  m_fromCache = false;
   PR_LOG(NNTP,PR_LOG_ALWAYS,("(%p) creating",this));
   PR_LOG(NNTP,PR_LOG_ALWAYS,("(%p) initializing, so unset m_currentGroup",this));
   m_currentGroup.Truncate();
   LL_I2L(m_lastActiveTimeStamp, 0);
 }
 
 nsNNTPProtocol::~nsNNTPProtocol()
 {
@@ -399,17 +399,17 @@ NS_IMETHODIMP nsNNTPProtocol::Initialize
     rv = m_url->SetPort(port);
     if (NS_FAILED(rv)) return rv;
   }
 
   NS_PRECONDITION(m_url , "invalid URL passed into NNTP Protocol");
 
   m_runningURL = do_QueryInterface(m_url, &rv);
   if (NS_FAILED(rv)) return rv;
-  SetIsBusy(PR_TRUE);
+  SetIsBusy(true);
 
   nsCString group;
 
   // Initialize m_newsAction before possible use in ParseURL method
   m_runningURL->GetNewsAction(&m_newsAction);
   
   // parse url to get the msg folder and check if the message is in the folder's
   // local cache before opening a new socket and trying to download the message
@@ -492,17 +492,17 @@ NS_IMETHODIMP nsNNTPProtocol::Initialize
   }
   else {
     m_nextState = SEND_FIRST_NNTP_COMMAND;
   }
   m_dataBuf = (char *) PR_Malloc(sizeof(char) * OUTPUT_BUFFER_SIZE);
   m_dataBufSize = OUTPUT_BUFFER_SIZE;
 
   if (!m_lineStreamBuffer)
-    m_lineStreamBuffer = new nsMsgLineStreamBuffer(OUTPUT_BUFFER_SIZE, PR_TRUE /* create new lines */);
+    m_lineStreamBuffer = new nsMsgLineStreamBuffer(OUTPUT_BUFFER_SIZE, true /* create new lines */);
 
   m_typeWanted = 0;
   m_responseCode = 0;
   m_previousResponseCode = 0;
   m_responseText = nsnull;
 
   m_firstArticle = 0;
   m_lastArticle = 0;
@@ -655,17 +655,17 @@ nsNntpCacheStreamListener::OnStopRequest
 
   // clear out mem cache entry so we're not holding onto it.
   if (mRunningUrl)
     mRunningUrl->SetMemCacheEntry(nsnull);
 
   mListener = nsnull;
   nsCOMPtr <nsINNTPProtocol> nntpProtocol = do_QueryInterface(mChannelToUse);
   if (nntpProtocol) {
-    rv = nntpProtocol->SetIsBusy(PR_FALSE);
+    rv = nntpProtocol->SetIsBusy(false);
     NS_ENSURE_SUCCESS(rv,rv);
   }
   mChannelToUse = nsnull;
   return rv;
 }
 
 NS_IMETHODIMP
 nsNntpCacheStreamListener::OnDataAvailable(nsIRequest *request, nsISupports * aCtxt, nsIInputStream * aInStream, PRUint32 aSourceOffset, PRUint32 aCount)
@@ -816,17 +816,17 @@ bool nsNNTPProtocol::ReadFromLocalCache(
       {
         // dougt - This may break the ablity to "cancel" a read from offline mail reading.
         // fileChannel->SetLoadGroup(m_loadGroup);
 
         m_typeWanted = ARTICLE_WANTED;
 
         nsNntpCacheStreamListener * cacheListener = new nsNntpCacheStreamListener();
         if (!cacheListener)
-          return PR_FALSE;
+          return false;
 
         NS_ADDREF(cacheListener);
         cacheListener->Init(m_channelListener, static_cast<nsIChannel *>(this), mailnewsUrl);
 
         // create a stream pump that will async read the specified amount of data.
         // XXX make size 64-bit int
         nsCOMPtr<nsIInputStreamPump> pump;
         rv = NS_NewInputStreamPump(getter_AddRefs(pump),
@@ -836,25 +836,25 @@ bool nsNNTPProtocol::ReadFromLocalCache(
 
         NS_RELEASE(cacheListener);
 
         if (NS_SUCCEEDED(rv)) // ONLY if we succeeded in actually starting the read should we return
         {
           m_ContentType.Truncate();
           m_channelListener = nsnull;
           NNTP_LOG_NOTE("Loading message from offline storage");
-          return PR_TRUE;
+          return true;
         }
       }
       else
-        mailnewsUrl->SetMsgIsInLocalCache(PR_FALSE);
+        mailnewsUrl->SetMsgIsInLocalCache(false);
     }
   }
 
-  return PR_FALSE;
+  return false;
 }
 
 NS_IMETHODIMP
 nsNNTPProtocol::OnCacheEntryAvailable(nsICacheEntryDescriptor *entry, nsCacheAccessMode access, nsresult status)
 {
   nsresult rv = NS_OK;
 
   if (NS_SUCCEEDED(status))
@@ -866,17 +866,17 @@ nsNNTPProtocol::OnCacheEntryAvailable(ns
     // clear it out from an error ealier. In this case, we'll simply try to
     // write in the cache entry this time and hope we get luckier.
     bool canRead = access & nsICache::ACCESS_READ;
     if (canRead)
     {
       PRUint32 size;
       entry->GetDataSize(&size);
       if (size == 0)
-        canRead = PR_FALSE;
+        canRead = false;
     }
 
     // if we have write access then insert a "stream T" into the flow so data
     // gets written to both
     if (access & nsICache::ACCESS_WRITE && !canRead)
     {
       // use a stream listener Tee to force data into the cache and to our current channel listener...
       nsCOMPtr<nsIStreamListener> newListener;
@@ -982,17 +982,17 @@ nsresult nsNNTPProtocol::LoadUrl(nsIURI 
   nsCString group;
   m_ContentType.Truncate();
   nsresult rv = NS_OK;
 
   m_runningURL = do_QueryInterface(aURL, &rv);
   if (NS_FAILED(rv)) return rv;
   m_runningURL->GetNewsAction(&m_newsAction);
 
-  SetIsBusy(PR_TRUE);
+  SetIsBusy(true);
 
   rv = ParseURL(aURL, group, m_messageID);
   NS_ASSERTION(NS_SUCCEEDED(rv),"failed to parse news url");
   //if (NS_FAILED(rv)) return rv;
   // XXX group returned from ParseURL is assumed to be in UTF-8
   NS_ASSERTION(MsgIsUTF8(group), "newsgroup name is not in UTF-8");
   NS_ASSERTION(m_nntpServer, "Parsing must result in an m_nntpServer");
 
@@ -1075,33 +1075,33 @@ nsresult nsNNTPProtocol::LoadUrl(nsIURI 
 
       bool confirmResult = false;
       rv = dialog->Confirm(nsnull, confirmText.get(), &confirmResult);
       NS_ENSURE_SUCCESS(rv, rv);
 
       if (confirmResult)
       {
          rv = m_nntpServer->SubscribeToNewsgroup(group);
-         containsGroup = PR_TRUE;
+         containsGroup = true;
       }
       else
       {
         // XXX FIX ME
         // the way news is current written, we've already opened the socket
         // and initialized the connection.
         //
         // until that is fixed, when the user cancels an autosubscribe, we've got to close it and clean up after ourselves
         //
         // see bug http://bugzilla.mozilla.org/show_bug.cgi?id=108293
         // another problem, autosubscribe urls are ending up as cache entries
         // because the default action on nntp urls is ActionFetchArticle
         //
         // see bug http://bugzilla.mozilla.org/show_bug.cgi?id=108294
         if (m_runningURL)
-          FinishMemCacheEntry(PR_FALSE); // cleanup mem cache entry
+          FinishMemCacheEntry(false); // cleanup mem cache entry
 
         return CloseConnection();
       }
     }
 
     // If we have a group (since before, or just subscribed), set the m_newsFolder.
     if (containsGroup)
     {
@@ -1497,29 +1497,29 @@ PRInt32 nsNNTPProtocol::SendListExtensio
       return status;  /* no line yet */
 
         if ('.' != line[0]) {
             m_nntpServer->AddExtension(line);
         }
     else
     {
       /* tell libmsg that it's ok to ask this news host for extensions */
-      m_nntpServer->SetSupportsExtensions(PR_TRUE);
+      m_nntpServer->SetSupportsExtensions(true);
       /* all extensions received */
       m_nextState = SEND_LIST_SEARCHES;
       ClearFlag(NNTP_PAUSE_FOR_READ);
     }
   }
   else
   {
     /* LIST EXTENSIONS not recognized
      * tell libmsg not to ask for any more extensions and move on to
      * the real NNTP command we were trying to do. */
 
-     m_nntpServer->SetSupportsExtensions(PR_FALSE);
+     m_nntpServer->SetSupportsExtensions(false);
      m_nextState = SEND_FIRST_NNTP_COMMAND;
   }
 
   return status;
 }
 
 PRInt32 nsNNTPProtocol::SendListSearches()
 {
@@ -1569,17 +1569,17 @@ PRInt32 nsNNTPProtocol::SendListSearches
 
   if ('.' != line[0])
   {
         nsCAutoString charset;
         nsAutoString lineUtf16;
         if (NS_FAILED(m_nntpServer->GetCharset(charset)) ||
             NS_FAILED(nsMsgI18NConvertToUnicode(charset.get(),
                                                 nsDependentCString(line),
-                                                lineUtf16, PR_TRUE)))
+                                                lineUtf16, true)))
             CopyUTF8toUTF16(nsDependentCString(line), lineUtf16);
 
     m_nntpServer->AddSearchableGroup(lineUtf16);
   }
   else
   {
     /* all searchable groups received */
     /* LIST SRCHFIELDS is legal if the server supports the SEARCH extension, which */
@@ -1964,32 +1964,32 @@ PRInt32 nsNNTPProtocol::SendFirstNNTPCom
 
     if (m_responseCode == MK_NNTP_RESPONSE_GROUP_NO_GROUP &&
       m_typeWanted == GROUP_WANTED) {
       PR_LOG(NNTP,PR_LOG_ALWAYS,("(%p) group (%s) not found, so unset"
                                  " m_currentGroup", this,
                                  NS_ConvertUTF16toUTF8(group_name).get()));
       m_currentGroup.Truncate();
 
-      m_nntpServer->GroupNotFound(m_msgWindow, group_name, PR_TRUE /* opening */);
+      m_nntpServer->GroupNotFound(m_msgWindow, group_name, true /* opening */);
     }
 
     /* if the server returned a 400 error then it is an expected
     * error.  the NEWS_ERROR state will not sever the connection
     */
     if(major_opcode == MK_NNTP_RESPONSE_TYPE_CANNOT)
       m_nextState = NEWS_ERROR;
     else
       m_nextState = NNTP_ERROR;
     // if we have no channel listener, then we're likely downloading
     // the message for offline use (or at least not displaying it)
     bool savingArticleOffline = (m_channelListener == nsnull);
 
     if (m_runningURL)
-      FinishMemCacheEntry(PR_FALSE);  // cleanup mem cache entry
+      FinishMemCacheEntry(false);  // cleanup mem cache entry
 
     if (NS_SUCCEEDED(rv) && !group_name.IsEmpty() && !savingArticleOffline) {
       nsString titleStr;
       rv = GetNewsStringByName("htmlNewsErrorTitle", getter_Copies(titleStr));
       NS_ENSURE_SUCCESS(rv,rv);
 
       nsString newsErrorStr;
       rv = GetNewsStringByName("htmlNewsError", getter_Copies(newsErrorStr));
@@ -2043,17 +2043,17 @@ PRInt32 nsNNTPProtocol::SendFirstNNTPCom
       }
       if (!m_msgWindow) return NS_ERROR_FAILURE;
 
       // note, this will cause us to close the connection.
       // this will call nsDocShell::LoadURI(), which will
       // call nsDocShell::Stop(STOP_NETWORK), which will eventually
       // call nsNNTPProtocol::Cancel(), which will close the socket.
       // we need to fix this, since the connection is still valid.
-      rv = m_msgWindow->DisplayHTMLInMessagePane(titleStr, errorHtml, PR_TRUE);
+      rv = m_msgWindow->DisplayHTMLInMessagePane(titleStr, errorHtml, true);
       NS_ENSURE_SUCCESS(rv,rv);
     }
     // let's take the opportunity of removing the hdr from the db so we don't try to download
     // it again.
     else if (savingArticleOffline)
     {
       if ((m_key != nsMsgKey_None) && (m_newsFolder)) {
          rv = m_newsFolder->RemoveMessage(m_key);
@@ -2162,17 +2162,17 @@ PRInt32 nsNNTPProtocol::BeginArticle()
   //
   // the pipe must have an unlimited length since we are going to be filling
   // it on the main thread while reading it from the main thread.  iow, the
   // write must not block!! (see bug 190988)
   //
   if (m_channelListener) {
       nsresult rv;
       nsCOMPtr<nsIPipe> pipe = do_CreateInstance("@mozilla.org/pipe;1");
-      rv = pipe->Init(PR_FALSE, PR_FALSE, 4096, PR_UINT32_MAX, nsnull);
+      rv = pipe->Init(false, false, 4096, PR_UINT32_MAX, nsnull);
       NS_ASSERTION(NS_SUCCEEDED(rv), "failed to create pipe");
       // TODO: return on failure?
 
       pipe->GetInputStream(getter_AddRefs(mDisplayInputStream));
       pipe->GetOutputStream(getter_AddRefs(mDisplayOutputStream));
   }
 
   m_nextState = NNTP_READ_ARTICLE;
@@ -2183,17 +2183,17 @@ PRInt32 nsNNTPProtocol::BeginArticle()
 PRInt32 nsNNTPProtocol::DisplayArticle(nsIInputStream * inputStream, PRUint32 length)
 {
   PRUint32 line_length = 0;
 
   bool pauseForMoreData = false;
   if (m_channelListener)
   {
     nsresult rv = NS_OK;
-    char *line = m_lineStreamBuffer->ReadNextLine(inputStream, line_length, pauseForMoreData, &rv, PR_TRUE);
+    char *line = m_lineStreamBuffer->ReadNextLine(inputStream, line_length, pauseForMoreData, &rv, true);
     if (pauseForMoreData)
     {
       PRUint32 inlength = 0;
       mDisplayInputStream->Available(&inlength);
       if (inlength > 0) // broadcast our batched up ODA changes
         m_channelListener->OnDataAvailable(this, m_channelContext, mDisplayInputStream, 0, inlength);
       SetFlag(NNTP_PAUSE_FOR_READ);
       PR_Free(line);
@@ -2243,17 +2243,17 @@ PRInt32 nsNNTPProtocol::ReadArticle(nsII
 
   // if we have a channel listener, spool directly to it....
   // otherwise we must be doing something like save to disk or cancel
   // in which case we are doing the work.
   if (m_channelListener)
     return DisplayArticle(inputStream, length);
 
 
-  char *line = m_lineStreamBuffer->ReadNextLine(inputStream, status, pauseForMoreData, nsnull, PR_TRUE);
+  char *line = m_lineStreamBuffer->ReadNextLine(inputStream, status, pauseForMoreData, nsnull, true);
   if (m_newsFolder && line)
   {
     const char *unescapedLine = line;
     // lines beginning with '.' are escaped by nntp server
     // or is it just '.' on a line by itself?
     if (line[0] == '.' && line[1] == '.')
       unescapedLine++;
     m_newsFolder->NotifyDownloadedLine(unescapedLine, m_key);
@@ -2535,17 +2535,17 @@ PRInt32 nsNNTPProtocol::AuthorizationRes
     else {
       // *don't log the password!* PR_LOG(NNTP,PR_LOG_ALWAYS,("use %s as the password",(const char *)password));
       NS_MsgSACat(&command, password.get());
     }
     NS_MsgSACat(&command, CRLF);
 
     nsCOMPtr<nsIMsgMailNewsUrl> mailnewsurl = do_QueryInterface(m_runningURL);
     if (mailnewsurl)
-      status = SendData(mailnewsurl, command, PR_TRUE);
+      status = SendData(mailnewsurl, command, true);
 
     PR_FREEIF(command);
 
     m_nextState = NNTP_RESPONSE;
     m_nextStateAfterResponse = NNTP_PASSWORD_RESPONSE;
     SetFlag(NNTP_PAUSE_FOR_READ);
 
     return status;
@@ -2586,17 +2586,17 @@ PRInt32 nsNNTPProtocol::PasswordResponse
       /* Normal authentication */
       m_nextState = SEND_FIRST_NNTP_COMMAND;
 #else
     if (!TestFlag(NNTP_READER_PERFORMED))
       m_nextState = NNTP_SEND_MODE_READER;
     else
       m_nextState = SEND_FIRST_NNTP_COMMAND;
 #endif /* HAVE_NNTP_EXTENSIONS */
-    m_nntpServer->SetUserAuthenticated(PR_TRUE);
+    m_nntpServer->SetUserAuthenticated(true);
     return(0);
   }
   else
   {
     HandleAuthenticationFailure();
     return(MK_NNTP_AUTH_FAILED);
   }
 
@@ -2736,21 +2736,21 @@ PRInt32 nsNNTPProtocol::ProcessNewsgroup
   rv = m_nntpServer->QueryExtension("XACTIVE",&xactive);
   if (NS_SUCCEEDED(rv) && xactive)
   {
     nsCAutoString charset;
     nsAutoString lineUtf16;
     if (NS_SUCCEEDED(m_nntpServer->GetCharset(charset)) &&
         NS_SUCCEEDED(nsMsgI18NConvertToUnicode(charset.get(),
                                                nsDependentCString(line),
-                                               lineUtf16, PR_TRUE)))
+                                               lineUtf16, true)))
       m_nntpServer->SetGroupNeedsExtraInfo(NS_ConvertUTF16toUTF8(lineUtf16),
-                                           PR_TRUE);
+                                           true);
     else
-      m_nntpServer->SetGroupNeedsExtraInfo(nsDependentCString(line), PR_TRUE);
+      m_nntpServer->SetGroupNeedsExtraInfo(nsDependentCString(line), true);
   }
 
   PR_Free(lineToFree);
   return(status);
 }
 
 /* Ahhh, this like print's out the headers and stuff
  *
@@ -3017,17 +3017,17 @@ void nsNNTPProtocol::HandleAuthenticatio
       (void) m_newsFolder->ForgetGroupUsername();
       (void) m_newsFolder->ForgetGroupPassword();
     }
     // we'll allow one failure before clearing out password,
     // but we need to handle the case where the password has
     // changed while the app is running, and
     // reprompt the user for the (potentially) new password.
     // So clear the userAuthenticated flag.
-    m_nntpServer->SetUserAuthenticated(PR_FALSE);
+    m_nntpServer->SetUserAuthenticated(false);
   }
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 // XOVER, XHDR, and HEAD processing code
 // Used for filters
 // State machine explanation located in doxygen comments for nsNNTPProtocol
 ///////////////////////////////////////////////////////////////////////////////
@@ -3621,53 +3621,53 @@ bool nsNNTPProtocol::CheckIfAuthor(nsISu
 {
     nsresult rv;
 
     cancelInfoEntry *cancelInfo = (cancelInfoEntry*) data;
 
     if (!cancelInfo->from.IsEmpty()) {
         // already found a match, no need to go any further
         // keep going
-        return PR_TRUE;
+        return true;
     }
 
     nsCOMPtr<nsIMsgIdentity> identity = do_QueryInterface(aElement, &rv);
     if (NS_FAILED(rv)) {
         // keep going
-        return PR_TRUE;
+        return true;
     }
 
     if (identity) {
         identity->GetEmail(cancelInfo->from);
         PR_LOG(NNTP,PR_LOG_ALWAYS,("from = %s", cancelInfo->from.get()));
     }
 
     nsCOMPtr<nsIMsgHeaderParser> parser = do_GetService(NS_MAILNEWS_MIME_HEADER_PARSER_CONTRACTID, &rv);
 
     if (NS_FAILED(rv)) {
         cancelInfo->from.Truncate();
-        return PR_TRUE;
+        return true;
     }
 
     nsCString us;
     nsCString them;
     nsresult rv1 = parser->ExtractHeaderAddressMailboxes(cancelInfo->from, us);
     nsresult rv2 = parser->ExtractHeaderAddressMailboxes(cancelInfo->old_from,
                                                          them);
 
     PR_LOG(NNTP,PR_LOG_ALWAYS,("us = %s, them = %s", us.get(), them.get()));
 
     if (NS_FAILED(rv1) || NS_FAILED(rv2) || !us.Equals(them, nsCaseInsensitiveCStringComparator())) {
         //no match.  don't set cancel email
         cancelInfo->from.Truncate();
-        return PR_TRUE;
+        return true;
     }
     else {
       // we have a match, stop.
-        return PR_FALSE;
+        return false;
     }
 }
 
 PRInt32 nsNNTPProtocol::DoCancel()
 {
     PRInt32 status = 0;
     bool failure = false;
     nsresult rv = NS_OK;
@@ -3779,17 +3779,17 @@ PRInt32 nsNNTPProtocol::DoCancel()
 
 /* After the cancel is disallowed, Make the status update to be the same as though the
 cancel was allowed, otherwise, the newsgroup is not able to take further requests as
 reported here */
           status = MK_NNTP_CANCEL_DISALLOWED;
           m_nextState = NNTP_RESPONSE;
           m_nextStateAfterResponse = NNTP_SEND_POST_DATA_RESPONSE;
           SetFlag(NNTP_PAUSE_FOR_READ);
-          failure = PR_TRUE;
+          failure = true;
           goto FAIL;
       }
       else {
         PR_LOG(NNTP,PR_LOG_ALWAYS,("(%p) CANCELCHK not supported, so post the cancel message as %s", this, cancelInfo.from.get()));
       }
   }
   else
     NNTP_LOG_NOTE("CANCELCHK supported, don't do the us vs. them test");
@@ -3806,24 +3806,24 @@ reported here */
     	confirmCancelResult = 1; // Default to No.
   }
   else
     confirmCancelResult = 0; // Default to Yes.
     
   if (confirmCancelResult != 0) {
       // they cancelled the cancel
       status = MK_NNTP_NOT_CANCELLED;
-      failure = PR_TRUE;
+      failure = true;
       goto FAIL;
   }
 
   if (!subject || !body)
   {
     status = MK_OUT_OF_MEMORY;
-    failure = PR_TRUE;
+    failure = true;
     goto FAIL;
   }
 
   PL_strcpy (subject, "cancel ");
   PL_strcat (subject, id);
 
   otherHeaders.AppendLiteral("Control: cancel ");
   otherHeaders += id;
@@ -3858,17 +3858,17 @@ reported here */
     nsCOMPtr<nsIMsgMailNewsUrl> mailnewsurl = do_QueryInterface(m_runningURL);
     if (mailnewsurl)
       status = SendData(mailnewsurl, data);
     PR_Free (data);
     if (status < 0) {
       nsCAutoString errorText;
       errorText.AppendInt(status);
       AlertError(MK_TCP_WRITE_ERROR, errorText.get());
-      failure = PR_TRUE;
+      failure = true;
       goto FAIL;
     }
 
     SetFlag(NNTP_PAUSE_FOR_READ);
     m_nextState = NNTP_RESPONSE;
     m_nextStateAfterResponse = NNTP_SEND_POST_DATA_RESPONSE;
 
     // QA needs to be able to turn this alert off, for the automate tests.  see bug #31057
@@ -4189,17 +4189,17 @@ PRInt32 nsNNTPProtocol::ListXActiveRespo
         /* we're either going to list prettynames first, or list
         all prettynames every time, so we won't care so much
         if it gets interrupted. */
         PR_LOG(NNTP,PR_LOG_ALWAYS,("(%p) got xactive for %s of %s", this, line, flags));
         /*  This isn't required, because the extra info is
         initialized to false for new groups. And it's
         an expensive call.
         */
-        /* MSG_SetGroupNeedsExtraInfo(cd->host, line, PR_FALSE); */
+        /* MSG_SetGroupNeedsExtraInfo(cd->host, line, false); */
       }
     }
     else
     {
       bool xactive=false;
       rv = m_nntpServer->QueryExtension("XACTIVE",&xactive);
       if (m_typeWanted == NEW_GROUPS &&
         NS_SUCCEEDED(rv) && xactive)
@@ -4731,36 +4731,36 @@ nsresult nsNNTPProtocol::ProcessProtocol
       else
         status = SendListGroupResponse(inputStream, length);
       break;
     case NEWS_DONE:
       m_nextState = NEWS_FREE;
       break;
     case NEWS_POST_DONE:
       NNTP_LOG_NOTE("NEWS_POST_DONE");
-      mailnewsurl->SetUrlState(PR_FALSE, NS_OK);
+      mailnewsurl->SetUrlState(false, NS_OK);
       m_nextState = NEWS_FREE;
       break;
     case NEWS_ERROR:
       NNTP_LOG_NOTE("NEWS_ERROR");
       if (m_responseCode == MK_NNTP_RESPONSE_ARTICLE_NOTFOUND || m_responseCode == MK_NNTP_RESPONSE_ARTICLE_NONEXIST)
-        mailnewsurl->SetUrlState(PR_FALSE, NS_MSG_NEWS_ARTICLE_NOT_FOUND);
+        mailnewsurl->SetUrlState(false, NS_MSG_NEWS_ARTICLE_NOT_FOUND);
       else
-        mailnewsurl->SetUrlState(PR_FALSE, NS_ERROR_FAILURE);
+        mailnewsurl->SetUrlState(false, NS_ERROR_FAILURE);
       m_nextState = NEWS_FREE;
       break;
     case NNTP_ERROR:
       // XXX do we really want to remove the connection from
       // the cache on error?
       /* check if this connection came from the cache or if it was
       * a new connection.  If it was not new lets start it over
       * again.  But only if we didn't have any successful protocol
       * dialog at all.
       */
-      FinishMemCacheEntry(PR_FALSE);  // cleanup mem cache entry
+      FinishMemCacheEntry(false);  // cleanup mem cache entry
       if (m_responseCode != MK_NNTP_RESPONSE_ARTICLE_NOTFOUND && m_responseCode != MK_NNTP_RESPONSE_ARTICLE_NONEXIST)
         return CloseConnection();
     case NEWS_FREE:
       // Remember when we last used this connection
       m_lastActiveTimeStamp = PR_Now();
       CleanupAfterRunningUrl();
     case NEWS_FINISHED:
       return NS_OK;
@@ -4840,17 +4840,17 @@ nsresult nsNNTPProtocol::CleanupAfterRun
   CleanupNewsgroupList();
 
   // clear out mem cache entry so we're not holding onto it.
   if (m_runningURL)
   {
     nsCOMPtr<nsIMsgMailNewsUrl> mailnewsurl = do_QueryInterface(m_runningURL);
     if (mailnewsurl)
     {
-      mailnewsurl->SetUrlState(PR_FALSE, NS_OK);
+      mailnewsurl->SetUrlState(false, NS_OK);
       mailnewsurl->SetMemCacheEntry(nsnull);
     }
   }
 
   Cleanup();
 
   mDisplayInputStream = nsnull;
   mDisplayOutputStream = nsnull;
@@ -4864,17 +4864,17 @@ nsresult nsNNTPProtocol::CleanupAfterRun
 
   // disable timeout before caching.
   nsCOMPtr<nsISocketTransport> strans = do_QueryInterface(m_transport);
   if (strans)
     strans->SetTimeout(nsISocketTransport::TIMEOUT_READ_WRITE, PR_UINT32_MAX);
 
   // don't mark ourselves as not busy until we are done cleaning up the connection. it should be the
   // last thing we do.
-  SetIsBusy(PR_FALSE);
+  SetIsBusy(false);
 
   return NS_OK;
 }
 
 nsresult nsNNTPProtocol::CloseSocket()
 {
   PR_LOG(NNTP,PR_LOG_ALWAYS,("(%p) ClosingSocket()",this));
 
--- a/mailnews/news/src/nsNewsDownloadDialogArgs.cpp
+++ b/mailnews/news/src/nsNewsDownloadDialogArgs.cpp
@@ -37,18 +37,18 @@
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsNewsDownloadDialogArgs.h"
 
 nsNewsDownloadDialogArgs::nsNewsDownloadDialogArgs()
 {
     mArticleCount = 0;
     mServerKey = "";
-    mHitOK = PR_FALSE;
-    mDownloadAll = PR_FALSE;
+    mHitOK = false;
+    mDownloadAll = false;
 }
 
 nsNewsDownloadDialogArgs::~nsNewsDownloadDialogArgs()
 {
 }
 
 NS_IMPL_ISUPPORTS1(nsNewsDownloadDialogArgs, nsINewsDownloadDialogArgs)
 
--- a/mailnews/news/src/nsNewsDownloader.cpp
+++ b/mailnews/news/src/nsNewsDownloader.cpp
@@ -63,45 +63,45 @@
 // which articles to download is determined by nsNewsDownloader object,
 // or subclasses thereof. News can download marked objects, for example.
 nsresult nsNewsDownloader::DownloadArticles(nsIMsgWindow *window, nsIMsgFolder *folder, nsTArray<nsMsgKey> *pIds)
 {
   if (pIds != nsnull)
     m_keysToDownload.InsertElementsAt(0, pIds->Elements(), pIds->Length());
 
   if (!m_keysToDownload.IsEmpty())
-    m_downloadFromKeys = PR_TRUE;
+    m_downloadFromKeys = true;
 
   m_folder = folder;
   m_window = window;
   m_numwrote = 0;
 
   bool headersToDownload = GetNextHdrToRetrieve();
   // should we have a special error code for failure here?
-  return (headersToDownload) ? DownloadNext(PR_TRUE) : NS_ERROR_FAILURE;
+  return (headersToDownload) ? DownloadNext(true) : NS_ERROR_FAILURE;
 }
 
 /* Saving news messages
  */
 
 NS_IMPL_ISUPPORTS2(nsNewsDownloader, nsIUrlListener, nsIMsgSearchNotify)
 
 nsNewsDownloader::nsNewsDownloader(nsIMsgWindow *window, nsIMsgDatabase *msgDB, nsIUrlListener *listener)
 {
   m_numwrote = 0;
-  m_downloadFromKeys = PR_FALSE;
+  m_downloadFromKeys = false;
   m_newsDB = msgDB;
-  m_abort = PR_FALSE;
+  m_abort = false;
   m_listener = listener;
   m_window = window;
   m_lastPercent = -1;
   LL_I2L(m_lastProgressTime, 0);
   // not the perfect place for this, but I think it will work.
   if (m_window)
-    m_window->SetStopped(PR_FALSE);
+    m_window->SetStopped(false);
 }
 
 nsNewsDownloader::~nsNewsDownloader()
 {
   if (m_listener)
     m_listener->OnStopRunningUrl(/* don't have a url */nsnull, m_status);
   if (m_newsDB)
   {
@@ -120,17 +120,17 @@ NS_IMETHODIMP nsNewsDownloader::OnStopRu
   bool stopped = false;
   if (m_window)
     m_window->GetStopped(&stopped);
   if (stopped)
     exitCode = NS_BINDING_ABORTED;
 
  nsresult rv = exitCode;
   if (NS_SUCCEEDED(exitCode) || exitCode == NS_MSG_NEWS_ARTICLE_NOT_FOUND)
-    rv = DownloadNext(PR_FALSE);
+    rv = DownloadNext(false);
 
   return rv;
 }
 
 nsresult nsNewsDownloader::DownloadNext(bool firstTimeP)
 {
   nsresult rv;
   if (!firstTimeP)
@@ -139,17 +139,17 @@ nsresult nsNewsDownloader::DownloadNext(
     if (!moreHeaders)
     {
       if (m_listener)
         m_listener->OnStopRunningUrl(nsnull, NS_OK);
       return NS_OK;
     }
   }
   StartDownload();
-  m_wroteAnyP = PR_FALSE;
+  m_wroteAnyP = false;
   nsCOMPtr <nsINntpService> nntpService = do_GetService(NS_NNTPSERVICE_CONTRACTID,&rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return nntpService->FetchMessage(m_folder, m_keyToDownload, m_window, nsnull, this, nsnull);
 }
 
 bool DownloadNewsArticlesToOfflineStore::GetNextHdrToRetrieve()
 {
@@ -163,17 +163,17 @@ bool DownloadNewsArticlesToOfflineStore:
 
   bool hasMore = false;
 
   while (NS_SUCCEEDED(rv = m_headerEnumerator->HasMoreElements(&hasMore)) && hasMore)
   {
     nsCOMPtr <nsISupports> supports;
     rv = m_headerEnumerator->GetNext(getter_AddRefs(supports));
     m_newsHeader = do_QueryInterface(supports);
-    NS_ENSURE_SUCCESS(rv, PR_FALSE);
+    NS_ENSURE_SUCCESS(rv, false);
     PRUint32 hdrFlags;
     m_newsHeader->GetFlags(&hdrFlags);
     if (hdrFlags & nsMsgMessageFlags::Marked)
     {
       m_newsHeader->GetMessageKey(&m_keyToDownload);
       break;
     }
     else
@@ -188,62 +188,62 @@ void nsNewsDownloader::Abort() {}
 void nsNewsDownloader::Complete() {}
 
 bool nsNewsDownloader::GetNextHdrToRetrieve()
 {
   nsresult rv;
   if (m_downloadFromKeys)
   {
     if (m_numwrote >= (PRInt32) m_keysToDownload.Length())
-      return PR_FALSE;
+      return false;
 
     m_keyToDownload = m_keysToDownload[m_numwrote++];
     PRInt32 percent;
     percent = (100 * m_numwrote) / (PRInt32) m_keysToDownload.Length();
 
     PRInt64 nowMS = LL_ZERO;
     if (percent < 100)  // always need to do 100%
     {
       int64 minIntervalBetweenProgress;
 
       LL_I2L(minIntervalBetweenProgress, 750);
       int64 diffSinceLastProgress;
       LL_I2L(nowMS, PR_IntervalToMilliseconds(PR_IntervalNow()));
       LL_SUB(diffSinceLastProgress, nowMS, m_lastProgressTime); // r = a - b
       LL_SUB(diffSinceLastProgress, diffSinceLastProgress, minIntervalBetweenProgress); // r = a - b
       if (!LL_GE_ZERO(diffSinceLastProgress))
-        return PR_TRUE;
+        return true;
     }
 
     m_lastProgressTime = nowMS;
     nsCOMPtr <nsIMsgNewsFolder> newsFolder = do_QueryInterface(m_folder);
     nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
-    NS_ENSURE_SUCCESS(rv, PR_FALSE);
+    NS_ENSURE_SUCCESS(rv, false);
     nsCOMPtr<nsIStringBundle> bundle;
     rv = bundleService->CreateBundle(NEWS_MSGS_URL, getter_AddRefs(bundle));
-    NS_ENSURE_SUCCESS(rv, PR_FALSE);
+    NS_ENSURE_SUCCESS(rv, false);
 
     nsAutoString firstStr;
     firstStr.AppendInt(m_numwrote);
     nsAutoString totalStr;
     totalStr.AppendInt(m_keysToDownload.Length());
     nsString prettiestName;
     nsString statusString;
 
     m_folder->GetPrettiestName(prettiestName);
 
     const PRUnichar *formatStrings[3] = { firstStr.get(), totalStr.get(), prettiestName.get() };
     rv = bundle->FormatStringFromName(NS_LITERAL_STRING("downloadingArticlesForOffline").get(),
                                       formatStrings, 3, getter_Copies(statusString));
-    NS_ENSURE_SUCCESS(rv, PR_FALSE);
+    NS_ENSURE_SUCCESS(rv, false);
     ShowProgress(statusString.get(), percent);
-    return PR_TRUE;
+    return true;
   }
-  NS_ASSERTION(PR_FALSE, "shouldn't get here if we're not downloading from keys.");
-  return PR_FALSE;  // shouldn't get here if we're not downloading from keys.
+  NS_ASSERTION(false, "shouldn't get here if we're not downloading from keys.");
+  return false;  // shouldn't get here if we're not downloading from keys.
 }
 
 nsresult nsNewsDownloader::ShowProgress(const PRUnichar *progressString, PRInt32 percent)
 {
   if (!m_statusFeedback)
   {
     if (m_window)
       m_window->GetStatusFeedback(getter_AddRefs(m_statusFeedback));
@@ -273,17 +273,17 @@ NS_IMETHODIMP DownloadNewsArticlesToOffl
   {
 #ifdef DEBUG_bienvenu
     //    XP_Trace("finished retrieving %ld\n", m_newsHeader->GetMessageKey());
 #endif
     if (m_newsDB)
     {
       nsMsgKey msgKey;
       m_newsHeader->GetMessageKey(&msgKey);
-      m_newsDB->MarkMarked(msgKey, PR_FALSE, nsnull);
+      m_newsDB->MarkMarked(msgKey, false, nsnull);
     }
   }
   m_newsHeader = nsnull;
   return nsNewsDownloader::OnStopRunningUrl(url, exitCode);
 }
 
 int DownloadNewsArticlesToOfflineStore::FinishDownload()
 {
@@ -347,34 +347,34 @@ DownloadNewsArticlesToOfflineStore::~Dow
 DownloadMatchingNewsArticlesToNewsDB::DownloadMatchingNewsArticlesToNewsDB
   (nsIMsgWindow *window, nsIMsgFolder *folder, nsIMsgDatabase *newsDB,
    nsIUrlListener *listener) :
    DownloadNewsArticlesToOfflineStore(window, newsDB, listener)
 {
   m_window = window;
   m_folder = folder;
   m_newsDB = newsDB;
-  m_downloadFromKeys = PR_TRUE;  // search term matching means downloadFromKeys.
+  m_downloadFromKeys = true;  // search term matching means downloadFromKeys.
 }
 
 DownloadMatchingNewsArticlesToNewsDB::~DownloadMatchingNewsArticlesToNewsDB()
 {
 }
 
 
 NS_IMPL_ISUPPORTS1(nsMsgDownloadAllNewsgroups, nsIUrlListener)
 
 
 nsMsgDownloadAllNewsgroups::nsMsgDownloadAllNewsgroups(nsIMsgWindow *window, nsIUrlListener *listener)
 {
   m_window = window;
   m_listener = listener;
   m_downloaderForGroup = new DownloadMatchingNewsArticlesToNewsDB(window, nsnull, nsnull, this);
   NS_IF_ADDREF(m_downloaderForGroup);
-  m_downloadedHdrsForCurGroup = PR_FALSE;
+  m_downloadedHdrsForCurGroup = false;
 }
 
 nsMsgDownloadAllNewsgroups::~nsMsgDownloadAllNewsgroups()
 {
   NS_IF_RELEASE(m_downloaderForGroup);
 }
 
 NS_IMETHODIMP nsMsgDownloadAllNewsgroups::OnStartRunningUrl(nsIURI* url)
@@ -390,17 +390,17 @@ nsMsgDownloadAllNewsgroups::OnStopRunnin
   {
     if (m_downloadedHdrsForCurGroup)
     {
       bool savingArticlesOffline = false;
       nsCOMPtr <nsIMsgNewsFolder> newsFolder = do_QueryInterface(m_currentFolder);
       if (newsFolder)
         newsFolder->GetSaveArticleOffline(&savingArticlesOffline);
 
-      m_downloadedHdrsForCurGroup = PR_FALSE;
+      m_downloadedHdrsForCurGroup = false;
       if (savingArticlesOffline) // skip this group - we're saving to it already
         rv = ProcessNextGroup();
       else
         rv = DownloadMsgsForCurrentGroup();
     }
     else
     {
       rv = ProcessNextGroup();
@@ -418,17 +418,17 @@ nsMsgDownloadAllNewsgroups::OnStopRunnin
 // Also, sets up m_serverEnumerator to enumerate over the server
 // If no servers found, m_serverEnumerator will be left at null,
 nsresult nsMsgDownloadAllNewsgroups::AdvanceToNextServer(bool *done)
 {
   nsresult rv;
 
   NS_ENSURE_ARG(done);
 
-  *done = PR_TRUE;
+  *done = true;
   if (!m_allServers)
   {
     nsCOMPtr<nsIMsgAccountManager> accountManager =
              do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
     NS_ASSERTION(accountManager && NS_SUCCEEDED(rv), "couldn't get account mgr");
     if (!accountManager || NS_FAILED(rv)) return rv;
 
     rv = accountManager->GetAllServers(getter_AddRefs(m_allServers));
@@ -458,67 +458,67 @@ nsresult nsMsgDownloadAllNewsgroups::Adv
         rv = rootFolder->ListDescendents(m_allFolders);
         if (NS_SUCCEEDED(rv))
           m_allFolders->Enumerate(getter_AddRefs(m_serverEnumerator));
         if (NS_SUCCEEDED(rv) && m_serverEnumerator)
         {
           rv = m_serverEnumerator->First();
           if (NS_SUCCEEDED(rv))
           {
-            *done = PR_FALSE;
+            *done = false;
             break;
           }
         }
       }
     }
   }
   return rv;
 }
 
 nsresult nsMsgDownloadAllNewsgroups::AdvanceToNextGroup(bool *done)
 {
   nsresult rv;
   NS_ENSURE_ARG(done);
-  *done = PR_TRUE;
+  *done = true;
 
   if (m_currentFolder)
   {
     nsCOMPtr <nsIMsgNewsFolder> newsFolder = do_QueryInterface(m_currentFolder);
     if (newsFolder)
-      newsFolder->SetSaveArticleOffline(PR_FALSE);
+      newsFolder->SetSaveArticleOffline(false);
 
     nsCOMPtr<nsIMsgMailSession> session =
              do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv);
     if (NS_SUCCEEDED(rv) && session)
     {
       bool folderOpen;
       PRUint32 folderFlags;
       m_currentFolder->GetFlags(&folderFlags);
       session->IsFolderOpenInWindow(m_currentFolder, &folderOpen);
       if (!folderOpen && ! (folderFlags & (nsMsgFolderFlags::Trash | nsMsgFolderFlags::Inbox)))
         m_currentFolder->SetMsgDatabase(nsnull);
     }
     m_currentFolder = nsnull;
   }
 
-  *done = PR_FALSE;
+  *done = false;
 
   if (!m_currentServer)
      rv = AdvanceToNextServer(done);
   else
      rv = m_serverEnumerator->Next();
   if (NS_FAILED(rv))
     rv = AdvanceToNextServer(done);
 
   if (NS_SUCCEEDED(rv) && !*done && m_serverEnumerator)
   {
     nsCOMPtr <nsISupports> supports;
     rv = m_serverEnumerator->CurrentItem(getter_AddRefs(supports));
     m_currentFolder = do_QueryInterface(supports);
-    *done = PR_FALSE;
+    *done = false;
   }
   return rv;
 }
 
 nsresult DownloadMatchingNewsArticlesToNewsDB::RunSearch(nsIMsgFolder *folder, nsIMsgDatabase *newsDB, nsIMsgSearchSession *searchSession)
 {
   m_folder = folder;
   m_newsDB = newsDB;
@@ -551,32 +551,32 @@ nsresult nsMsgDownloadAllNewsgroups::Pro
         break;
     }
   }
   if (NS_FAILED(rv) || done)
   {
     if (m_listener)
       return m_listener->OnStopRunningUrl(nsnull, NS_OK);
   }
-  m_downloadedHdrsForCurGroup = PR_TRUE;
+  m_downloadedHdrsForCurGroup = true;
   return m_currentFolder ? m_currentFolder->GetNewMessages(m_window, this) : NS_ERROR_NOT_INITIALIZED;
 }
 
 nsresult nsMsgDownloadAllNewsgroups::DownloadMsgsForCurrentGroup()
 {
   NS_ENSURE_TRUE(m_downloaderForGroup, NS_ERROR_OUT_OF_MEMORY);
   nsCOMPtr <nsIMsgDatabase> db;
   nsCOMPtr <nsIMsgDownloadSettings> downloadSettings;
   m_currentFolder->GetMsgDatabase(getter_AddRefs(db));
   nsresult rv = m_currentFolder->GetDownloadSettings(getter_AddRefs(downloadSettings));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr <nsIMsgNewsFolder> newsFolder = do_QueryInterface(m_currentFolder);
   if (newsFolder)
-    newsFolder->SetSaveArticleOffline(PR_TRUE);
+    newsFolder->SetSaveArticleOffline(true);
 
   nsCOMPtr <nsIMsgSearchSession> searchSession = do_CreateInstance(NS_MSGSEARCHSESSION_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   bool downloadByDate, downloadUnreadOnly;
   PRUint32 ageLimitOfMsgsToDownload;
 
   downloadSettings->GetDownloadByDate(&downloadByDate);
@@ -589,17 +589,17 @@ nsresult nsMsgDownloadAllNewsgroups::Dow
   rv = searchSession->CreateTerm(getter_AddRefs(term));
   NS_ENSURE_SUCCESS(rv, rv);
   term->GetValue(getter_AddRefs(value));
 
   if (downloadUnreadOnly)
   {
     value->SetAttrib(nsMsgSearchAttrib::MsgStatus);
     value->SetStatus(nsMsgMessageFlags::Read);
-    searchSession->AddSearchTerm(nsMsgSearchAttrib::MsgStatus, nsMsgSearchOp::Isnt, value, PR_TRUE, nsnull);
+    searchSession->AddSearchTerm(nsMsgSearchAttrib::MsgStatus, nsMsgSearchOp::Isnt, value, true, nsnull);
   }
   if (downloadByDate)
   {
     value->SetAttrib(nsMsgSearchAttrib::AgeInDays);
     value->SetAge(ageLimitOfMsgsToDownload);
     searchSession->AddSearchTerm(nsMsgSearchAttrib::AgeInDays, nsMsgSearchOp::IsLessThan, value, nsMsgSearchBooleanOp::BooleanAND, nsnull);
   }
   value->SetAttrib(nsMsgSearchAttrib::MsgStatus);
--- a/mailnews/news/src/nsNewsFolder.cpp
+++ b/mailnews/news/src/nsNewsFolder.cpp
@@ -111,19 +111,19 @@ static NS_DEFINE_CID(kRDFServiceCID, NS_
 #define SNEWS_SCHEME "snews:"
 
 ////////////////////////////////////////////////////////////////////////////////
 
 
 ////////////////////////////////////////////////////////////////////////////////
 
 nsMsgNewsFolder::nsMsgNewsFolder(void) :
-     mExpungedBytes(0), mGettingNews(PR_FALSE),
-    mInitialized(PR_FALSE),
-    m_downloadMessageForOfflineUse(PR_FALSE), m_downloadingMultipleMessages(PR_FALSE),
+     mExpungedBytes(0), mGettingNews(false),
+    mInitialized(false),
+    m_downloadMessageForOfflineUse(false), m_downloadingMultipleMessages(false),
     mReadSet(nsnull)
 {
   MOZ_COUNT_CTOR(nsNewsFolder); // double count these for now.
 }
 
 nsMsgNewsFolder::~nsMsgNewsFolder(void)
 {
   MOZ_COUNT_DTOR(nsNewsFolder);
@@ -259,62 +259,62 @@ nsMsgNewsFolder::AddDirectorySeparator(n
 
 NS_IMETHODIMP
 nsMsgNewsFolder::GetSubFolders(nsISimpleEnumerator **aResult)
 {
   if (!mInitialized)
   {
     // do this first, so we make sure to do it, even on failure.
     // see bug #70494
-    mInitialized = PR_TRUE;
+    mInitialized = true;
 
     nsCOMPtr<nsILocalFile> path;
     nsresult rv = GetFilePath(getter_AddRefs(path));
     if (NS_FAILED(rv)) return rv;
 
     rv = CreateSubFolders(path);
     if (NS_FAILED(rv)) return rv;
 
     // force ourselves to get initialized from cache
     // Don't care if it fails.  this will fail the first time after
     // migration, but we continue on.  see #66018
-    (void)UpdateSummaryTotals(PR_FALSE);
+    (void)UpdateSummaryTotals(false);
   }
 
   return aResult ? NS_NewArrayEnumerator(aResult, mSubFolders) : NS_ERROR_NULL_POINTER;
 }
 
 //Makes sure the database is open and exists.  If the database is valid then
 //returns NS_OK.  Otherwise returns a failure error value.
 nsresult nsMsgNewsFolder::GetDatabase()
 {
   nsresult rv;
   if (!mDatabase)
   {
     nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv,rv);
 
     // Get the database, blowing it away if it's out of date.
-    rv = msgDBService->OpenFolderDB(this, PR_FALSE, getter_AddRefs(mDatabase));
+    rv = msgDBService->OpenFolderDB(this, false, getter_AddRefs(mDatabase));
     if (NS_FAILED(rv))
       rv = msgDBService->CreateNewDB(this, getter_AddRefs(mDatabase));
     NS_ENSURE_SUCCESS(rv, rv);
 
     if(mAddListener)
       rv = mDatabase->AddListener(this);
 
     nsCOMPtr<nsINewsDatabase> db = do_QueryInterface(mDatabase, &rv);
     if (NS_FAILED(rv))
       return rv;
 
     rv = db->SetReadSet(mReadSet);
     if (NS_FAILED(rv))
       return rv;
 
-    rv = UpdateSummaryTotals(PR_TRUE);
+    rv = UpdateSummaryTotals(true);
     if (NS_FAILED(rv))
       return rv;
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgNewsFolder::GetDatabaseWithoutCache(nsIMsgDatabase **db)
@@ -353,17 +353,17 @@ nsMsgNewsFolder::UpdateFolder(nsIMsgWind
     rv = GetDatabase(); // want this cached...
     if (NS_SUCCEEDED(rv))
     {
       if (mDatabase)
       {
         nsCOMPtr<nsIMsgRetentionSettings> retentionSettings;
         nsresult rv = GetRetentionSettings(getter_AddRefs(retentionSettings));
         if (NS_SUCCEEDED(rv))
-          rv = mDatabase->ApplyRetentionSettings(retentionSettings, PR_FALSE);
+          rv = mDatabase->ApplyRetentionSettings(retentionSettings, false);
       }
       rv = AutoCompact(aWindow);
       NS_ENSURE_SUCCESS(rv,rv);
       // GetNewMessages has to be the last rv set before we get to the next check, so
       // that we'll have rv set to NS_MSG_ERROR_OFFLINE when offline and send
       // a folder loaded notification to the front end.
       rv = GetNewMessages(aWindow, nsnull);
     }
@@ -375,75 +375,75 @@ nsMsgNewsFolder::UpdateFolder(nsIMsgWind
   NotifyFolderEvent(mFolderLoadedAtom);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgNewsFolder::GetCanSubscribe(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = PR_FALSE;
+  *aResult = false;
 
   bool isNewsServer = false;
   nsresult rv = GetIsServer(&isNewsServer);
   if (NS_FAILED(rv)) return rv;
 
   // you can only subscribe to news servers, not news groups
   *aResult = isNewsServer;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgNewsFolder::GetCanFileMessages(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
   // you can't file messages into a news server or news group
-  *aResult = PR_FALSE;
+  *aResult = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgNewsFolder::GetCanCreateSubfolders(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = PR_FALSE;
+  *aResult = false;
   // you can't create subfolders on a news server or a news group
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgNewsFolder::GetCanRename(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = PR_FALSE;
+  *aResult = false;
   // you can't rename a news server or a news group
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgNewsFolder::GetCanCompact(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = PR_FALSE;
+  *aResult = false;
   // you can't compact a news server or a news group
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgNewsFolder::GetCanDeleteMessages(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
 
   nsresult rv;
   nsCOMPtr<nsIPrefBranch> prefBranch =
     do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Don't allow delete by default
-  *aResult = PR_FALSE;
+  *aResult = false;
   prefBranch->GetBoolPref("news.allow_delete_with_no_undo", aResult);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgNewsFolder::GetMessages(nsISimpleEnumerator **result)
 {
   nsresult rv = GetDatabase();
@@ -517,17 +517,17 @@ NS_IMETHODIMP nsMsgNewsFolder::CreateSub
   // Create an empty database for this mail folder, set its name from the user
   nsCOMPtr<nsIMsgDatabase> newsDBFactory;
   nsCOMPtr <nsIMsgDatabase> newsDB;
 
   //Now let's create the actual new folder
   rv = AddNewsgroup(NS_ConvertUTF16toUTF8(newsgroupName), EmptyCString(), getter_AddRefs(child));
 
   if (NS_SUCCEEDED(rv))
-    SetNewsrcHasChanged(PR_TRUE); // subscribe UI does this - but maybe we got here through auto-subscribe
+    SetNewsrcHasChanged(true); // subscribe UI does this - but maybe we got here through auto-subscribe
 
   if(NS_SUCCEEDED(rv) && child){
     nsCOMPtr <nsINntpIncomingServer> nntpServer;
     rv = GetNntpServer(getter_AddRefs(nntpServer));
     if (NS_FAILED(rv)) return rv;
 
     nsCAutoString dataCharset;
     rv = nntpServer->GetCharset(dataCharset);
@@ -560,25 +560,25 @@ NS_IMETHODIMP nsMsgNewsFolder::Delete()
     nsCOMPtr<nsILocalFile> summaryPath;
     rv = GetSummaryFileLocation(folderPath, getter_AddRefs(summaryPath));
     if (NS_SUCCEEDED(rv))
     {
       bool exists = false;
       rv = folderPath->Exists(&exists);
 
       if (NS_SUCCEEDED(rv) && exists)
-        rv = folderPath->Remove(PR_FALSE);
+        rv = folderPath->Remove(false);
 
       if (NS_FAILED(rv))
         NS_WARNING("Failed to remove News Folder");
 
       rv = summaryPath->Exists(&exists);
 
       if (NS_SUCCEEDED(rv) && exists)
-        rv = summaryPath->Remove(PR_FALSE);
+        rv = summaryPath->Remove(false);
 
       if (NS_FAILED(rv))
         NS_WARNING("Failed to remove News Folder Summary File");
     }
   }
 
   nsCOMPtr <nsINntpIncomingServer> nntpServer;
   rv = GetNntpServer(getter_AddRefs(nntpServer));
@@ -586,17 +586,17 @@ NS_IMETHODIMP nsMsgNewsFolder::Delete()
 
   nsAutoString name;
   rv = GetUnicodeName(name);
   NS_ENSURE_SUCCESS(rv,rv);
 
   rv = nntpServer->RemoveNewsgroup(name);
   NS_ENSURE_SUCCESS(rv,rv);
 
-  return SetNewsrcHasChanged(PR_TRUE);
+  return SetNewsrcHasChanged(true);
 }
 
 NS_IMETHODIMP nsMsgNewsFolder::Rename(const nsAString& newName, nsIMsgWindow *msgWindow)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsMsgNewsFolder::GetAbbreviatedName(nsAString& aAbbreviatedName)
@@ -731,17 +731,17 @@ nsMsgNewsFolder::UpdateSummaryFromNNTPIn
   if (oldest > 1)
   {
     nsCString oldSet;
     nsCString newSet;
     mReadSet->Output(getter_Copies(oldSet));
     mReadSet->AddRange(1, oldest - 1);
     mReadSet->Output(getter_Copies(newSet));
     if (!oldSet.Equals(newSet))
-      newsrcHasChanged = PR_TRUE;
+      newsrcHasChanged = true;
   }
 
   /* Now search the newsrc line and figure out how many of these messages are marked as unread. */
 
   /* make sure youngest is a least 1. MSNews seems to return a youngest of 0. */
   if (youngest == 0)
     youngest = 1;
 
@@ -816,30 +816,30 @@ nsMsgNewsFolder::DeleteMessages(nsIArray
     nsCOMPtr<nsIMsgFolderNotificationService> notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
     if (notifier)
       notifier->NotifyMsgsDeleted(messages);
   }
 
   rv = GetDatabase();
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = EnableNotifications(allMessageCountNotifications, PR_FALSE, PR_TRUE);
+  rv = EnableNotifications(allMessageCountNotifications, false, true);
   if (NS_SUCCEEDED(rv))
   {
     PRUint32 count = 0;
     rv = messages->GetLength(&count);
     NS_ENSURE_SUCCESS(rv, rv);
 
     for (PRUint32 i = 0; i < count && NS_SUCCEEDED(rv); i++)
     {
       nsCOMPtr<nsIMsgDBHdr> msgHdr = do_QueryElementAt(messages, i, &rv);
       if (msgHdr)
-        rv = mDatabase->DeleteHeader(msgHdr, nsnull, PR_TRUE, PR_TRUE);
+        rv = mDatabase->DeleteHeader(msgHdr, nsnull, true, true);
     }
-    EnableNotifications(allMessageCountNotifications, PR_TRUE, PR_TRUE);
+    EnableNotifications(allMessageCountNotifications, true, true);
   }
  
   if (!isMove) 
     NotifyFolderEvent(NS_SUCCEEDED(rv) ? mDeleteOrMoveMsgCompletedAtom :
       mDeleteOrMoveMsgFailedAtom);
 
   return NS_OK;
 }
@@ -887,22 +887,22 @@ NS_IMETHODIMP nsMsgNewsFolder::CancelMes
   NS_ENSURE_SUCCESS(rv,rv);
 
   return nntpService->CancelMessage(cancelURL.get(), messageURI.get(), nsnull /* consumer */, nsnull, 
                                     aMsgWindow, nsnull);
 }
 
 NS_IMETHODIMP nsMsgNewsFolder::GetNewMessages(nsIMsgWindow *aMsgWindow, nsIUrlListener *aListener)
 {
-  return GetNewsMessages(aMsgWindow, PR_FALSE, aListener);
+  return GetNewsMessages(aMsgWindow, false, aListener);
 }
 
 NS_IMETHODIMP nsMsgNewsFolder::GetNextNMessages(nsIMsgWindow *aMsgWindow)
 {
-  return GetNewsMessages(aMsgWindow, PR_TRUE, nsnull);
+  return GetNewsMessages(aMsgWindow, true, nsnull);
 }
 
 nsresult nsMsgNewsFolder::GetNewsMessages(nsIMsgWindow *aMsgWindow, bool aGetOld, nsIUrlListener *aUrlListener)
 {
   nsresult rv = NS_OK;
 
   bool isNewsServer = false;
   rv = GetIsServer(&isNewsServer);
@@ -1013,17 +1013,17 @@ nsMsgNewsFolder::HandleNewsrcLine(const 
   // previous versions of Communicator also dumped
   // the escaped version into the newsrc file
   //
   // So lines like this in a newsrc file should be ignored:
   // 3746EF3F.6080309@netscape.com:
   // 3746EF3F.6080309%40netscape.com:
   if (PL_strchr(line, '@') || PL_strstr(line, "%40"))
     // skipping, it contains @ or %40
-    subscribed = PR_FALSE;
+    subscribed = false;
 
   if (subscribed)
   {
     // we're subscribed, so add it
     nsCOMPtr <nsIMsgFolder> child;
 
     rv = AddNewsgroup(Substring(line, s), nsDependentCString(setStr), getter_AddRefs(child));
     if (NS_FAILED(rv)) return -1;
@@ -1307,17 +1307,17 @@ NS_IMETHODIMP nsMsgNewsFolder::MoveFolde
 
   NotifyItemAdded(aNewsgroupToMove);  
 
   // write changes back to file
   nsCOMPtr<nsINntpIncomingServer> nntpServer;
   rv = GetNntpServer(getter_AddRefs(nntpServer));
   NS_ENSURE_SUCCESS(rv,rv);
 
-  rv = nntpServer->SetNewsrcHasChanged(PR_TRUE);
+  rv = nntpServer->SetNewsrcHasChanged(true);
   NS_ENSURE_SUCCESS(rv,rv);
 
   rv = nntpServer->WriteNewsrcFile();
   NS_ENSURE_SUCCESS(rv,rv);
 
   return rv;
 }
 
@@ -1596,17 +1596,17 @@ nsMsgNewsFolder::GetOptionLines(nsACStri
 {
   optionLines = mOptionLines;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgNewsFolder::OnReadChanged(nsIDBChangeListener * aInstigator)
 {
-  return SetNewsrcHasChanged(PR_TRUE);
+  return SetNewsrcHasChanged(true);
 }
 
 NS_IMETHODIMP
 nsMsgNewsFolder::GetUnicodeName(nsAString& aName)
 {
   return GetName(aName);
 }
 
@@ -1668,21 +1668,21 @@ NS_IMETHODIMP nsMsgNewsFolder::RemoveMes
   nsCOMPtr<nsIMsgFolderNotificationService> notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
   if (notifier)
   {
     nsCOMPtr<nsIMsgDBHdr> msgHdr;
     rv = mDatabase->GetMsgHdrForKey(key, getter_AddRefs(msgHdr));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsIMutableArray> msgHdrs(do_CreateInstance(NS_ARRAY_CONTRACTID));
-    msgHdrs->AppendElement(msgHdr, PR_FALSE);
+    msgHdrs->AppendElement(msgHdr, false);
 
     notifier->NotifyMsgsDeleted(msgHdrs);
   }
-  return mDatabase->DeleteMessage(key, nsnull, PR_FALSE);
+  return mDatabase->DeleteMessage(key, nsnull, false);
 }
 
 NS_IMETHODIMP nsMsgNewsFolder::RemoveMessages(nsTArray<nsMsgKey> &aMsgKeys)
 {
   nsresult rv = GetDatabase();
   NS_ENSURE_SUCCESS(rv, rv); // if GetDatabase succeeds, mDatabase will be non-null
 
   // Notify listeners of a multiple message delete
@@ -1723,17 +1723,17 @@ NS_IMETHODIMP nsMsgNewsFolder::SetSaveAr
 {
   m_downloadMessageForOfflineUse = aBool;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgNewsFolder::DownloadAllForOffline(nsIUrlListener *listener, nsIMsgWindow *msgWindow)
 {
   nsTArray<nsMsgKey> srcKeyArray;
-  SetSaveArticleOffline(PR_TRUE);
+  SetSaveArticleOffline(true);
   nsresult rv;
 
   // build up message keys.
   if (mDatabase)
   {
     nsCOMPtr <nsISimpleEnumerator> enumerator;
     rv = mDatabase->EnumerateMessages(getter_AddRefs(enumerator));
     if (NS_SUCCEEDED(rv) && enumerator)
@@ -1754,24 +1754,24 @@ NS_IMETHODIMP nsMsgNewsFolder::DownloadA
             srcKeyArray.AppendElement(msgKey);
         }
       }
     }
   }
   DownloadNewsArticlesToOfflineStore *downloadState = new DownloadNewsArticlesToOfflineStore(msgWindow, mDatabase, this);
   if (!downloadState)
     return NS_ERROR_OUT_OF_MEMORY;
-  m_downloadingMultipleMessages = PR_TRUE;
+  m_downloadingMultipleMessages = true;
   return downloadState->DownloadArticles(msgWindow, this, &srcKeyArray);
 }
 
 NS_IMETHODIMP nsMsgNewsFolder::DownloadMessagesForOffline(nsIArray *messages, nsIMsgWindow *window)
 {
   nsTArray<nsMsgKey> srcKeyArray;
-  SetSaveArticleOffline(PR_TRUE); // ### TODO need to clear this when we've finished
+  SetSaveArticleOffline(true); // ### TODO need to clear this when we've finished
   PRUint32 count = 0;
   PRUint32 i;
   nsresult rv = messages->GetLength(&count);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // build up message keys.
   for (i = 0; i < count; i++)
   {
@@ -1780,17 +1780,17 @@ NS_IMETHODIMP nsMsgNewsFolder::DownloadM
     if (msgDBHdr)
       rv = msgDBHdr->GetMessageKey(&key);
     if (NS_SUCCEEDED(rv))
       srcKeyArray.AppendElement(key);
   }
   DownloadNewsArticlesToOfflineStore *downloadState = new DownloadNewsArticlesToOfflineStore(window, mDatabase, this);
   if (!downloadState)
     return NS_ERROR_OUT_OF_MEMORY;
-  m_downloadingMultipleMessages = PR_TRUE;
+  m_downloadingMultipleMessages = true;
   return downloadState->DownloadArticles(window, this, &srcKeyArray);
 }
 
 // line does not have a line terminator (e.g., CR or CRLF)
 NS_IMETHODIMP nsMsgNewsFolder::NotifyDownloadedLine(const char *line, nsMsgKey keyOfArticle)
 {
   nsresult rv = NS_OK;
   if (m_downloadMessageForOfflineUse)
@@ -1859,17 +1859,17 @@ NS_IMETHODIMP nsMsgNewsFolder::Compact(n
   if (mDatabase)
     ApplyRetentionSettings();
   return rv;
 }
 
 NS_IMETHODIMP
 nsMsgNewsFolder::ApplyRetentionSettings()
 {
-  return nsMsgDBFolder::ApplyRetentionSettings(PR_FALSE);
+  return nsMsgDBFolder::ApplyRetentionSettings(false);
 }
 
 NS_IMETHODIMP nsMsgNewsFolder::GetMessageIdForKey(nsMsgKey key, nsACString& result)
 {
   nsresult rv = GetDatabase();
   if (!mDatabase)
     return rv;
   nsCOMPtr <nsIMsgDBHdr> hdr;
@@ -1905,17 +1905,17 @@ NS_IMETHODIMP nsMsgNewsFolder::Shutdown(
   if (mFilterList)
   {
     // close the filter log stream
     nsresult rv = mFilterList->SetLogStream(nsnull);
     NS_ENSURE_SUCCESS(rv,rv);
     mFilterList = nsnull;
   }
 
-  mInitialized = PR_FALSE;
+  mInitialized = false;
   if (mReadSet) {
     // the nsINewsDatabase holds a weak ref to the readset,
     // and we outlive the db, so it's safe to delete it here.
     nsCOMPtr<nsINewsDatabase> db = do_QueryInterface(mDatabase);
     if (db)
       db->SetReadSet(nsnull);
     delete mReadSet;
     mReadSet = nsnull;
@@ -2006,11 +2006,11 @@ nsMsgNewsFolder::SetEditableFilterList(n
 NS_IMETHODIMP
 nsMsgNewsFolder::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode)
 {
  if (m_tempMessageStream)
   {
     m_tempMessageStream->Close();
     m_tempMessageStream = nsnull;
   }
-  m_downloadingMultipleMessages = PR_FALSE;
+  m_downloadingMultipleMessages = false;
   return nsMsgDBFolder::OnStopRunningUrl(aUrl, aExitCode);
 }
--- a/mailnews/news/src/nsNntpIncomingServer.cpp
+++ b/mailnews/news/src/nsNntpIncomingServer.cpp
@@ -95,22 +95,22 @@
 #include "nsMsgUtils.h"
 
 /**
  * A comparator class to do cases insensitive comparisons for nsTArray.Sort()
  */
 class nsCStringLowerCaseComparator
 {
 public:
-  PRBool Equals(const nsCString &a, const nsCString &b) const
+  bool Equals(const nsCString &a, const nsCString &b) const
   {
     return a.Equals(b, nsCaseInsensitiveCStringComparator());
   }
 
-  PRBool LessThan(const nsCString &a, const nsCString &b) const
+  bool LessThan(const nsCString &a, const nsCString &b) const
   {
     return Compare(a, b, nsCaseInsensitiveCStringComparator());
   }
 };
 
 static NS_DEFINE_CID(kSubscribableServerCID, NS_SUBSCRIBABLESERVER_CID);
 
 NS_IMPL_ADDREF_INHERITED(nsNntpIncomingServer, nsMsgIncomingServer)
@@ -120,35 +120,35 @@ NS_INTERFACE_MAP_BEGIN(nsNntpIncomingSer
     NS_INTERFACE_MAP_ENTRY(nsINntpIncomingServer)
     NS_INTERFACE_MAP_ENTRY(nsIUrlListener)
     NS_INTERFACE_MAP_ENTRY(nsISubscribableServer)
     NS_INTERFACE_MAP_ENTRY(nsITreeView)
 NS_INTERFACE_MAP_END_INHERITING(nsMsgIncomingServer)
 
 nsNntpIncomingServer::nsNntpIncomingServer()
 {
-  mNewsrcHasChanged = PR_FALSE;
+  mNewsrcHasChanged = false;
 
-  mHostInfoLoaded = PR_FALSE;
-  mHostInfoHasChanged = PR_FALSE;
+  mHostInfoLoaded = false;
+  mHostInfoHasChanged = false;
   mVersion = INVALID_VERSION;
 
   mLastGroupDate = 0;
   mUniqueId = 0;
-  mHasSeenBeginGroups = PR_FALSE;
-  mPostingAllowed = PR_FALSE;
-  m_userAuthenticated = PR_FALSE;
+  mHasSeenBeginGroups = false;
+  mPostingAllowed = false;
+  m_userAuthenticated = false;
   mLastUpdatedTime = 0;
 
   // these atoms are used for subscribe search
   mSubscribedAtom = MsgGetAtom("subscribed");
   mNntpAtom = MsgGetAtom("nntp");
 
   // we have server wide and per group filters
-  m_canHaveFilters = PR_TRUE;
+  m_canHaveFilters = true;
 
   SetupNewsrcSaveTimer();
 }
 
 nsNntpIncomingServer::~nsNntpIncomingServer()
 {
     nsresult rv;
 
@@ -410,17 +410,17 @@ nsNntpIncomingServer::WriteNewsrcFile()
                         newsrcStream->Write(newsrcLine.get(), newsrcLine.Length(), &bytesWritten);
                     }
                 }
             }
         }
 
         newsrcStream->Close();
 
-        rv = SetNewsrcHasChanged(PR_FALSE);
+        rv = SetNewsrcHasChanged(false);
         if (NS_FAILED(rv)) return rv;
     }
 #ifdef DEBUG_NEWS
     else {
         printf("no need to write newsrc file for %s, it was not dirty\n", (hostname.get()));
     }
 #endif /* DEBUG_NEWS */
 
@@ -501,17 +501,17 @@ nsNntpIncomingServer::ConnectionTimeOut(
     LL_SUB(t, elapsedTime, cacheTimeoutLimits);
     if (LL_GE_ZERO(t))
     {
 #ifdef DEBUG_seth
       printf("XXX connection timed out, close it, and remove it from the connection cache\n");
 #endif
       aConnection->CloseConnection();
       mConnectionCache.RemoveObject(aConnection);
-      retVal = PR_TRUE;
+      retVal = true;
     }
     return retVal;
 }
 
 
 nsresult
 nsNntpIncomingServer::CreateProtocolInstance(nsINNTPProtocol ** aNntpConnection, nsIURI *url,
                                              nsIMsgWindow *aMsgWindow)
@@ -574,17 +574,17 @@ nsNntpIncomingServer::GetNntpConnection(
     connection = nsnull;
     // We have one less connection, since we closed this one.
     --cnt;
   }
 
   if (connection)
   {
     NS_IF_ADDREF(*aNntpConnection = connection);
-    connection->SetIsCachedConnection(PR_TRUE);
+    connection->SetIsCachedConnection(true);
   }
   else if (cnt < maxConnections)
   {
     // We have room for another connection. Create this connection and return
     // it to the caller.
     rv = CreateProtocolInstance(aNntpConnection, aUri, aMsgWindow);
     NS_ENSURE_SUCCESS(rv, rv);
   }
@@ -736,17 +736,17 @@ nsNntpIncomingServer::PerformBiff(nsIMsg
   // (e.g., there is a lot of high-traffic newsgroups), the better option is to
   // just ignore biff.
   return PerformExpand(aMsgWindow);
 }
 
 NS_IMETHODIMP nsNntpIncomingServer::GetServerRequiresPasswordForBiff(bool *aServerRequiresPasswordForBiff)
 {
   NS_ENSURE_ARG_POINTER(aServerRequiresPasswordForBiff);
-  *aServerRequiresPasswordForBiff = PR_FALSE;  // for news, biff is getting the unread counts
+  *aServerRequiresPasswordForBiff = false;  // for news, biff is getting the unread counts
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::OnStartRunningUrl(nsIURI *url)
 {
   return NS_OK;
 }
@@ -806,19 +806,19 @@ nsNntpIncomingServer::SubscribeToNewsgro
 bool
 writeGroupToHostInfoFile(nsCString &aElement, void *aData)
 {
     nsIOutputStream *stream;
     stream = (nsIOutputStream *)aData;
     NS_ASSERTION(stream, "no stream");
     if (!stream) {
         // stop, something is bad.
-        return PR_FALSE;
+        return false;
     }
-    return PR_TRUE;
+    return true;
 }
 
 void nsNntpIncomingServer::WriteLine(nsIOutputStream *stream, nsCString &str)
 {
   PRUint32 bytesWritten;
   str.Append(MSG_LINEBREAK);
   stream->Write(str.get(), str.Length(), &bytesWritten);
 }
@@ -874,26 +874,26 @@ nsNntpIncomingServer::WriteHostInfoFile(
   {
     PRUint32 bytesWritten;
     hostInfoStream->Write(mGroupsOnServer[i].get(), mGroupsOnServer[i].Length(),
                           &bytesWritten);
     hostInfoStream->Write(MSG_LINEBREAK, MSG_LINEBREAK_LEN, &bytesWritten);
   }
 
   hostInfoStream->Close();
-  mHostInfoHasChanged = PR_FALSE;
+  mHostInfoHasChanged = false;
   return NS_OK;
 }
 
 nsresult
 nsNntpIncomingServer::LoadHostInfoFile()
 {
   nsresult rv;
   // we haven't loaded it yet
-  mHostInfoLoaded = PR_FALSE;
+  mHostInfoLoaded = false;
 
   rv = GetLocalPath(getter_AddRefs(mHostInfoFile));
   if (NS_FAILED(rv)) return rv;
   if (!mHostInfoFile) return NS_ERROR_FAILURE;
 
   rv = mHostInfoFile->AppendNative(NS_LITERAL_CSTRING(HOSTINFO_FILE_NAME));
   if (NS_FAILED(rv)) return rv;
 
@@ -916,17 +916,17 @@ nsNntpIncomingServer::LoadHostInfoFile()
 
   while (more && NS_SUCCEEDED(rv))
   {
     lineInputStream->ReadLine(line, &more);
     if (line.IsEmpty())
       continue;
     HandleLine(line.get(), line.Length());
   }
-  mHasSeenBeginGroups = PR_FALSE;
+  mHasSeenBeginGroups = false;
   fileStream->Close();
 
   return UpdateSubscribed();
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::StartPopulatingWithUri(nsIMsgWindow *aMsgWindow, bool aForceToServer, const char *uri)
 {
@@ -967,37 +967,37 @@ nsNntpIncomingServer::StartPopulating(ns
   NS_ENSURE_SUCCESS(rv,rv);
 
   rv = mInner->StartPopulating(aMsgWindow, aForceToServer, aGetOnlyNew);
   NS_ENSURE_SUCCESS(rv,rv);
 
   rv = SetDelimiter(NEWS_DELIMITER);
   if (NS_FAILED(rv)) return rv;
 
-  rv = SetShowFullName(PR_TRUE);
+  rv = SetShowFullName(true);
   if (NS_FAILED(rv)) return rv;
 
   nsCOMPtr<nsINntpService> nntpService = do_GetService(NS_NNTPSERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
 
-  mHostInfoLoaded = PR_FALSE;
+  mHostInfoLoaded = false;
   mVersion = INVALID_VERSION;
   mGroupsOnServer.Clear();
   mGetOnlyNew = aGetOnlyNew;
 
   if (!aForceToServer) {
   rv = LoadHostInfoFile();
     if (NS_FAILED(rv)) return rv;
   }
 
   // mHostInfoLoaded can be false if we failed to load anything
   if (aForceToServer || !mHostInfoLoaded || (mVersion != VALID_VERSION)) {
     // set these to true, so when we are done and we call WriteHostInfoFile()
     // we'll write out to hostinfo.dat
-  mHostInfoHasChanged = PR_TRUE;
+  mHostInfoHasChanged = true;
   mVersion = VALID_VERSION;
 
   mGroupsOnServer.Clear();
   rv = nntpService->GetListOfGroupsOnServer(this, aMsgWindow, aGetOnlyNew);
   if (NS_FAILED(rv)) return rv;
   }
   else {
   rv = StopPopulating(aMsgWindow);
@@ -1029,17 +1029,17 @@ nsNntpIncomingServer::AddNewsgroupToList
 #ifdef DEBUG_jungshik
     NS_ASSERTION(NS_SUCCEEDED(rv), "newsgroup name conversion failed");
 #endif
     if (NS_FAILED(rv)) {
         CopyASCIItoUTF16(nsDependentCString(aName), newsgroupName);
     }
 
     rv = AddTo(NS_ConvertUTF16toUTF8(newsgroupName),
-               PR_FALSE, PR_TRUE, PR_TRUE);
+               false, true, true);
     if (NS_FAILED(rv)) return rv;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::SetIncomingServer(nsIMsgIncomingServer *aServer)
 {
     nsresult rv = EnsureInner();
@@ -1225,22 +1225,22 @@ nsNntpIncomingServer::Unsubscribe(const 
                                    getter_AddRefs(newsgroupFolder));
 
   if (NS_FAILED(rv))
     return rv;
 
   if (!newsgroupFolder)
     return NS_ERROR_FAILURE;
 
-  rv = serverFolder->PropagateDelete(newsgroupFolder, PR_TRUE /* delete storage */, nsnull);
+  rv = serverFolder->PropagateDelete(newsgroupFolder, true /* delete storage */, nsnull);
   if (NS_FAILED(rv))
     return rv;
 
   // since we've unsubscribed to a newsgroup, the newsrc needs to be written out
-  rv = SetNewsrcHasChanged(PR_TRUE);
+  rv = SetNewsrcHasChanged(true);
   if (NS_FAILED(rv))
     return rv;
 
   return NS_OK;
 }
 
 PRInt32
 nsNntpIncomingServer::HandleLine(const char* line, PRUint32 line_size)
@@ -1257,27 +1257,27 @@ nsNntpIncomingServer::HandleLine(const c
     // with v2 hostinfo files, the additional data fields are removed.
     char *commaPos = (char *) PL_strchr(line,',');
     if (commaPos) *commaPos = 0;
 
         // newsrc entries are all in UTF-8
 #ifdef DEBUG_jungshik
     NS_ASSERTION(MsgIsUTF8(nsDependentCString(line)), "newsrc line is not utf-8");
 #endif
-    nsresult rv = AddTo(nsDependentCString(line), PR_FALSE, PR_TRUE, PR_TRUE);
+    nsresult rv = AddTo(nsDependentCString(line), false, true, true);
     NS_ASSERTION(NS_SUCCEEDED(rv),"failed to add line");
     if (NS_SUCCEEDED(rv)) {
       // since we've seen one group, we can claim we've loaded the
       // hostinfo file
-      mHostInfoLoaded = PR_TRUE;
+      mHostInfoLoaded = true;
     }
   }
   else {
     if (PL_strncmp(line,"begingroups", 11) == 0) {
-      mHasSeenBeginGroups = PR_TRUE;
+      mHasSeenBeginGroups = true;
     }
     char*equalPos = (char *) PL_strchr(line, '=');
     if (equalPos) {
       *equalPos++ = '\0';
       if (PL_strcmp(line, "lastgroupdate") == 0) {
         mLastUpdatedTime = strtoul(equalPos, nsnull, 10);
       } else if (PL_strcmp(line, "firstnewdate") == 0) {
         PRInt32 firstnewdate = strtol(equalPos, nsnull, 16);
@@ -1386,17 +1386,17 @@ nsNntpIncomingServer::GetChildren(const 
 
 NS_IMETHODIMP
 nsNntpIncomingServer::CommitSubscribeChanges()
 {
     nsresult rv;
 
     // we force the newrc to be dirty, so it will get written out when
     // we call WriteNewsrcFile()
-    rv = SetNewsrcHasChanged(PR_TRUE);
+    rv = SetNewsrcHasChanged(true);
     NS_ENSURE_SUCCESS(rv,rv);
     return WriteNewsrcFile();
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::ForgetPassword()
 {
     nsresult rv;
@@ -1466,17 +1466,17 @@ nsNntpIncomingServer::AddExtension(const
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::QueryExtension(const char *extension, bool *result)
 {
 #ifdef DEBUG_seth
   printf("no extension support yet\n");
 #endif
-  *result = PR_FALSE;
+  *result = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::GetPostingAllowed(bool *aPostingAllowed)
 {
   *aPostingAllowed = mPostingAllowed;
   return NS_OK;
@@ -1638,17 +1638,17 @@ nsNntpIncomingServer::SetPrettyNameForGr
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::GetCanSearchMessages(bool *canSearchMessages)
 {
     NS_ENSURE_ARG_POINTER(canSearchMessages);
-    *canSearchMessages = PR_TRUE;
+    *canSearchMessages = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::GetOfflineSupportLevel(PRInt32 *aSupportLevel)
 {
     NS_ENSURE_ARG_POINTER(aSupportLevel);
     nsresult rv;
@@ -1668,27 +1668,27 @@ nsNntpIncomingServer::GetDefaultCopiesAn
 
     /**
      * When a news account is created, the copies and folder prefs for the
      * associated identity don't point to folders on the server.
      * This makes sense, since there is no "Drafts" folder on a news server.
      * They'll point to the ones on "Local Folders"
      */
 
-    *aCopiesAndFoldersOnServer = PR_FALSE;
+    *aCopiesAndFoldersOnServer = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::GetCanCreateFoldersOnServer(bool *aCanCreateFoldersOnServer)
 {
     NS_ENSURE_ARG_POINTER(aCanCreateFoldersOnServer);
 
     // No folder creation on news servers. Return false.
-    *aCanCreateFoldersOnServer = PR_FALSE;
+    *aCanCreateFoldersOnServer = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::SetSearchValue(const nsAString &searchValue)
 {
   mSearchValue = searchValue;
 
@@ -1715,17 +1715,17 @@ nsNntpIncomingServer::SetSearchValue(con
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::GetSupportsSubscribeSearch(bool *retVal)
 {
-    *retVal = PR_TRUE;
+    *retVal = true;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::GetRowCount(PRInt32 *aRowCount)
 {
     *aRowCount = mSubscribeSearchResult.Length();
     return NS_OK;
@@ -1785,17 +1785,17 @@ NS_IMETHODIMP
 nsNntpIncomingServer::GetColumnProperties(nsITreeColumn* col, nsISupportsArray *properties)
 {
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::IsContainer(PRInt32 index, bool *_retval)
 {
-    *_retval = PR_FALSE;
+    *_retval = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::IsContainerOpen(PRInt32 index, bool *_retval)
 {
     return NS_ERROR_NOT_IMPLEMENTED;
 }
@@ -1804,17 +1804,17 @@ NS_IMETHODIMP
 nsNntpIncomingServer::IsContainerEmpty(PRInt32 index, bool *_retval)
 {
     return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::IsSeparator(PRInt32 index, bool *_retval)
 {
-    *_retval = PR_FALSE;
+    *_retval = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::IsSorted(bool *_retval)
 {
     return NS_ERROR_NOT_IMPLEMENTED;
 }
@@ -1965,24 +1965,24 @@ NS_IMETHODIMP
 nsNntpIncomingServer::CycleCell(PRInt32 row, nsITreeColumn* col)
 {
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::IsEditable(PRInt32 row, nsITreeColumn* col, bool *_retval)
 {
-    *_retval = PR_FALSE;
+    *_retval = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::IsSelectable(PRInt32 row, nsITreeColumn* col, bool *_retval)
 {
-    *_retval = PR_FALSE;
+    *_retval = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::SetCellValue(PRInt32 row, nsITreeColumn* col, const nsAString& value)
 {
     return NS_ERROR_NOT_IMPLEMENTED;
 }
@@ -2012,17 +2012,17 @@ nsNntpIncomingServer::PerformActionOnCel
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::GetCanFileMessagesOnServer(bool *aCanFileMessagesOnServer)
 {
     NS_ENSURE_ARG_POINTER(aCanFileMessagesOnServer);
 
     // No folder creation on news servers. Return false.
-    *aCanFileMessagesOnServer = PR_FALSE;
+    *aCanFileMessagesOnServer = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpIncomingServer::GetFilterScope(nsMsgSearchScopeValue *filterScope)
 {
    NS_ENSURE_ARG_POINTER(filterScope);
 
@@ -2113,17 +2113,17 @@ nsNntpIncomingServer::OnUserOrHostNameCh
 
   // 2. Remove file hostinfo.dat so that the new subscribe
   //    list will be reloaded from the new server.
   nsCOMPtr <nsILocalFile> hostInfoFile;
   rv = GetLocalPath(getter_AddRefs(hostInfoFile));
   NS_ENSURE_SUCCESS(rv, rv);
   rv = hostInfoFile->AppendNative(NS_LITERAL_CSTRING(HOSTINFO_FILE_NAME));
   NS_ENSURE_SUCCESS(rv, rv);
-  hostInfoFile->Remove(PR_FALSE);
+  hostInfoFile->Remove(false);
 
   // 3.Unsubscribe and then subscribe the existing groups to clean up the article numbers
   //   in the rc file (this is because the old and new servers may maintain different
   //   numbers for the same articles if both servers handle the same groups).
   nsCOMPtr <nsIMsgFolder> serverFolder;
   rv = GetRootMsgFolder(getter_AddRefs(serverFolder));
   NS_ENSURE_SUCCESS(rv,rv);
 
--- a/mailnews/news/src/nsNntpMockChannel.cpp
+++ b/mailnews/news/src/nsNntpMockChannel.cpp
@@ -85,17 +85,17 @@ NS_IMETHODIMP nsNntpMockChannel::GetName
   FORWARD_CALL(GetName, result)
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsNntpMockChannel::IsPending(bool *result)
 {
   FORWARD_CALL(IsPending, result)
   // We haven't been loaded yet, so we're still pending.
-  *result = PR_TRUE;
+  *result = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsNntpMockChannel::GetStatus(nsresult *status)
 {
   FORWARD_CALL(GetStatus, status)
   *status = m_cancelStatus;
   return NS_OK;
--- a/mailnews/news/src/nsNntpService.cpp
+++ b/mailnews/news/src/nsNntpService.cpp
@@ -91,18 +91,18 @@
 #undef GetPort  // XXX Windows!
 #undef SetPort  // XXX Windows!
 
 #define PREF_MAIL_ROOT_NNTP   "mail.root.nntp"        // old - for backward compatibility only
 #define PREF_MAIL_ROOT_NNTP_REL   "mail.root.nntp-rel"
 
 nsNntpService::nsNntpService()
 {
-  mPrintingOperation = PR_FALSE;
-  mOpenAttachmentOperation = PR_FALSE;
+  mPrintingOperation = false;
+  mOpenAttachmentOperation = false;
 }
 
 nsNntpService::~nsNntpService()
 {
   // do nothing
 }
 
 NS_IMPL_THREADSAFE_ADDREF(nsNntpService)
@@ -358,17 +358,17 @@ nsresult nsNntpService::GetMessageFromUr
     // treat this load as if it were a user click event. Then the dispatching stuff will be much
     // happier.
     if (mOpenAttachmentOperation)
     {
       docShell->CreateLoadInfo(getter_AddRefs(loadInfo));
       loadInfo->SetLoadType(nsIDocShellLoadInfo::loadLink);
     }
 
-    rv = docShell->LoadURI(aUrl, loadInfo, nsIWebNavigation::LOAD_FLAGS_NONE, PR_FALSE);
+    rv = docShell->LoadURI(aUrl, loadInfo, nsIWebNavigation::LOAD_FLAGS_NONE, false);
   }
   else
   {
     nsCOMPtr<nsIStreamListener> aStreamListener(do_QueryInterface(aDisplayConsumer, &rv));
     if (NS_SUCCEEDED(rv))
     {
       nsCOMPtr<nsIChannel> aChannel;
       nsCOMPtr<nsILoadGroup> aLoadGroup;
@@ -491,17 +491,17 @@ NS_IMETHODIMP nsNntpService::OpenAttachm
       msgUrl->RegisterListener(aUrlListener);
 
     nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(aDisplayConsumer, &rv));
     if (NS_SUCCEEDED(rv) && docShell)
     {
       nsCOMPtr<nsIDocShellLoadInfo> loadInfo;
       docShell->CreateLoadInfo(getter_AddRefs(loadInfo));
       loadInfo->SetLoadType(nsIDocShellLoadInfo::loadLink);
-      return docShell->LoadURI(url, loadInfo, nsIWebNavigation::LOAD_FLAGS_NONE, PR_FALSE);
+      return docShell->LoadURI(url, loadInfo, nsIWebNavigation::LOAD_FLAGS_NONE, false);
     }
     else
       return RunNewsUrl(url, aMsgWindow, aDisplayConsumer);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsNntpService::GetUrlForUri(const char *aMessageURI, nsIURI **aURL, nsIMsgWindow *aMsgWindow)
@@ -601,17 +601,17 @@ nsNntpService::GetFolderFromUri(const ch
   nsCAutoString path;
   rv = uri->GetPath(path);
   NS_ENSURE_SUCCESS(rv,rv);
 
   nsCOMPtr <nsIMsgAccountManager> accountManager = do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
 
   nsCOMPtr <nsIMsgIncomingServer> server;
-  rv = accountManager->FindServerByURI(uri, PR_FALSE, getter_AddRefs(server));
+  rv = accountManager->FindServerByURI(uri, false, getter_AddRefs(server));
   NS_ENSURE_SUCCESS(rv,rv);
 
   nsCOMPtr <nsIMsgFolder> rootFolder;
   rv = server->GetRootFolder(getter_AddRefs(rootFolder));
   NS_ENSURE_SUCCESS(rv,rv);
 
   // check if path is "/"
   // if so, use the root folder
@@ -671,35 +671,35 @@ struct findNewsServerEntry {
 
 
 bool
 nsNntpService::findNewsServerWithGroup(nsISupports *aElement, void *data)
 {
   nsresult rv;
 
   nsCOMPtr<nsINntpIncomingServer> newsserver = do_QueryInterface(aElement, &rv);
-  if (NS_FAILED(rv) || ! newsserver) return PR_TRUE;
+  if (NS_FAILED(rv) || ! newsserver) return true;
 
   findNewsServerEntry *entry = (findNewsServerEntry*) data;
 
   bool containsGroup = false;
   NS_ASSERTION(MsgIsUTF8(nsDependentCString(entry->newsgroup)),
                "newsgroup is not in UTF-8");
   rv = newsserver->ContainsNewsgroup(nsDependentCString(entry->newsgroup),
                                      &containsGroup);
-  if (NS_FAILED(rv)) return PR_TRUE;
+  if (NS_FAILED(rv)) return true;
 
   if (containsGroup)
   {
     entry->server = newsserver;
-    return PR_FALSE;            // stop on first find
+    return false;            // stop on first find
   }
   else
   {
-    return PR_TRUE;
+    return true;
   }
 }
 
 nsresult
 nsNntpService::FindServerWithNewsgroup(nsCString &host, nsCString &groupName)
 {
   nsresult rv;
 
@@ -1001,21 +1001,21 @@ nsNntpService::CreateNewsAccount(const c
   if (NS_FAILED(rv)) return rv;
 
   nsCOMPtr <nsIMsgIdentity> identity;
   rv = accountManager->CreateIdentity(getter_AddRefs(identity));
   if (NS_FAILED(rv)) return rv;
   if (!identity) return NS_ERROR_FAILURE;
 
   // by default, news accounts should be composing in plain text
-  rv = identity->SetComposeHtml(PR_FALSE);
+  rv = identity->SetComposeHtml(false);
   NS_ENSURE_SUCCESS(rv,rv);
 
   // the identity isn't filled in, so it is not valid.
-  rv = (*aServer)->SetValid(PR_FALSE);
+  rv = (*aServer)->SetValid(false);
   if (NS_FAILED(rv)) return rv;
 
   // hook them together
   rv = account->SetIncomingServer(*aServer);
   if (NS_FAILED(rv)) return rv;
   rv = account->AddIdentity(identity);
   if (NS_FAILED(rv)) return rv;
 
@@ -1063,17 +1063,17 @@ nsNntpService::GetServerForUri(nsIURI *a
 
   if (!server && !hostName.IsEmpty())
   {
     // If we don't have this server but it isn't no-auth, add it.
     // Ideally, we should remove this account quickly (see bug 41133)
     bool useSSL = false;
     if (scheme.EqualsLiteral("snews") || scheme.EqualsLiteral("nntps"))
     {
-      useSSL = PR_TRUE;
+      useSSL = true;
       if ((port == 0) || (port == -1))
           port = nsINntpUrl::DEFAULT_NNTPS_PORT;
     }
     rv = CreateNewsAccount(hostName.get(), useSSL, port, getter_AddRefs(server));
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   if (!server && hostName.IsEmpty())
@@ -1181,17 +1181,17 @@ NS_IMETHODIMP nsNntpService::GetNewNews(
     if (nntpUrl)
     {
       rv = nntpUrl->SetGetOldMessages(aGetOld);
       if (NS_FAILED(rv)) return rv;
     }
 
     nsCOMPtr<nsIMsgMailNewsUrl> mailNewsUrl = do_QueryInterface(aUrl);
     if (mailNewsUrl)
-      mailNewsUrl->SetUpdatingFolder(PR_TRUE);
+      mailNewsUrl->SetUpdatingFolder(true);
 
     rv = RunNewsUrl(aUrl, aMsgWindow, nsnull);
 
     if (_retval)
       NS_IF_ADDREF(*_retval = aUrl);
   }
   else
   {
@@ -1233,30 +1233,30 @@ NS_IMETHODIMP nsNntpService::GetScheme(n
   aScheme = "news";
   return NS_OK;
 }
 
 NS_IMETHODIMP nsNntpService::GetDefaultDoBiff(bool *aDoBiff)
 {
     NS_ENSURE_ARG_POINTER(aDoBiff);
     // by default, don't do biff for NNTP servers
-    *aDoBiff = PR_FALSE;
+    *aDoBiff = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP nsNntpService::GetDefaultPort(PRInt32 *aDefaultPort)
 {
     NS_ENSURE_ARG_POINTER(aDefaultPort);
     *aDefaultPort = nsINntpUrl::DEFAULT_NNTP_PORT;
     return NS_OK;
 }
 
 NS_IMETHODIMP nsNntpService::AllowPort(PRInt32 port, const char *scheme, bool *_retval)
 {
-    *_retval = PR_TRUE; // allow news on any port
+    *_retval = true; // allow news on any port
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpService::GetDefaultServerPort(bool aUseSSL, PRInt32 *aDefaultPort)
 {
     nsresult rv = NS_OK;
 
@@ -1362,88 +1362,88 @@ nsNntpService::GetServerIID(nsIID* *aSer
     *aServerIID = new nsIID(NS_GET_IID(nsINntpIncomingServer));
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpService::GetRequiresUsername(bool *aRequiresUsername)
 {
   NS_ENSURE_ARG_POINTER(aRequiresUsername);
-  *aRequiresUsername = PR_FALSE;
+  *aRequiresUsername = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpService::GetPreflightPrettyNameWithEmailAddress(bool *aPreflightPrettyNameWithEmailAddress)
 {
   NS_ENSURE_ARG_POINTER(aPreflightPrettyNameWithEmailAddress);
-  *aPreflightPrettyNameWithEmailAddress = PR_FALSE;
+  *aPreflightPrettyNameWithEmailAddress = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpService::GetCanLoginAtStartUp(bool *aCanLoginAtStartUp)
 {
   NS_ENSURE_ARG_POINTER(aCanLoginAtStartUp);
-  *aCanLoginAtStartUp = PR_TRUE;
+  *aCanLoginAtStartUp = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpService::GetCanDelete(bool *aCanDelete)
 {
   NS_ENSURE_ARG_POINTER(aCanDelete);
-  *aCanDelete = PR_TRUE;
+  *aCanDelete = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpService::GetCanDuplicate(bool *aCanDuplicate)
 {
   NS_ENSURE_ARG_POINTER(aCanDuplicate);
-  *aCanDuplicate = PR_TRUE;
+  *aCanDuplicate = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpService::GetCanGetMessages(bool *aCanGetMessages)
 {
     NS_ENSURE_ARG_POINTER(aCanGetMessages);
-    *aCanGetMessages = PR_FALSE;  // poorly named, this just means we don't have an inbox.
+    *aCanGetMessages = false;  // poorly named, this just means we don't have an inbox.
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpService::GetCanGetIncomingMessages(bool *aCanGetIncomingMessages)
 {
     NS_ENSURE_ARG_POINTER(aCanGetIncomingMessages);
-    // temporarily returns PR_FALSE because we don't yet support spam
+    // temporarily returns false because we don't yet support spam
     // filtering in news.  this will change.
-    *aCanGetIncomingMessages = PR_FALSE;
+    *aCanGetIncomingMessages = false;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpService::GetShowComposeMsgLink(bool *showComposeMsgLink)
 {
     NS_ENSURE_ARG_POINTER(showComposeMsgLink);
-    *showComposeMsgLink = PR_FALSE;
+    *showComposeMsgLink = false;
     return NS_OK;
 }
 
 //
 // rhp: Right now, this is the same as simple DisplayMessage, but it will change
 // to support print rendering.
 //
 NS_IMETHODIMP nsNntpService::DisplayMessageForPrinting(const char* aMessageURI, nsISupports * aDisplayConsumer,
                                                   nsIMsgWindow *aMsgWindow, nsIUrlListener * aUrlListener, nsIURI ** aURL)
 {
-  mPrintingOperation = PR_TRUE;
+  mPrintingOperation = true;
   nsresult rv = DisplayMessage(aMessageURI, aDisplayConsumer, aMsgWindow, aUrlListener, nsnull, aURL);
-  mPrintingOperation = PR_FALSE;
+  mPrintingOperation = false;
   return rv;
 }
 
 NS_IMETHODIMP
 nsNntpService::StreamMessage(const char *aMessageURI, nsISupports *aConsumer,
                               nsIMsgWindow *aMsgWindow,
                               nsIUrlListener *aUrlListener,
                               bool /* convertData */,
@@ -1503,17 +1503,17 @@ nsNntpService::StreamMessage(const char 
         rv = IsMsgInMemCache(url, folder, nsnull, &hasMsgOffline);
         NS_ENSURE_SUCCESS(rv, rv);
       }
 
       // Return with an error if we didn't find it in the memory cache either
       if (!hasMsgOffline)
         return NS_ERROR_FAILURE;
 
-      msgUrl->SetMsgIsInLocalCache(PR_TRUE);
+      msgUrl->SetMsgIsInLocalCache(true);
     }
 
     if (aURL)
       NS_IF_ADDREF(*aURL = url);
 
     return GetMessageFromUrl(url, aMsgWindow, aConsumer);
 }
 
@@ -1573,34 +1573,34 @@ NS_IMETHODIMP nsNntpService::StreamHeade
 
 NS_IMETHODIMP nsNntpService::IsMsgInMemCache(nsIURI *aUrl,
                                              nsIMsgFolder *aFolder,
                                              nsICacheEntryDescriptor **aCacheEntry,
                                              bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aUrl);
   NS_ENSURE_ARG_POINTER(aFolder);
-  *aResult = PR_FALSE;
+  *aResult = false;
 
   if (mCacheSession)
   {
     // check if message is in memory cache
     nsCAutoString cacheKey;
     aUrl->GetAsciiSpec(cacheKey);
     // nntp urls are truncated at the query part when used as cache keys
     PRInt32 pos = cacheKey.FindChar('?');
     if (pos != -1)
       cacheKey.SetLength(pos);
 
     nsCOMPtr<nsICacheEntryDescriptor> cacheEntry;
     if (NS_SUCCEEDED(mCacheSession->OpenCacheEntry(cacheKey,
-                     nsICache::ACCESS_READ, PR_FALSE,
+                     nsICache::ACCESS_READ, false,
                      getter_AddRefs(cacheEntry))))
     {
-      *aResult = PR_TRUE;
+      *aResult = true;
       if (aCacheEntry)
         NS_IF_ADDREF(*aCacheEntry = cacheEntry);
     }
   }
 
   return NS_OK;
 }
 
@@ -1663,26 +1663,26 @@ nsNntpService::GetListOfGroupsOnServer(n
 NS_IMETHODIMP
 nsNntpService::Handle(nsICommandLine* aCmdLine)
 {
   NS_ENSURE_ARG_POINTER(aCmdLine);
 
   nsresult rv;
   bool found;
 
-  rv = aCmdLine->HandleFlag(NS_LITERAL_STRING("news"), PR_FALSE, &found);
+  rv = aCmdLine->HandleFlag(NS_LITERAL_STRING("news"), false, &found);
   if (NS_SUCCEEDED(rv) && found) {
     nsCOMPtr<nsIWindowWatcher> wwatch (do_GetService(NS_WINDOWWATCHER_CONTRACTID));
     NS_ENSURE_TRUE(wwatch, NS_ERROR_FAILURE);
 
     nsCOMPtr<nsIDOMWindow> opened;
     wwatch->OpenWindow(nsnull, "chrome://messenger/content/", "_blank",
                        "chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar",
                        nsnull, getter_AddRefs(opened));
-    aCmdLine->SetPreventDefault(PR_TRUE);
+    aCmdLine->SetPreventDefault(true);
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpService::GetHelpInfo(nsACString& aResult)
 {
@@ -1800,15 +1800,15 @@ NS_IMETHODIMP nsNntpService::GetCacheSes
   nsresult rv = NS_OK;
   if (!mCacheSession)
   {
     nsCOMPtr<nsICacheService> serv = do_GetService(NS_CACHESERVICE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = serv->CreateSession("NNTP-memory-only", nsICache::STORE_IN_MEMORY, nsICache::STREAM_BASED, getter_AddRefs(mCacheSession));
     NS_ENSURE_SUCCESS(rv, rv);
-    rv = mCacheSession->SetDoomEntriesIfExpired(PR_FALSE);
+    rv = mCacheSession->SetDoomEntriesIfExpired(false);
   }
 
   *result = mCacheSession;
   NS_IF_ADDREF(*result);
   return rv;
 }
--- a/mailnews/news/src/nsNntpUrl.cpp
+++ b/mailnews/news/src/nsNntpUrl.cpp
@@ -60,20 +60,20 @@
 #include "nsIMsgAccountManager.h"
 #include "nsServiceManagerUtils.h"
 
 
 nsNntpUrl::nsNntpUrl()
 {
   m_newsgroupPost = nsnull;
   m_newsAction = nsINntpUrl::ActionUnknown;
-  m_addDummyEnvelope = PR_FALSE;
-  m_canonicalLineEnding = PR_FALSE;
+  m_addDummyEnvelope = false;
+  m_canonicalLineEnding = false;
   m_filePath = nsnull;
-  m_getOldMessages = PR_FALSE;
+  m_getOldMessages = false;
   m_key = nsMsgKey_None;
 }
 
 nsNntpUrl::~nsNntpUrl()
 {
 }
 
 NS_IMPL_ADDREF_INHERITED(nsNntpUrl, nsMsgMailNewsUrl)
@@ -426,17 +426,17 @@ NS_IMETHODIMP nsNntpUrl::IsUrlType(PRUin
   NS_ENSURE_ARG(isType);
 
   switch(type)
   {
     case nsIMsgMailNewsUrl::eDisplay:
       *isType = (m_newsAction == nsINntpUrl::ActionFetchArticle);
       break;
     default:
-      *isType = PR_FALSE;
+      *isType = false;
   };
 
   return NS_OK;
 
 }
 
 NS_IMETHODIMP
 nsNntpUrl::GetOriginalSpec(char **aSpec)
--- a/suite/feeds/src/nsFeedSniffer.cpp
+++ b/suite/feeds/src/nsFeedSniffer.cpp
@@ -126,25 +126,25 @@ StringBeginsWithLowercaseLiteral(nsAStri
 {
   return StringHead(aString, N).LowerCaseEqualsLiteral(aSubstring);
 }
 
 bool
 HasAttachmentDisposition(nsIHttpChannel* httpChannel)
 {
   if (!httpChannel)
-    return PR_FALSE;
+    return false;
 
   PRUint32 disp;
   nsresult rv = httpChannel->GetContentDisposition(&disp);
 
   if (NS_SUCCEEDED(rv) && disp == nsIChannel::DISPOSITION_ATTACHMENT)
-    return PR_TRUE;
+    return true;
 
-  return PR_FALSE;
+  return false;
 }
 
 /**
  * @return the first occurrence of a character within a string buffer,
  *         or nsnull if not found
  */
 inline const char*
 FindChar(char c, const char *begin, const char *end)
@@ -162,63 +162,63 @@ FindChar(char c, const char *begin, cons
  * another type, e.g. a HTML document, and we don't want to show the preview
  * page if the document isn't actually a feed.
  *
  * @param   start
  *          The beginning of the data being sniffed
  * @param   end
  *          The end of the data being sniffed, right before the substring that
  *          was found.
- * @returns PR_TRUE if the found substring is the documentElement, PR_FALSE
+ * @returns true if the found substring is the documentElement, false
  *          otherwise.
  */
 static bool
 IsDocumentElement(const char *start, const char* end)
 {
   // For every tag in the buffer, check to see if it's a PI, Doctype or
   // comment, our desired substring or something invalid.
   while ( (start = FindChar('<', start, end)) ) {
     ++start;
     if (start >= end)
-      return PR_FALSE;
+      return false;
 
     // Check to see if the character following the '<' is either '?' or '!'
     // (processing instruction or doctype or comment)... these are valid nodes
     // to have in the prologue.
     if (*start != '?' && *start != '!')
-      return PR_FALSE;
+      return false;
 
     // Now advance the iterator until the '>' (We do this because we don't want
     // to sniff indicator substrings that are embedded within other nodes, e.g.
     // comments: <!-- <rdf:RDF .. > -->
     start = FindChar('>', start, end);
     if (!start)
-      return PR_FALSE;
+      return false;
 
     ++start;
   }
-  return PR_TRUE;
+  return true;
 }
 
 /**
  * Determines whether or not a string exists as the root element in an XML data
  * string buffer.
  * @param   dataString
  *          The data being sniffed
  * @param   substring
  *          The substring being tested for existence and root-ness.
- * @returns PR_TRUE if the substring exists and is the documentElement, PR_FALSE
+ * @returns true if the substring exists and is the documentElement, false
  *          otherwise.
  */
 static bool
 ContainsTopLevelSubstring(nsACString& dataString, const char *substring)
 {
   PRInt32 offset = dataString.Find(substring);
   if (offset == -1)
-    return PR_FALSE;
+    return false;
 
   const char *begin = dataString.BeginReading();
 
   // Only do the validation when we find the substring.
   return IsDocumentElement(begin, begin + offset);
 }
 
 NS_IMETHODIMP
@@ -281,17 +281,17 @@ nsFeedSniffer::GetMIMETypeFromContent(ns
     if(HasAttachmentDisposition(channel)) {
       sniffedType.Truncate();
       return NS_OK;
     }
 
     // set the feed header as a response header, since we have good metadata
     // telling us that the feed is supposed to be RSS or Atom
     channel->SetResponseHeader(NS_LITERAL_CSTRING("X-Moz-Is-Feed"),
-                               NS_LITERAL_CSTRING("1"), PR_FALSE);
+                               NS_LITERAL_CSTRING("1"), false);
     sniffedType.AssignLiteral(TYPE_MAYBE_FEED);
     return NS_OK;
   }
 
   // Don't sniff arbitrary types.  Limit sniffing to situations that
   // we think can reasonably arise.
   if (!contentType.EqualsLiteral(TEXT_HTML) &&
       !contentType.EqualsLiteral(APPLICATION_OCTET_STREAM) &&
--- a/suite/profile/migration/src/nsNetscapeProfileMigratorBase.cpp
+++ b/suite/profile/migration/src/nsNetscapeProfileMigratorBase.cpp
@@ -94,34 +94,34 @@ nsNetscapeProfileMigratorBase::GetSource
   GetSourceProfiles(getter_AddRefs(profiles));
 
   if (profiles) {
     PRUint32 count;
     profiles->GetLength(&count);
     *aResult = count > 0;
   }
   else
-    *aResult = PR_FALSE;
+    *aResult = false;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNetscapeProfileMigratorBase::GetSourceHasMultipleProfiles(bool* aResult)
 {
   nsCOMPtr<nsIArray> profiles;
   GetSourceProfiles(getter_AddRefs(profiles));
 
   if (profiles) {
     PRUint32 count;
     profiles->GetLength(&count);
     *aResult = count > 1;
   }
   else
-    *aResult = PR_FALSE;
+    *aResult = false;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNetscapeProfileMigratorBase::GetSourceProfiles(nsIArray** aResult)
 {
   if (!mProfileNames && !mProfileLocations) {
@@ -270,17 +270,17 @@ nsNetscapeProfileMigratorBase::SetFile(P
     nsCOMPtr<nsIFile> aFile;
     // Start off by assuming fileURL is a URL spec and
     // try and get a File from it.
     rv = NS_GetFileFromURLSpec(fileURL, getter_AddRefs(aFile));
     if (NS_FAILED(rv)) {
       // Okay it wasn't a URL spec so assume it is a localfile,
       // if this fails then just don't set anything.
       nsCOMPtr<nsILocalFile> localFile;
-      rv = NS_NewNativeLocalFile(fileURL, PR_FALSE, getter_AddRefs(localFile));
+      rv = NS_NewNativeLocalFile(fileURL, false, getter_AddRefs(localFile));
       if (NS_FAILED(rv))
         return NS_OK;  
       aFile = localFile;
     }
     // Now test to see if File exists and is an actual file.
     bool exists = false;
     rv = aFile->Exists(&exists);
     if (NS_SUCCEEDED(rv) && exists)
@@ -372,17 +372,17 @@ nsNetscapeProfileMigratorBase::GetProfil
   nsINIParser parser;
   rv = parser.Init(profileIni);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCAutoString buffer, filePath;
   bool isRelative;
 
   unsigned int c = 0;
-  for (c = 0; PR_TRUE; ++c) {
+  for (c = 0; true; ++c) {
     nsCAutoString profileID("Profile");
     profileID.AppendInt(c);
 
     rv = parser.GetString(profileID.get(), "IsRelative", buffer);
     if (NS_FAILED(rv))
       break;
 
     isRelative = buffer.EqualsLiteral("1");
@@ -395,37 +395,37 @@ nsNetscapeProfileMigratorBase::GetProfil
 
     rv = parser.GetString(profileID.get(), "Name", buffer);
     if (NS_FAILED(rv)) {
       NS_ERROR("Malformed profiles.ini: Name= not found");
       continue;
     }
 
     nsCOMPtr<nsILocalFile> rootDir;
-    rv = NS_NewNativeLocalFile(EmptyCString(), PR_TRUE, getter_AddRefs(rootDir));
+    rv = NS_NewNativeLocalFile(EmptyCString(), true, getter_AddRefs(rootDir));
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (isRelative)
       rv = rootDir->SetRelativeDescriptor(aDataDir, filePath);
     else
       rv = rootDir->SetPersistentDescriptor(filePath);
 
     if (NS_FAILED(rv)) continue;
 
     bool exists;
     rootDir->Exists(&exists);
 
     if (exists) {
-      aProfileLocations->AppendElement(rootDir, PR_FALSE);
+      aProfileLocations->AppendElement(rootDir, false);
 
       nsCOMPtr<nsISupportsString> profileNameString(
         do_CreateInstance("@mozilla.org/supports-string;1"));
 
       profileNameString->SetData(NS_ConvertUTF8toUTF16(buffer));
-      aProfileNames->AppendElement(profileNameString, PR_FALSE);
+      aProfileNames->AppendElement(profileNameString, false);
     }
   }
   return NS_OK;
 }
 
 nsresult
 nsNetscapeProfileMigratorBase::CopyFile(const char* aSourceFileName,
                                         const char* aTargetFileName)
@@ -440,17 +440,17 @@ nsNetscapeProfileMigratorBase::CopyFile(
     return NS_OK;
 
   nsCOMPtr<nsIFile> targetFile;
   mTargetProfile->Clone(getter_AddRefs(targetFile));
   
   targetFile->AppendNative(nsDependentCString(aTargetFileName));
   targetFile->Exists(&exists);
   if (exists)
-    targetFile->Remove(PR_FALSE);
+    targetFile->Remove(false);
 
   return sourceFile->CopyToNative(mTargetProfile,
                                   nsDependentCString(aTargetFileName));
 }
 
 // helper function, copies the contents of srcDir into destDir.
 // destDir will be created if it doesn't exist.
 nsresult
@@ -627,17 +627,17 @@ nsNetscapeProfileMigratorBase::GetFileVa
   nsCString prefValue;
   nsCOMPtr<nsILocalFile> theFile;
   nsresult rv = aPrefBranch->GetCharPref(aRelPrefName, getter_Copies(prefValue));
   if (NS_SUCCEEDED(rv)) {
     // The pref has the format: [ProfD]a/b/c
     if (!StringBeginsWith(prefValue, NS_LITERAL_CSTRING("[ProfD]")))
       return NS_ERROR_FILE_NOT_FOUND;
 
-    rv = NS_NewNativeLocalFile(EmptyCString(), PR_TRUE, getter_AddRefs(theFile));
+    rv = NS_NewNativeLocalFile(EmptyCString(), true, getter_AddRefs(theFile));
     if (NS_FAILED(rv))
       return rv;
 
     rv = theFile->SetRelativeDescriptor(mSourceProfile, Substring(prefValue, 7));
     if (NS_FAILED(rv))
       return rv;
   } else {
     rv = aPrefBranch->GetComplexValue(aPrefName,
@@ -657,17 +657,17 @@ nsNetscapeProfileMigratorBase::CopyCooki
 {
   if (aReplace) {
     // can't start the cookieservice, so just push files around:
     // 1) remove target cookies.sqlite file if it exists, to force import
     // 2) copy source cookies.txt file, which will be imported on startup
     nsCOMPtr<nsIFile> targetFile;
     mTargetProfile->Clone(getter_AddRefs(targetFile));
     targetFile->AppendNative(NS_LITERAL_CSTRING(FILE_NAME_COOKIES_SQLITE));
-    targetFile->Remove(PR_FALSE);
+    targetFile->Remove(false);
 
     return CopyFile(FILE_NAME_COOKIES, FILE_NAME_COOKIES);
   }
 
   nsresult rv;
   nsCOMPtr<nsICookieManager2> cookieManager(do_GetService(NS_COOKIEMANAGER_CONTRACTID, &rv));
   if (NS_FAILED(rv)) 
     return rv;
@@ -717,17 +717,17 @@ nsNetscapeProfileMigratorBase::CopyUserS
   mTargetProfile->Clone(getter_AddRefs(targetUserContent));
   targetUserContent->Append(DIR_NAME_CHROME);
   nsCOMPtr<nsIFile> targetChromeDir;
   targetUserContent->Clone(getter_AddRefs(targetChromeDir));
   targetUserContent->AppendNative(nsDependentCString(aFileName));
 
   targetUserContent->Exists(&exists);
   if (exists)
-    targetUserContent->Remove(PR_FALSE);
+    targetUserContent->Remove(false);
 
   return sourceUserContent->CopyToNative(targetChromeDir,
                                          nsDependentCString(aFileName));
 }
 
 nsresult
 nsNetscapeProfileMigratorBase::GetSignonFileName(bool aReplace,
                                                  char** aFileName)
--- a/suite/profile/migration/src/nsNetscapeProfileMigratorBase.h
+++ b/suite/profile/migration/src/nsNetscapeProfileMigratorBase.h
@@ -65,20 +65,20 @@ struct fileTransactionEntry {
 #define FILE_NAME_USERCONTENT     "userContent.css"
 #define FILE_NAME_SEARCH          "search.rdf"
 #define DIR_NAME_SEARCH           "searchplugins"
 #define FILE_NAME_DOWNLOADS       "downloads.rdf"
 
 #define F(a) nsNetscapeProfileMigratorBase::a
 
 #define MAKEPREFTRANSFORM(pref, newpref, getmethod, setmethod) \
-  { pref, newpref, F(Get##getmethod), F(Set##setmethod), PR_FALSE, { -1 } }
+  { pref, newpref, F(Get##getmethod), F(Set##setmethod), false, { -1 } }
 
 #define MAKESAMETYPEPREFTRANSFORM(pref, method) \
-  { pref, 0, F(Get##method), F(Set##method), PR_FALSE, { -1 } }
+  { pref, 0, F(Get##method), F(Set##method), false, { -1 } }
 
 class nsNetscapeProfileMigratorBase : public nsISuiteProfileMigrator,
                                       public nsITimerCallback
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSITIMERCALLBACK
 
--- a/suite/profile/migration/src/nsProfileMigrator.cpp
+++ b/suite/profile/migration/src/nsProfileMigrator.cpp
@@ -198,17 +198,17 @@ nsProfileMigrator::GetSuiteMigratorKey(n
     //       InternalName           "iexplore"
     //   VarFileInfo
     //     Translation              <TranslationID>
     //
     // By Querying the VERSIONINFO section for its Tranlations, we can find out
     // where the InternalName lives. (A file can have more than one translation
     // of its VERSIONINFO segment, but we just assume the first one).
     nsCOMPtr<nsILocalFile> lf;
-    NS_NewLocalFile(filePath, PR_TRUE, getter_AddRefs(lf));
+    NS_NewLocalFile(filePath, true, getter_AddRefs(lf));
     if (!lf)
       return NS_ERROR_FAILURE;
 
     nsCOMPtr<nsILocalFileWin> lfw = do_QueryInterface(lf);
     if (!lfw)
       return NS_ERROR_FAILURE;
 
     nsAutoString internalName;
--- a/suite/profile/migration/src/nsThunderbirdProfileMigrator.cpp
+++ b/suite/profile/migration/src/nsThunderbirdProfileMigrator.cpp
@@ -155,35 +155,35 @@ nsThunderbirdProfileMigrator::GetMigrate
   *aResult =
     nsISuiteProfileMigrator::ACCOUNT_SETTINGS |
     nsISuiteProfileMigrator::MAILDATA |
     nsISuiteProfileMigrator::NEWSDATA |
     nsISuiteProfileMigrator::ADDRESSBOOK_DATA;
 
   MigrationData data[] = { { FILE_NAME_PREFS,
                              nsISuiteProfileMigrator::SETTINGS,
-                             PR_TRUE },
+                             true },
                            { FILE_NAME_USER_PREFS,
                              nsISuiteProfileMigrator::SETTINGS,
-                             PR_TRUE },
+                             true },
                            { FILE_NAME_COOKIES,
                              nsISuiteProfileMigrator::COOKIES,
-                             PR_FALSE },
+                             false },
                            { FILE_NAME_HISTORY,
                              nsISuiteProfileMigrator::HISTORY,
-                             PR_TRUE },
+                             true },
                            { FILE_NAME_DOWNLOADS,
                              nsISuiteProfileMigrator::OTHERDATA,
-                             PR_TRUE },
+                             true },
                            { FILE_NAME_MIMETYPES,
                              nsISuiteProfileMigrator::OTHERDATA,
-                             PR_TRUE },
+                             true },
                            { FILE_NAME_JUNKTRAINING,
                              nsISuiteProfileMigrator::JUNKTRAINING,
-                             PR_TRUE } };
+                             true } };
                                                                   
   GetMigrateDataFromArray(data, sizeof(data)/sizeof(MigrationData),
                           aReplace, mSourceProfile, aResult);
 
   // Now locate passwords
   nsCString signonsFileName;
   GetSignonFileName(aReplace, getter_Copies(signonsFileName));
 
--- a/suite/profile/nsSuiteDirectoryProvider.cpp
+++ b/suite/profile/nsSuiteDirectoryProvider.cpp
@@ -78,17 +78,17 @@ nsSuiteDirectoryProvider::GetFile(const 
 
   nsDependentCString leafStr(leafName);
   file->AppendNative(leafStr);
 
   bool exists;
   if (NS_SUCCEEDED(file->Exists(&exists)) && !exists)
     EnsureProfileFile(leafStr, parentDir, file);
 
-  *aPersist = PR_TRUE;
+  *aPersist = true;
   NS_IF_ADDREF(*aResult = file);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsSuiteDirectoryProvider::GetFiles(const char *aKey,
                                    nsISimpleEnumerator* *aResult)
--- a/suite/shell/src/nsGNOMEShellService.cpp
+++ b/suite/shell/src/nsGNOMEShellService.cpp
@@ -136,17 +136,17 @@ nsGNOMEShellService::OpenApplicationWith
     return rv;
   
   rv = process->Init(aApplication);
   if (NS_FAILED(rv))
     return rv;
 
   const nsCString& spec = PromiseFlatCString(aURI);
   const char* specStr = spec.get();
-  return process->Run(PR_FALSE, &specStr, 1);
+  return process->Run(false, &specStr, 1);
 }
 
 NS_IMETHODIMP
 nsGNOMEShellService::GetDefaultFeedReader(nsILocalFile** _retval)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
--- a/suite/shell/src/nsGNOMEShellService.h
+++ b/suite/shell/src/nsGNOMEShellService.h
@@ -43,17 +43,17 @@
 #define NS_SUITEGNOMEINTEGRATION_CID \
 {0xc16cfa25, 0xa74a, 0x420b, {0xa5, 0x45, 0x4b, 0xc0, 0x6b, 0x08, 0xa8, 0x65}}
 
 struct ProtocolAssociation;
 
 class nsGNOMEShellService : public nsIShellService
 {
 public:
-  nsGNOMEShellService() : mCheckedThisSessionClient(PR_FALSE) { }
+  nsGNOMEShellService() : mCheckedThisSessionClient(false) { }
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISHELLSERVICE
 
   nsresult Init() NS_HIDDEN;
 
 private:
   ~nsGNOMEShellService() {}
--- a/suite/shell/src/nsMacShellService.h
+++ b/suite/shell/src/nsMacShellService.h
@@ -41,17 +41,17 @@
 #include "nsShellService.h"
 
 #define NS_SUITEMACINTEGRATION_CID \
 {0xac17e6f0, 0x50c9, 0x4901, {0xab, 0x08, 0xf8, 0x70, 0xbf, 0xcd, 0x12, 0xce}}
 
 class nsMacShellService : public nsIShellService
 {
 public:
-  nsMacShellService() : mCheckedThisSessionClient(PR_FALSE) {};
+  nsMacShellService() : mCheckedThisSessionClient(false) {};
   virtual ~nsMacShellService() {};
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISHELLSERVICE
 
 private:
   bool mCheckedThisSessionClient;
 };
--- a/suite/shell/src/nsWindowsShellService.cpp
+++ b/suite/shell/src/nsWindowsShellService.cpp
@@ -475,32 +475,32 @@ nsWindowsShellService::TestForDefault(SE
         dataShortPath.Replace(offset, 9, mAppShortPath);
     }
 
     ::ZeroMemory(currValue, sizeof(currValue));
     HKEY theKey;
     nsresult rv = OpenKeyForReading(HKEY_CLASSES_ROOT, key.get(), &theKey);
     if (NS_FAILED(rv))
       // Key does not exist
-      return PR_FALSE;
+      return false;
 
     DWORD len = sizeof currValue;
     DWORD res = ::RegQueryValueExW(theKey, value.get(),
                                    NULL, NULL, (LPBYTE)currValue, &len);
     // Close the key we opened.
     ::RegCloseKey(theKey);
     if (REG_FAILED(res) ||
         !dataLongPath.Equals(currValue, CaseInsensitiveCompare) &&
         !dataShortPath.Equals(currValue, CaseInsensitiveCompare)) {
       // Key wasn't set, or was set to something else (something else became the default client)
-      return PR_FALSE;
+      return false;
     }
   }
 
-  return PR_TRUE;
+  return true;
 }
 
 nsresult nsWindowsShellService::Init()
 {
   PRUnichar appPath[MAX_BUF];
   if (!::GetModuleFileNameW(0, appPath, MAX_BUF))
     return NS_ERROR_FAILURE;
 
@@ -524,45 +524,45 @@ nsWindowsShellService::IsDefaultClientVi
 
   HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration,
                                 NULL,
                                 CLSCTX_INPROC,
                                 IID_IApplicationAssociationRegistration,
                                 (void**)&pAAR);
   
   if (SUCCEEDED(hr)) {
-    BOOL isDefaultBrowser = PR_TRUE;
-    BOOL isDefaultMail    = PR_TRUE;
-    BOOL isDefaultNews    = PR_TRUE;
+    BOOL isDefaultBrowser = true;
+    BOOL isDefaultMail    = true;
+    BOOL isDefaultNews    = true;
     if (aApps & nsIShellService::BROWSER)
       pAAR->QueryAppIsDefaultAll(AL_EFFECTIVE, APP_REG_NAME, &isDefaultBrowser);
     if (aApps & nsIShellService::MAIL)
       pAAR->QueryAppIsDefaultAll(AL_EFFECTIVE, APP_REG_NAME_MAIL, &isDefaultMail);
     if (aApps & nsIShellService::NEWS)
       pAAR->QueryAppIsDefaultAll(AL_EFFECTIVE, APP_REG_NAME_NEWS, &isDefaultNews);
 
     *aIsDefaultClient = isDefaultBrowser && isDefaultNews && isDefaultMail;
 
     pAAR->Release();
-    return PR_TRUE;
+    return true;
   }
 #endif  
-  return PR_FALSE;
+  return false;
 }
 
 NS_IMETHODIMP
 nsWindowsShellService::IsDefaultClient(bool aStartupCheck, PRUint16 aApps, bool *aIsDefaultClient)
 {
   // If this is the first application window, maintain internal state that we've
   // checked this session (so that subsequent window opens don't show the
   // default client dialog).
   if (aStartupCheck)
-    mCheckedThisSessionClient = PR_TRUE;
+    mCheckedThisSessionClient = true;
 
-  *aIsDefaultClient = PR_TRUE;
+  *aIsDefaultClient = true;
 
   // for each type, check if it is the default app
   // browser check needs to be at the top
   if (aApps & nsIShellService::BROWSER) {
     *aIsDefaultClient &= TestForDefault(gBrowserSettings, sizeof(gBrowserSettings)/sizeof(SETTING));
     // Only check if this app is default on Vista if the previous checks
     // indicate that this app is the default.
     if (*aIsDefaultClient)
@@ -638,17 +638,17 @@ nsWindowsShellService::SetDefaultClient(
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsWindowsShellService::GetShouldCheckDefaultClient(bool* aResult)
 {
   if (mCheckedThisSessionClient) {
-    *aResult = PR_FALSE;
+    *aResult = false;
     return NS_OK;
   }
 
   nsresult rv;
   nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
   return prefs->GetBoolPref(PREF_CHECKDEFAULTCLIENT, aResult);
 }
@@ -919,17 +919,17 @@ nsWindowsShellService::OpenApplicationWi
     return rv;
   
   rv = process->Init(aApplication);
   if (NS_FAILED(rv))
     return rv;
   
   const nsCString& spec = PromiseFlatCString(aURI);
   const char* specStr = spec.get();
-  return process->Run(PR_FALSE, &specStr, 1);
+  return process->Run(false, &specStr, 1);
 }
 
 NS_IMETHODIMP
 nsWindowsShellService::GetDefaultFeedReader(nsILocalFile** _retval)
 {
   *_retval = nsnull;
 
   HKEY theKey;
--- a/suite/shell/src/nsWindowsShellService.h
+++ b/suite/shell/src/nsWindowsShellService.h
@@ -53,17 +53,17 @@ typedef struct {
   char* valueData;
 
   PRInt32 flags;
 } SETTING;
 
 class nsWindowsShellService : public nsIWindowsShellService
 {
 public:
-  nsWindowsShellService() : mCheckedThisSessionClient(PR_FALSE) {};
+  nsWindowsShellService() : mCheckedThisSessionClient(false) {};
   ~nsWindowsShellService() {};
   NS_HIDDEN_(nsresult) Init();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISHELLSERVICE
   NS_DECL_NSIWINDOWSSHELLSERVICE
 
 protected: